From: Pierre S. <p.s...@gs...> - 2013-05-16 08:01:11
|
Dear Bereket, I guess the linking fails as gcc can not use python.dll directly. Did you use pexports for building libpython.a? This web page e.g. gives a good explanation: http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/ Hope that helps. Sincerely yours Pierre > Hi, > > I'm trying to install PyGSL on my computer (64 bit Windows 7), with > Python 2.7 and GSL 1.15 installed. I'm pretty much stuck and I would > love for some extra help. GSL installed fine, but its the wrapper > that's the problem. For some reason I can't build pygsl. Apparently > gcc is the problem (got the same problem on another windows machine). > Or it could be that pygsl appears to be using a file named AMD64 while > my computer is x86. I would love to use the windows binary for pygsl, > but it only exists for python 2.5, and my project needs 2.6 or higher. > I've used both the windows binary for GSL and built it from source, > but I get the same problem either way. I tried copying dlls from GSL > into pygsl but that didn't work. Some forums mentioned a file called > gsl.dll but I can't seem to find it. I've also tried to use Cygwin and > to compile with minGW32 to no avail. > > cmds I ran: > python setup.py install > python setup.py build > python setup.py build_ext -i > python setup.py build --compiler=mingw32 > > Any ideas?? Thanks. > > Cheers, > Bereket > > > Got the same message in Cygwin as in the windows cmd prompt. Error > message: > > $ /cygdrive/c/Python27/python.exe setup.py build_ext -i > numpy > Forcing DISTUTILS_USE_SDK=1 > Building testing ufuncs! > running build_ext > building 'errno' extension > C compiler: gcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wall > -Wstrict-prototypes > > compile options: '-DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1 > -DNUMERIC=0 -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=15 > -UNDEBUG -IC:\Users\Bereket\gsl-1.15\include -IInclude -I. > -IC:\Python27\lib\site-packages\numpy\core\include > -IC:\Python27\include -IC:\Python27\PC -c' > gcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wall -Wstrict-prototypes > -DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1 -DNUMERIC=0 > -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=15 -UNDEBUG > -IC:\Users\Bereket\gsl-1.15\include -IInclude -I. > -IC:\Python27\lib\site-packages\numpy\core\include > -IC:\Python27\include -IC:\Python27\PC -c src/init/errorno.c -o > build\temp.win-amd64-2.7\Release\src\init\errorno.o > Found executable C:\cygwin\bin\gcc.exe > gcc -g -mno-cygwin -shared > build\temp.win-amd64-2.7\Release\src\init\errorno.o > -LC:\Users\Bereket\gsl-1.15\lib -LC:\Python27\libs > -LC:\Python27\PCbuild\amd64 -lgsl -lgslcblas -lm -lpython27 -lmsvcr90 > -o C:\Python27\Lib\pygsl-0.9.5\pygsl\errno.pyd > build\temp.win-amd64-2.7\Release\src\init\errorno.o: In function > `add_errno': > /cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno.c:14: undefined > reference to `__imp__PyInt_FromLong' > /cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno.c:20: undefined > reference to `__imp__PyDict_SetItemString' > build\temp.win-amd64-2.7\Release\src\init\errorno.o: In function > `initerrno': > /cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno.c:37: undefined > reference to `__imp__Py_InitModule4_64' > /cygdrive/c/Python27/Lib/pygsl-0.9.5/src/init/errorno.c:40: undefined > reference to `__imp__PyModule_GetDict' > collect2: ld returned 1 exit status > error: Command "gcc -g -mno-cygwin -shared > build\temp.win-amd64-2.7\Release\src\init\errorno.o > -LC:\Users\Bereket\gsl-1.15\lib -LC:\Python27\libs > -LC:\Python27\PCbuild\amd64 -lgsl -lgslcblas -lm -lpython27 -lmsvcr90 > -o C:\Python27\Lib\pygsl-0.9.5\pygsl\errno.pyd" failed with exit status 1 > -- +---------------------------------------------------------------------+ Pierre Schnizer<p.s...@gs...> Telephon : +49 6159 71 1557 Fax : +49 6159 71 3099 GSI Helmholtzzentrum für Schwerionenforschung GmbH Planckstraße 1 64291 Darmstadt www.gsi.de Gesellschaft mit beschränkter Haftung Sitz der Gesellschaft: Darmstadt Handelsregister: Amtsgericht Darmstadt, HRB 1528 Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker Peter Hassenbach Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt +---------------------------------------------------------------------+ |