mampisarkar111 / netcdf4-python

Automatically exported from code.google.com/p/netcdf4-python
Other
0 stars 0 forks source link

New 1.0.5 release requires libnetcdf>=4.1.2, which is not declared and is about the default version installed by apt-get on ubuntu 12.04 LTS #194

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
the 1.0.5 release includes new code calling nc_inq_path, (here in the current 
master: 
https://code.google.com/p/netcdf4-python/source/browse/trunk/netCDF4.pyx#1437).

This function was just added to libnetcdf4 in version in version 4.1.2 and 
caused an ABI version bump, as documented here 
http://comments.gmane.org/gmane.comp.lib.netcdf/2158.

Currently, since netcdf4-python doesn't check the netcdf4 version, this causes 
a cryptic runtime error during the import of the netCDF4 module in python when 
it's linked against <=4.1.1.

$ python -c "import netCDF4; print netCDF4.version" Traceback (most recent call last): File "", line 1, in ImportError: /usr/local/lib/python2.7/dist-packages/netCDF4.so: undefined symbol: nc_inq_path The command "python -c "import netCDF4; print netCDF4.version"" exited with 1.


libnetcdf4.1.1 is the default version that comes via the ubuntu package manager 
on 12.04 if you do sudo apt-get install libnetcdf-dev.

So, on a pretty major platform, currently running

sudo apt-get install libnetcdf-dev easy_install netCDF4


gives a broken build. We noticed this on our continuous integration server 
testing some downstream libraries. You can see the build log here: 
https://travis-ci.org/rmcgibbo/mdtraj/builds/10101028#L840

Original issue reported on code.google.com by rmcgibbo@gmail.com on 12 Aug 2013 at 4:02

GoogleCodeExporter commented 8 years ago
The title of the post has a typo in it, I meant "not declared and is *above..."

Original comment by rmcgibbo@gmail.com on 12 Aug 2013 at 4:03

GoogleCodeExporter commented 8 years ago
Is there a work around for this so we can at least run netCDF4 dependant 
programs on existing 12.04 installations?

Original comment by gamesb...@gmail.com on 7 Nov 2013 at 2:43

GoogleCodeExporter commented 8 years ago
I've put in a fix for this in svn (revision 1316).  If cython is installed, 
setup.py now checks the header file to see if nc_inq_path and nc_rename_grp are 
available.  If not, the C extension module will not try to use those functions. 
 If cython is not installed at build time, then the module will not try to use 
those functions.

Could someone with netcdf 4.1.1 please test?  If it works, I will post a new 
release (1.0.7) so the Ubuntu package can be updated.

Original comment by whitaker.jeffrey@gmail.com on 7 Nov 2013 at 5:59

GoogleCodeExporter commented 8 years ago
gamesb - can you confirm this fix works on Ubuntu 12.04?

Original comment by josh.n.w...@gmail.com on 10 Nov 2013 at 1:29

GoogleCodeExporter commented 8 years ago

Original comment by whitaker.jeffrey@gmail.com on 26 Feb 2014 at 2:04