Are you definitely setting NETCDF_HOME=/usr/local/netcdf4 and HDF5_HOME=/usr/local/hdf5?
The best way to get detailed diagnostics is to download the tarball, unpack and use the setup.py script. $ wget http://ndg.nerc.ac.uk/dist/cdat_lite-6.0.alpha-3.tar.gz # In the unpacked tarball $ python setup.py build 2>&1 | tee setup.log Send me the logged output setup.log S. --- Stephen Pascoe +44 (0)1235 445980 Centre of Environmental Data Archival STFC Rutherford Appleton Laboratory, Harwell Oxford, Didcot OX11 0QX, UK -----Original Message----- From: Jon Blower [mailto:[email protected]] Sent: 18 January 2011 15:15 To: Pascoe, Stephen (STFC,RAL,SSTD); [email protected]; [email protected] Subject: RE: Problems running cdat-lite: can't find libnetcdf.so.0 Ah, ok, thanks. I removed the old cdat-lite, then reinstalled as you suggested from the tar.gz file. Now Cdunif.so doesn't report a link to libnetcdf at all: libhdf5_hl.so.6 => /usr/local/hdf5/lib/libhdf5_hl.so.6 (0x00e07000) libhdf5.so.6 => /usr/local/hdf5/lib/libhdf5.so.6 (0x00110000) libnetcdf.so.0 => not found so I get the same error message as before. (It still compiled OK, so it must have found a netCDF lib on compilation.) Cheers, Jon -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: 18 January 2011 15:05 To: [email protected]; [email protected] Subject: RE: Problems running cdat-lite: can't find libnetcdf.so.0 That's because easy_install doesn't offer an uninstall :-(. I know, it's crazy -- there are alternatives on the horizon but easy_install is the easiest way to get people started. The way to uninstall something installed with easy_install is: 1. Delete .../lib/python2.*/site-packages/cdat-lite*.egg 2. Remove any references to cdat-lite in .../lib/python2.x/site-packages/easy-install.pth Good luck :-) Stephen. --- Stephen Pascoe +44 (0)1235 445980 Centre of Environmental Data Archival STFC Rutherford Appleton Laboratory, Harwell Oxford, Didcot OX11 0QX, UK -----Original Message----- From: Jon Blower [mailto:[email protected]] Sent: 18 January 2011 14:59 To: Pascoe, Stephen (STFC,RAL,SSTD); [email protected] Subject: RE: Problems running cdat-lite: can't find libnetcdf.so.0 Hi Stephen, I just tried this with the same outcome :-( However, I didn't explicitly uninstall the old version of cdat_lite-6.0.alpha-3 because I didn't know how to do this. Cheers, Jon -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: 18 January 2011 14:45 To: [email protected]; [email protected] Subject: RE: Problems running cdat-lite: can't find libnetcdf.so.0 Hi John, I saw this very problem when I was experimenting with your issue yesterday. I fixed it by reinstalling cdat_lite. Can you try doing this? easy_install may need some persuading to recompile the same version, try giving it the exact web link $ export NETCDF_HOME=... $ export HDF5_HOME=... $ easy_install -U http://ndg.nerc.ac.uk/dist/cdat_lite-6.0.alpha-3.tar.gz There other ways to do this so let me know if that fails. S. --- Stephen Pascoe +44 (0)1235 445980 Centre of Environmental Data Archival STFC Rutherford Appleton Laboratory, Harwell Oxford, Didcot OX11 0QX, UK -----Original Message----- From: Jon Blower [mailto:[email protected]] Sent: 18 January 2011 14:35 To: Pascoe, Stephen (STFC,RAL,SSTD); [email protected] Subject: RE: Problems running cdat-lite: can't find libnetcdf.so.0 Hi Stephen, I think I *was* on 6.0alpha3 (at least, that's the version number in the egg's filename). This seems to be what is grabbed automatically from easy_install cdat-lite. ldd netCDF4.so seems to give the "right answer": libnetcdf.so.0 => /usr/local/netcdf4/lib/libnetcdf.so.0 (0x00d5d000) libhdf5_hl.so.6 => /usr/local/hdf5/lib/libhdf5_hl.so.6 (0x00f14000) libhdf5.so.6 => /usr/local/hdf5/lib/libhdf5.so.6 (0x00927000) However, ldd Cdunif.so shows that it's looking for a non-existent NetCDF library (although it gets the location of libhdf5 correct): libhdf5_hl.so.6 => /usr/local/hdf5/lib/libhdf5_hl.so.6 (0x00110000) libhdf5.so.6 => /usr/local/hdf5/lib/libhdf5.so.6 (0x0013d000) libnetcdf.so.0 => /usr/lib/libnetcdf.so.0 (0x0076d000) This, I guess, explains why it only works when I create a symlink from /usr/lib/libnetcdf.so.0 to the real location at /usr/local/netcdf4/lib/libnetcdf.so.0. Hope this helps diagnose the problem, Jon -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: 17 January 2011 10:23 To: [email protected]; [email protected] Subject: RE: Problems running cdat-lite: can't find libnetcdf.so.0 Hi Jon, Linking problems are by far the most common issue I hear about cdat_lite and unfortunately I don't spend enough time in the codebase to fully understand the reasons. Most of our deployments are still NetCDF3 where it's less of a problem. First try with 6.0.alpha-3. There was a bug with the ordering of HDF5 libraries in the build script that I fixed in that release. Assuming you still get the problem. I think the fact you can make it work by symbolically linking to /usr/lib suggests ld isn't looking in the right place. Take a look at what libraries ldd think's it's linking these libraries to ... $ ldd .../python2.x/site-packages/netCDF4.so $ ldd .../python2.x/site-packages/Cdunif.so You should see libnetcdf.so, linhdf5.so and libhdf5_hl.so referenced in both outputs and they should be pointing to the same library location. If not please send me the output. Cheers, Stephen. ________________________________________ From: Jon Blower [[email protected]] Sent: 14 January 2011 17:26 To: [email protected] Cc: Pascoe, Stephen (STFC,RAL,SSTD) Subject: Problems running cdat-lite: can't find libnetcdf.so.0 Hi all (esp. Stephen I guess), I have a puzzling problem with CDAT-lite. I've installed Python 2.7.1 and the latest NetCDF4 and HDF5 libs on my CentOS 5.2 box. The libraries are in /usr/local/netcdf4 and /usr/local/hdf5. I've installed the prerequisites for CDAT-lite and "successfully" installed cdat-lite itself with ./easy_install cdat-lite This installs a version 6.0alpha or something with no error messages. I set the environment variables beforehand to tell the installer where to find the NetCDF and HDF libraries. When I run Python and enter "import cdms2" I get a message saying that it can't find the shared library libnetcdf.so.0. It works fine if I copy or symlink this library into /usr/lib. However, I *can* run netcdf4-python (http://code.google.com/p/netcdf4-python/) successfully (without the symlink), implying that the OS can indeed find the shared library. Why should cdat-lite not be finding it? BTW, the system knows about the shared libraries through ldconfig. I'm not using LD_LIBRARY_PATH. Thanks, Jon P.S. What's even weirder is that I think it did actually work once, then stopped working. -- Scanned by iCritical. -- Scanned by iCritical. -- Scanned by iCritical. -- Scanned by iCritical. _______________________________________________ NDG-technical mailing list [email protected] http://lists.ncas.ac.uk/mailman/listinfo/ndg-technical
