Bobspadger / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

Latests source build fails for python 2.7 on windows #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. python setup.py build -c mingw32 install

What is the expected output? What do you see instead?
Expected clean install, build process bails out on the following command:

C:\Program Files\MinGW\bin\g++.exe -mno-cygwin -mdll -static --entry 
_DllMain@12 --output-lib c:\tmp\pyodbc-2.1.7\src\libpyodbc.a --def 
c:\tmp\pyodbc-2.1.7\src\pyodbc.def -s c:\tmp\pyodbc-2.1.7\src\buffer.o
c:\tmp\pyodbc-2.1.7\src\cnxninfo.o c:\tmp\pyodbc-2.1.7\src\connection.o 
c:\tmp\pyodbc-2.1.7\src\cursor.o c:\tmp\pyodbc-2.1.7\src\errors.o 
c:\tmp\pyodbc-2.1.7\src\getdata.o c:\tmp\pyodbc-2.1.7\src\params.o 
c:\tmp\pyodbc-2.1.7\src\pyodbcmodule.o c:\tmp\pyodbc-2.1.7\src\row.o 
-Lc:\python27\libs -Lc:\python27\PCbuild -lodbc32 -lpython27 -lmsvcr90 -o 
build\lib.win32-2.7\pyodbc.pyd

g++: c:\tmp\pyodbc-2.1.7\src\libpyodbc.a: No such file or directory
error: command 'g++' failed with exit status 1

What version of the product are you using? On what operating system?
2.1.7, python 2.7, windows server 2003.

Please provide any additional information below.

Tried building an archive from the objectfiles (ar rcs libpyodbc.a [all 
objectsfiles].o,  setup continues, but loading pyodbc then gives the error 'DLL 
load failed: the specified procedure could not be found'). 

Original issue reported on code.google.com by alexpr...@gmail.com on 9 Jul 2010 at 12:13

GoogleCodeExporter commented 9 years ago
I can build libpyodbc.a with the following command in the src directory 
(straight from http://www.cygwin.com/cygwin-ug-net/dll.html):

g++ -shared -o libpyodbc.a -Wl,--export-all-symbols -Wl,--enable-auto-import 
-Wl,--whole-archive buffer.o connection.o errors.o params.o row.o cnxninfo.o 
cursor.o getdata.o  pyodbcmodule.o -Wl,--no-whole-archive -Lc:\python27\libs 
-lodbc32 -lpython27 -lmsvcr90

After that, repeating the build/install command goes OK. 

I don't know how to pass this to setup.py, so I leave it to the maintainers to 
create a working patch for this issue.

Original comment by alexpr...@gmail.com on 14 Jul 2010 at 5:07

GoogleCodeExporter commented 9 years ago
when is there gonna be a python 2.7 version?

Original comment by dusan.sm...@gmail.com on 10 Aug 2010 at 7:22

GoogleCodeExporter commented 9 years ago
I don't build with mingw, so I haven't seen these.  I've uploaded a 2.7 build 
and will continue to do so for future releases.

Original comment by mkleehammer on 20 Aug 2010 at 7:49