Hello everyone,
first, thank you very much for writing a python wrapper to the GSL. It is
greatly appreciated, and I look forward to using it.
After extensive googling, I managed to compile the GSL libraries on windows
using Visual Studio 2010 with Brad Chapman's excellent guide.
The library resides in:
C:\Program Files (x86)\gsl-1.14
and the directory structure looks like this: (apologies about the spam)
C:\Program Files (x86)\gsl-1.14>tree
Folder PATH listing for volume OS
Volume serial number is CA49-670D
C:.
+---blas
+---block
+---bspline
+---build.vc10
¦ +---cblasdll
¦ ¦ +---Debug
¦ ¦ +---Win32
¦ ¦ +---Debug
¦ +---cblaslib
¦ ¦ +---Win32
¦ ¦ +---Debug
¦ +---Debug
¦ +---dll
¦ ¦ +---Win32
¦ ¦ +---Debug
¦ +---dlltest
¦ ¦ +---runtests
¦ ¦ +---testblock
¦ ¦ ¦ +---dll
¦ ¦ ¦ ¦ +---Win32
¦ ¦ ¦ ¦ +---Debug
¦ ¦ ¦ +---ipch
¦ ¦ ¦ ¦ +---testblock-96317742
¦ ¦ ¦ +---Win32
¦ ¦ ¦ +---Debug
¦ ¦ +---testbspline
¦ ¦ +---testcblas
¦ ¦ +---testcdf
¦ ¦ +---testcheb
¦ ¦ +---testcombination
¦ ¦ ¦ +---dll
¦ ¦ ¦ ¦ +---Win32
¦ ¦ ¦ ¦ +---Debug
¦ ¦ ¦ +---Win32
¦ ¦ ¦ +---Debug
¦ ¦ +---testcomplex
¦ ¦ +---testconst
¦ ¦ +---testderiv
¦ ¦ +---testdht
¦ ¦ +---testdiff
¦ ¦ +---testeigen
¦ ¦ +---testerr
¦ ¦ +---testfft
¦ ¦ +---testfit
¦ ¦ +---testhistogram
¦ ¦ +---testieee
¦ ¦ +---testintegration
¦ ¦ +---testinterpolation
¦ ¦ +---testlinalg
¦ ¦ +---testmatrix
¦ ¦ +---testmin
¦ ¦ +---testmonte
¦ ¦ +---testmultifit
¦ ¦ +---testmultimin
¦ ¦ +---testmultiroots
¦ ¦ +---testmultiset
¦ ¦ +---testntuple
¦ ¦ +---testode
¦ ¦ +---testpermutation
¦ ¦ +---testpoly
¦ ¦ +---testqrng
¦ ¦ +---testrandist
¦ ¦ +---testrng
¦ ¦ +---testroots
¦ ¦ +---testsiman
¦ ¦ +---testsort
¦ ¦ +---testspecfunc
¦ ¦ +---teststatistics
¦ ¦ +---testsum
¦ ¦ +---testsys
¦ ¦ +---testvector
¦ ¦ +---testwavelet
¦ +---gsldefs
¦ ¦ +---Debug
¦ +---gsldll
¦ ¦ +---Win32
¦ ¦ +---Debug
¦ ¦ +---blas
¦ ¦ +---block
¦ ¦ +---bspline
¦ ¦ +---cdf
¦ ¦ +---cheb
¦ ¦ +---combination
¦ ¦ +---complex
¦ ¦ +---deriv
¦ ¦ +---dht
¦ ¦ +---diff
¦ ¦ +---eigen
¦ ¦ +---err
¦ ¦ +---fft
¦ ¦ +---fit
¦ ¦ +---gsl
¦ ¦ +---histogram
¦ ¦ +---ieeeutils
¦ ¦ +---integration
¦ ¦ +---interpolation
¦ ¦ +---linalg
¦ ¦ +---matrix
¦ ¦ +---min
¦ ¦ +---monte
¦ ¦ +---multifit
¦ ¦ +---multimin
¦ ¦ +---multiroot
¦ ¦ +---multiset
¦ ¦ +---ntuple
¦ ¦ +---ode
¦ ¦ +---permutation
¦ ¦ +---poly
¦ ¦ +---qrng
¦ ¦ +---randist
¦ ¦ +---rng
¦ ¦ +---roots
¦ ¦ +---siman
¦ ¦ +---sort
¦ ¦ +---specfunc
¦ ¦ +---statistics
¦ ¦ +---sum
¦ ¦ +---sys
¦ ¦ +---test
¦ ¦ +---utils
¦ ¦ +---vector
¦ ¦ +---wavelet
¦ +---gslhdrs
¦ ¦ +---Win32
¦ ¦ +---Debug
¦ +---gsllib
¦ ¦ +---Win32
¦ ¦ +---Debug
¦ ¦ +---blas
¦ ¦ +---block
¦ ¦ +---bspline
¦ ¦ +---cdf
¦ ¦ +---cheb
¦ ¦ +---combination
¦ ¦ +---complex
¦ ¦ +---deriv
¦ ¦ +---dht
¦ ¦ +---diff
¦ ¦ +---eigen
¦ ¦ +---err
¦ ¦ +---fft
¦ ¦ +---fit
¦ ¦ +---gsl
¦ ¦ +---histogram
¦ ¦ +---ieeeutils
¦ ¦ +---integration
¦ ¦ +---interpolation
¦ ¦ +---linalg
¦ ¦ +---matrix
¦ ¦ +---min
¦ ¦ +---monte
¦ ¦ +---multifit
¦ ¦ +---multimin
¦ ¦ +---multiroot
¦ ¦ +---multiset
¦ ¦ +---ntuple
¦ ¦ +---ode
¦ ¦ +---permutation
¦ ¦ +---poly
¦ ¦ +---qrng
¦ ¦ +---randist
¦ ¦ +---rng
¦ ¦ +---roots
¦ ¦ +---siman
¦ ¦ +---sort
¦ ¦ +---specfunc
¦ ¦ +---statistics
¦ ¦ +---sum
¦ ¦ +---sys
¦ ¦ +---test
¦ ¦ +---utils
¦ ¦ +---vector
¦ ¦ +---wavelet
¦ +---lib
¦ ¦ +---Win32
¦ ¦ +---Debug
¦ +---libtest
¦ +---runtests
¦ +---testblock
¦ ¦ +---ipch
¦ ¦ ¦ +---testblock-333944dd
¦ ¦ +---Win32
¦ ¦ +---Debug
¦ +---testbspline
¦ +---testcblas
¦ +---testcdf
¦ +---testcheb
¦ +---testcombination
¦ +---testcomplex
¦ +---testconst
¦ +---testderiv
¦ +---testdht
¦ +---testdiff
¦ +---testeigen
¦ +---testerr
¦ +---testfft
¦ +---testfit
¦ +---testhistogram
¦ +---testieee
¦ +---testintegration
¦ +---testinterpolation
¦ +---testlinalg
¦ +---testmatrix
¦ +---testmin
¦ +---testmonte
¦ +---testmultifit
¦ +---testmultimin
¦ +---testmultiroots
¦ +---testmultiset
¦ +---testntuple
¦ +---testode
¦ +---testpermutation
¦ +---testpoly
¦ +---testqrng
¦ +---testrandist
¦ +---testrng
¦ +---testroots
¦ +---testsiman
¦ +---testsort
¦ +---testspecfunc
¦ +---teststatistics
¦ +---testsum
¦ +---testsys
¦ +---testvector
¦ +---testwavelet
+---cblas
+---cdf
+---cheb
+---combination
+---complex
+---const
+---deriv
+---dht
+---diff
+---doc
¦ +---examples
+---eigen
+---err
+---fft
+---fit
+---gsl
+---histogram
+---ieee-utils
+---integration
+---interpolation
+---linalg
+---matrix
+---min
+---monte
+---multifit
+---multimin
+---multiroots
+---multiset
+---ntuple
+---ode-initval
+---permutation
+---poly
+---qrng
+---randist
+---rng
+---roots
+---siman
+---sort
+---specfunc
+---statistics
+---sum
+---sys
+---test
+---utils
+---vector
+---wavelet
The actual compiled directory files are here:
C:\Program Files (x86)\gsl-1.14\build.vc10\lib\Win32\Debug>dir
Volume in drive C is OS
Volume Serial Number is CA49-670D
Directory of C:\Program Files (x86)\gsl-1.14\build.vc10\lib\Win32\Debug
06/02/2011 17:10 <DIR> .
06/02/2011 17:10 <DIR> ..
06/02/2011 17:10 1,113,268 cblas.lib
06/02/2011 17:10 61,440 cblas.pdb
06/02/2011 17:10 17,849,866 gsl.lib
06/02/2011 17:10 266,240 gsl.pdb
4 File(s) 19,290,814 bytes
2 Dir(s) 172,105,408,512 bytes free
Now - how do I set up the gsl_site.py file?
My best guess, was something like this:
# Some systems do not provide gsl-config. So here the locations can be
entered
# by hand.
import os
# The path to the directory where gsl is installed. Currently setup.py
assumes
# that the include files are located in "prefix/include".
prefix = os.path.join("C:\\", "Program Files (x86)", "gsl-1.14")
cflags = "-g -I" + os.path.join(prefix, "include")
libs = "-L" + os.path.join(prefix, "build.vc10","lib","Win32","Debug")+ "
-lgsl -lgslcblas -lm"
# Enter the correct GSL versions by hand..
version = "1.14"
# swig_extension.py needs swig to generate the approbriate wrapper files.
This
# variable only needs to be correct is you use USE_SWIG=1 in setup.py
swig = os.path.join("F:\\", "Program Files", "swigwin-2.0.2")
#swig = os.path.join("C:\\", "Programs", "Swig", "SWIG-1.3.19", "swig")
but the cflags option is obviously wrong.
Running:
C:\TEMP\pygsl-0.9.5>python setup.py build
numpy
Building testing ufuncs!
running build
running build_py
copying pygsl\_mlab.py -> build\lib.win32-2.7\pygsl
copying pygsl\_numobj.py -> build\lib.win32-2.7\pygsl
copying gsl_dist\array_includes.py -> build\lib.win32-2.7\pygsl\gsl_dist
copying gsl_dist\gsl_site.py -> build\lib.win32-2.7\pygsl\gsl_dist
running build_ext
No module named msvccompiler in numpy.distutils; trying from distutils
building 'errno' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox
/MD /W3 /GS- /DNDEBUG -DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1
-DNUM
ERIC=0 -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=14 -UNDEBUG
-I"C:\P
rogram Files (x86)\gsl-1.14\include" -IInclude -I.
-IC:\Python27\lib\site-packag
es\numpy\core\include -IC:\Python27\include -IC:\Python27\PC
/Tcsrc/init/errorno
.c /Fobuild\temp.win32-2.7\Release\src/init/errorno.obj
Found executable C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\cl.ex
e
cl : Command line warning D9025 : overriding '/DNDEBUG' with '/UNDEBUG'
errorno.c
src/init/errorno.c(6) : fatal error C1083: Cannot open include file:
'gsl/gsl_er
rno.h': No such file or directory
error: Command "C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\cl.exe
/c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DSWIG_COBJECT_TYPES=1
-DGSL_RANGE_CHECK=1
-DDEBUG=1 -DNUMERIC=0 -DPYGSL_GSL_MAJOR_VERSION=1
-DPYGSL_GSL_MINOR_VERSION=14
-UNDEBUG -I"C:\Program Files (x86)\gsl-1.14\include" -IInclude -I.
-IC:\Python27
\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC
/Tc
src/init/errorno.c /Fobuild\temp.win32-2.7\Release\src/init/errorno.obj"
failed
with exit status 2
which obviously means the compilation fails to find gsl_erno.h
I cannot figure a sensible way to configure the compiler flags. For the
record:
- I am using Visual Studio 2008 to compile.
- I tried using minGW32 to compile, it doesn't make a difference, I don't
think that's the case.
gsl_errno.h is in:
C:\Program Files (x86)\gsl-1.14\gsl
Thank you very much!
Federico
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
pygsl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pygsl-discuss