From: per f. <per...@gm...> - 2010-07-21 16:37:26
|
thanks for your reply, Pierre. I upgraded the GSL version and tried again. This time I got a different error when doing "python setup.py build" (after erasing the old "build/" directory): compile options: '-DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1 -DONEFILE=1 -DNUMERIC=0 -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=14 -UNDEBUG -I/usr/local/include -IInclude -I. -I/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/6.2/include/python2.6 -c' gcc: testing/src/solvers/solvermodule.c testing/src/solvers/solvermodule.c: In function ‘_PyGSL_solver_init’: testing/src/solvers/solvermodule.c:258: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘Py_ssize_t’ gcc -g -L/usr/local/lib -L/Library/Frameworks/Python.framework/Versions/6.2/lib -bundle -undefined dynamic_lookup -arch i386 build/temp.macosx-10.5-i386-2.6/testing/src/solvers/solvermodule.o -L/usr/local/lib -lgsl -lgslcblas -lm -o build/lib.macosx-10.5-i386-2.6/pygsl/testing/solver.so ld: warning: in /usr/local/lib/libgsl.dylib, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /usr/local/lib/libgslcblas.dylib, file was built for unsupported file format which is not the architecture being linked (i386) building 'testing._ufuncs' extension C compiler: gcc -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/Library/Frameworks/Python.framework/Versions/6.2/include creating build/temp.macosx-10.5-i386-2.6/testing/src/sf compile options: '-DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1 -DNUMERIC=0 -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=14 -UNDEBUG -I/usr/local/include -IInclude -I. -I/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/6.2/include/python2.6 -c' gcc: testing/src/sf/sfmodule_testing.c testing/src/sf/sfmodule_testing.c:102: warning: initialization from incompatible pointer type testing/src/sf/sfmodule_testing.c:102: warning: initialization from incompatible pointer type testing/src/sf/sfmodule_testing.c:145: warning: initialization from incompatible pointer type testing/src/sf/sfmodule_testing.c:145: warning: initialization from incompatible pointer type gcc -g -L/usr/local/lib -L/Library/Frameworks/Python.framework/Versions/6.2/lib -bundle -undefined dynamic_lookup -arch i386 build/temp.macosx-10.5-i386-2.6/testing/src/sf/sfmodule_testing.o -L/usr/local/lib -lgsl -lgslcblas -lm -o build/lib.macosx-10.5-i386-2.6/pygsl/testing/_ufuncs.so ld: warning: in /usr/local/lib/libgsl.dylib, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: in /usr/local/lib/libgslcblas.dylib, file was built for unsupported file format which is not the architecture being linked (i386) I tried to do: python setup.py install nonetheless, and then when I imported pygsl, I got the following error: ==== >>> import pygsl Did you try to import pygsl in the build directory? Well, that does not work out of the box. If you want to do that, please use python setup.py build_ext -i to add the necessary extension module in the local pygsl/ directory! Please read the README first! Any further questions or missing information please post to pyg...@li...! Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/pygsl/__init__.py", line 57, in <module> import pygsl.init ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/pygsl/init.so, 2): Symbol not found: _gsl_version Referenced from: /Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/pygsl/init.so Expected in: flat namespace in /Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/pygsl/init.so ==== I was not importing it from its own directory. Any idea what is wrong here? thanks. On Wed, Jul 21, 2010 at 11:58 AM, Pierre SCHNIZER <p.s...@gs...> wrote: > > I think the functions > > gsl_sf_exprel_n_CF_e > > gsl_sf_exprel_n_En_e > > are not defined or not included in the include files.... > Can you grep through your headers and see if these functions are there? > > > You are using a rather old version of GSL, is that intentionally? > > If you can not find the functions, I think you have to run the python code > which generates the wrappers by hand: > http://pygsl.sourceforge.net/reference/pygsl/node13.html > > Sincerely yours > Pierre >> >> Hello everyone, >> >> >> I am having trouble compiling Pygsl on Mac OS X, using GCC 4.2. I ran >> the following: >> >> sudo python setup.py install >> >> And got this error: >> >> In file included from testing/src/sf/sfmodule_testing.c:49: >> testing/src/sf/sf__data.c:779: error: ‘gsl_sf_exprel_n_CF_e’ >> undeclared here (not in a function) >> testing/src/sf/sf__data.c:806: error: ‘gsl_sf_expint_En_e’ >> undeclared here (not in a function) >> testing/src/sf/sf__data.c:806: error: initializer element is not >> constant >> testing/src/sf/sf__data.c:806: error: (near initialization for >> ‘sf_expint_En_e_data[0]’) >> testing/src/sf/sf__data.c:806: error: initializer element is not >> constant >> testing/src/sf/sf__data.c:806: error: (near initialization for >> ‘sf_expint_En_e_data[1]’) >> testing/src/sf/sf__data.c:809: error: ‘gsl_sf_expint_En’ >> undeclared here (not in a function) >> testing/src/sf/sf__data.c:809: error: initializer element is not >> constant >> testing/src/sf/sf__data.c:809: error: (near initialization for >> ‘sf_expint_En_data[0]’) >> testing/src/sf/sf__data.c:809: error: initializer element is not >> constant >> testing/src/sf/sf__data.c:809: error: (near initialization for >> ‘sf_expint_En_data[1]’) >> testing/src/sf/sf__data.c:824: error: ‘gsl_sf_expint_En_scaled_e’ >> undeclared here (not in a function) >> testing/src/sf/sf__data.c:824: error: initializer element is not >> constant >> testing/src/sf/sf__data.c:824: error: (near initialization for >> ‘sf_expint_En_scaled_e_data[0]’) >> testing/src/sf/sf__data.c:824: error: initializer element is not >> constant >> testing/src/sf/sf__data.c:824: error: (near initialization for >> ‘sf_expint_En_scaled_e_data[1]’) >> testing/src/sf/sf__data.c:827: error: ‘gsl_sf_expint_En_scaled’ >> undeclared here (not in a function) >> testing/src/sf/sf__data.c:827: error: initializer element is not >> constant >> testing/src/sf/sf__data.c:827: error: (near initialization for >> ‘sf_expint_En_scaled_data[0]’) >> testing/src/sf/sf__data.c:827: error: initializer element is not >> constant >> testing/src/sf/sf__data.c:827: error: (near initialization for >> ‘sf_expint_En_scaled_data[1]’) >> testing/src/sf/sfmodule_testing.c:102: warning: initialization >> from incompatible pointer type >> testing/src/sf/sfmodule_testing.c:102: warning: initialization >> from incompatible pointer type >> testing/src/sf/sfmodule_testing.c:145: warning: initialization >> from incompatible pointer type >> testing/src/sf/sfmodule_testing.c:145: warning: initialization >> from incompatible pointer type >> error: Command "gcc -fno-strict-aliasing -fno-common -dynamic >> -DNDEBUG -g -O3 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk >> -I/Library/Frameworks/Python.framework/Versions/6.2/include >> -DSWIG_COBJECT_TYPES=1 -DGSL_RANGE_CHECK=1 -DDEBUG=1 -DNUMERIC=0 >> -DPYGSL_GSL_MAJOR_VERSION=1 -DPYGSL_GSL_MINOR_VERSION=9 -UNDEBUG >> -I/usr/local/include -IInclude -I. >> >> -I/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/numpy/core/include >> -I/Library/Frameworks/Python.framework/Versions/6.2/include/python2.6 >> -c testing/src/sf/sfmodule_testing.c -o >> build/temp.macosx-10.5-i386-2.6/testing/src/sf/sfmodule_testing.o" >> failed with exit status 1 >> >> The GSL library compiled fine, it's only PyGSL that will not compile. >> Any idea what could be causing this? Thanks for your help. >> >> >> My version for GCC is: >> >> $ gcc --version >> i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659) >> Copyright (C) 2007 Free Software Foundation, Inc. >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> pygsl-discuss mailing list >> pyg...@li... >> https://lists.sourceforge.net/lists/listinfo/pygsl-discuss >> > > > -- > +---------------------------------------------------------------------+ > Pierre Schnizer <p.s...@gs...> > Telephon : +49 6159 71 1557 > Fax : +49 6159 71 2985 > > GSI Helmholtzzentrum für Schwerionenforschung GmbH > Planckstraße 1 > D-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. Horst Stöcker, Christiane Neumann, > Dr. Hartmut Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph > Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt > +---------------------------------------------------------------------+ > > |