-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined symbol, nc_inq_var_fletcher32 whem importing netCDF4 #60
Comments
From deatho...@googlemail.com on July 20, 2010 10:34:36 Sorry, forgot to mention it's on an i686 running fedora 11 |
From bast...@gmail.com on July 20, 2010 12:14:15 What did you compile with? |
From whitaker.jeffrey@gmail.com on July 20, 2010 12:56:44 A missing symbol error like this usually means you linked a netcdf library that does not have netcdf-4 support. Since you indicated that you used --enable-netcdf-4 when building netcdf, it may be that there is another older version of the netcdf library on your system that the python build is picking up. Try "ldd /usr/lib/python2.6/site-packages/netCDF4.so" to see what netcdf library was actually linked. Another possibility is that the HDF5 headers and libs were not found by the netcdf-4 configure step, so it was built without netcdf-4 support. I would need to see the output of configure to know whether that is the case. -Jeff |
From deatho...@googlemail.com on July 21, 2010 02:42:08 Thanks very much for your replies. It was compiled with gcc and gfortran. The netCDF4.so file links against otus% ldd /usr/lib/python2.6/site-packages/netCDF4.so Which of those should I then be checking? In the netcdf configure log, it refers to HDF5 a few times; configure:3042: checking whether HDF5 should do data conversions I'm afraid I don;t understand what those last two lines mean. Does a "#" mean that it's not false, or that it is false? Thanks again |
From whitaker.jeffrey@gmail.com on July 21, 2010 05:16:02 Looks like netcdf was compiled statically, so ldd doesn't show you the path. Try running "nm -p /usr/local/lib/libnetcdf.a | grep nc_inq_var_fletcher32". That will tell you if the symbol is in there. If it isn't, try re-running the configure step for the netcdf lib, saving it to a file. Then post the file as an attachment. Also post the output of "python setup.py build". Note that netcdf 4.1.1 is required - you appear to be using 4.0.1 -Jeff |
From deatho...@googlemail.com on July 21, 2010 05:21:37 Thanks again The search gave; otus% nm -p /usr/local/lib/libnetcdf.a | grep nc_inq_var_fletcher32 which I suppose means it's in there. The configure file used for this compilation is attached. Thanks very much again Attachment: config.log |
From deatho...@googlemail.com on July 21, 2010 05:23:59 The output of python setup.py build [root@otus netCDF4-0.9.1]# python setup.py build HDF5_DIR environment variable not set, checking some standard locations .., NETCDF4_DIR environment variable not set, checking some standard locations .., Thanks |
From whitaker.jeffrey@gmail.com on July 21, 2010 06:04:14 You have to remove the build directory before running setup.py, otherwise it doesn't recompile. |
From deatho...@googlemail.com on July 21, 2010 06:07:17 Thanks. Just compiling version 4.1.1 of netcdf now, I'll have a go at that. |
From whitaker.jeffrey@gmail.com on July 21, 2010 06:09:52 I was asking for you to save the output of running the configure script, not the config.log file, for example ./configure <configure options 1> configure.log 2> configure.log or with csh ./configure &! configure.log Since the missing symbol appears to be in the library, I suspect you are actually linking another version of the library on your system somewhere when you run setup.py. -Jeff |
From deatho...@googlemail.com on July 21, 2010 06:13:12 Ah, sorry. I'll have another go as soon as the compilation's finished. |
From whitaker.jeffrey@gmail.com on July 21, 2010 06:57:20 OK, but from your config.log I doubt that your build is the problem. You do need to use 4.1.1 though, not 4.0.1. While you are rebuilding, please use --enable-shared, that way ldd will reveal if you have linked the correct library. Do you by any chance have a libnetcdf.a in /usr/lib? |
From deatho...@googlemail.com on July 21, 2010 08:30:22 Thanks very much for your help, I've compiled the netcdf-4.1.1 library and that seems to work. I can now import the netCDF4 module in to python. I have a libnetcdf.a in /usr/local/lib Steve |
From whitaker.jeffrey@gmail.com on July 21, 2010 08:37:43 Great - let me know if you have any other issues. -Jeff Status: Invalid |
From jakobru...@gmail.com on December 11, 2010 12:22:53 I have the same problem, but unresolved... I built netcdf-4.1.1 with Then (atfer removing build) ran: HDF5_DIR environment variable not set, checking some standard locations .., NETCDF4_DIR environment variable not set, checking some standard locations .., creating build/temp.linux-i686-2.6 But when testing I get: $ python run_all.py Any solution? Thanks, |
From whitaker.jeffrey@gmail.com on December 11, 2010 13:16:46 Jakub: You need to build netcdf with --enable-netcdf-4 --enable-shared (and --enable-dap if you want opendap support). |
From deatho...@googlemail.com on July 20, 2010 11:32:34
Hi, I'm trying to import the netCDF4 module into a python script.
So far I have;
compiled the HDF5 library (v1.8.5).
configure --enable-hl --with-zlib=/usr/local
make check install
compiled the netCDF4 library linked against the HDF5 library (v4.0.1).
configure --enable-netcdf-4 --with-hdf5=/usr/local --with-zlib=/usr/local --prefix=/usr/local
make check install
then run the python netCDF4 installer.
python setup.py install
This all seems to work without an error message.
When I try importing the netCDF4 module;
Does anyone know what I'm doing wrong (I'm new to python).
Thanks
Original issue: http://code.google.com/p/netcdf4-python/issues/detail?id=60
The text was updated successfully, but these errors were encountered: