Re: Building PyNIO on RHEL 5.3

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 10 Sep 2009 09:27:47 -0600 (MDT)

Hi Pat,

This symbol is defined by the HDF-EOS2 library.

Did you set:

    setenv HAS_HDFEOS 1

If so, then you need to build the HDF-EOS2 library. See:

   http://www.pyngl.ucar.edu/Download/build_pynio_from_src.shtml#HDFEOS2

If you do have the HDF-EOS2 library, then check to see if it has this
symbol:

   nm libhdfeos.a | grep SWdiminfo

If it doesn't, then perhaps this library wasn't built correctly or
completely. If you don't need HDF-EOS2 support, then don't
set the above environment variable.

--Mary

On Wed, 9 Sep 2009, Allen, Pat wrote:

> Hi Mary,
>
> Thank you for your patience and your help on this. Changing the F2CLIBS from g2c to gfortran did get rid of that one. Now I'm getting:
>
> [root_at_elvis PyNIO-1.3.0b1]# python
> Python 2.4.3 (#1, Jul 16 2009, 06:21:14)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import Nio
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "Nio.py", line 61, in ?
> from nio import *
> ImportError: /usr/lib/python2.4/site-packages/PyNIO/nio.so: undefined symbol: SWdiminfo
>>>>
>
> Is this part of the HDF package? Any suggestions what I should look for? Again, I apologize for taking so much of your time on this.
>
> Pat
>
>
>
> -----Original Message-----
> From: Mary Haley [mailto:haley_at_ucar.edu]
> Sent: Wednesday, September 09, 2009 1:41 PM
> To: Allen, Pat
> Cc: pyngl-talk_at_ucar.edu
> Subject: RE: [pyngl-talk] Building PyNIO on RHEL 5.3
>
> Pat,
>
> You are linking against gfortran-compiled libraries, and the compile
> needs help finding the gfortra
>
> n library (libgfortran.so) to
> resolve some symbols.
>
> Do you have gfortran on your system? If so, try this:
>
> setenv F2CLIBS gfortran
>
> Be sure to remove the build directory before you start up the
> "python setup.py install" command.
>
> If the build says it can't find "-lgfortran", then you'll need to
> additionally set:
>
> setenv F2CLIBS_PREFIX /path/to/gfortranlib
>
> where "/path/to/gfortranlib" needs to be replaced by
> the directory that contains "libgfortran.so".
>
> For example on our of our systems, it is:
>
> setenv F2CLIBS_PREFIX /usr/lib/gcc/i386-redhat-linux/4.1.1
>
> --Mary
>
> On Wed, 9 Sep 2009, Allen, Pat wrote:
>
>> Hi Mary,
>>
>> Some progress. I had set the HAS_NETCDF4 environment variable but I wonder if the presence of the build directory was causing the software not to build. This time, after removing the build directory, I get::
>>
>> [root_at_elvis PyNIO-1.3.0b1]# python
>> Python 2.4.3 (#1, Jul 16 2009, 06:21:14)
>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import Nio
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> File "Nio.py", line 61, in ?
>> from nio import *
>> ImportError: /usr/lib/python2.4/site-packages/PyNIO/nio.so: undefined symbol: _gfortran_concat_string
>>>>>
>>
>> I've attached the output of the build to this email.
>> Thanks!
>> Pat
>>
>> -----Original Message-----
>> From: Mary Haley [mailto:haley_at_ucar.edu]
>> Sent: Wednesday, September 09, 2009 12:08 PM
>> To: Allen, Pat
>> Cc: pyngl-talk_at_ucar.edu
>> Subject: RE: [pyngl-talk] Building PyNIO on RHEL 5.3
>>
>> Pat,
>>
>> It's possible there's just an ordering problem with the libraries.
>> Did you also do the following:
>>
>> setenv HAS_NETCDF4 1
>>
>> I assume you don't want GRIB2 or HDF-EOS2 support.
>>
>> To answer your final question below:
>>
>> Initially you asked for the full output from the build. Is this
>> with "python -v setup.py install" or is there some other information
>> that would be helpful.
>>
>> Yes, this is the information that would be helpful, and could you
>> remove the "build" directory before doing this so I get the full build
>> output?
>>
>> Thanks,
>>
>> --Mary
>>
>>
>> On Wed, 9 Sep 2009, Allen, Pat wrote:
>>
>>> Hi Mary,
>>>
>>> Thanks for the pointers. I've been rebuilding everything this morning to make sure that I have everything the way that the documentation expects it. I had previously installed each package in their own directory under /usr/local but wondered if that might have been part of the problem. But here's the rundown on what I've done:
>>>
>>> 1. Rebuilt glib:
>>> ./configure --prefix=/usr/local
>>> 2. Rebuilt szip:
>>> ./configure --prefix=/usr/local --disable-shared
>>> 3. Rebuilt HDF4:
>>> ./configure --prefix=/usr/local --with-zlib=/usr/local --with-szlib=/usr/local \
>>> --includedir=/usr/local/include/hdf --disable-netcdf
>>> 4. Rebuilt HDF5:
>>> ./configure --with-zlib=/usr/local --with-szlib=/usr/local --prefix=/usr/local \
>>> --disable-shared
>>> 5. Rebuilt NetCDF-4.0.1:
>>> ./configure --with-hdf5=/usr/local --with-zlib=/usr/local --with-szlib=/usr/local \
>>> --prefix=/usr/local --disable-f90 --enable-netcdf-4
>>> 6. Rebuilt PyNIO:
>>> python setup.py install
>>>
>>> When I try to import Nio, I still get:
>>>
>>> [root_at_elvis PyNIO-1.3.0b1]# python
>>> Python 2.4.3 (#1, Jul 16 2009, 06:21:14)
>>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>> import Nio
>>> Traceback (most recent call last):
>>> File "<stdin>", line 1, in ?
>>> File "Nio.py", line 61, in ?
>>> from nio import *
>>> ImportError: /usr/lib/python2.4/site-packages/PyNIO/nio.so: undefined symbol: SZ_BufftoBuffCompress
>>>>>>
>>>
>>> Initially you asked for the full output from the build. Is this with "python -v setup.py install" or is there some other information that would be helpful.
>>>
>>> Thanks again for all the help!
>>> Pat
>>>
>>>
>>> -----Original Message-----
>>> From: Mary Haley [mailto:haley_at_ucar.edu]
>>> Sent: Wednesday, September 09, 2009 7:48 AM
>>> To: Allen, Pat
>>> Cc: pyngl-talk_at_ucar.edu
>>> Subject: RE: [pyngl-talk] Building PyNIO on RHEL 5.3
>>>
>>>>
>>>> On Wed, 9 Sep 2009, Allen, Pat wrote:
>>>>
>>>> Ahhh, perhaps I see the problem. I already had the NetCDF-4.0
>>>> libraries on the system so I ignored that section of the INSTALL
>>>> document. Your email mentioned the HDF5 libraries being required so I
>>>> went back and looked and noticed that those are required if you have
>>>> the NetCDF-4 libraries. So I'll build that and give it a try. But
>>>> before I do, I have a question regarding the HDF libraries. Will this
>>>> overwrite the HDF4.2 installation or do I need to be careful to
>>>> install them in separate places? The install document implies that
>>>> they both have a /usr/local prefix but the version 4 instructions have
>>>> special notes regarding the --includedir option.
>>>
>>> This is a good question, and you should be safe as is.
>>>
>>> The HDF5 build will not overwrite the HDF4 build. You still need
>>> to do the special "--includedir" part for the HDF4 build, but
>>> the HDF5 build should be done just as it is described at:
>>>
>>> http://www.pyngl.ucar.edu/Download/build_pynio_from_src.shtml#NetCDF4
>>>
>>> The HDF5 libraries all have "hdf5" as part of the name, and the
>>> include files are all prefixed with "H5"; hence no HDF4 or NetCDF
>>> files will be overwritten.
>>>
>>> --Mary
>>>
>>>> Hopefully this will take care of it.
>>>> Pat
>>>>
>>>> -----Original Message-----
>>>> From: Mary Haley [mailto:haley_at_ucar.edu]
>>>> Sent: Wednesday, September 09, 2009 7:04 AM
>>>> To: Allen, Pat
>>>> Cc: pyngl-talk_at_ucar.edu
>>>> Subject: Re: Building PyNIO on RHEL 5.3
>>>>
>>>> Hi Pat,
>>>>
>>>> Since you set HAS_NETCDF4 to 1, this implies that you want classic
>>>> NetCDF4 support. To build this into PyNIO requires the HDF5 libraries,
>>>> which in turn requires the szip library. So even though you
>>>> build HDF4 with compression off, you still need szip for the HDF5
>>>> libraries (it's not optional).
>>>>
>>>> The PyNIO build should be including "-lsz" on the compile line
>>>> already, so I'm surprised to see this undefined reference.
>>>>
>>>> Can you set the full output from the PyNIO build?
>>>>
>>>> Thanks,
>>>>
>>>> --Mary
>>>>
>>>>
>>>>
>>>> On Wed, 9 Sep 2009, Allen, Pat wrote:
>>>>
>>>>> Good morning! I've built PyNIO on RHEL 5.3:
>>>>> [root_at_elvis PyNIO-1.3.0b1]# python setup.py install
>>>>> ====> Installing Nio to the "PyNIO" site packages directory.
>>>>> running install
>>>>> running build
>>>>> running build_py
>>>>> copying ./pynio_version.py -> build/lib.linux-i686-2.4/PyNIO
>>>>> running build_ext
>>>>> running install_lib
>>>>> copying build/lib.linux-i686-2.4/PyNIO/pynio_version.py -> /usr/lib/python2.4/site-packages/PyNIO
>>>>> byte-compiling /usr/lib/python2.4/site-packages/PyNIO/pynio_version.py to pynio_version.pyc
>>>>> running install_data
>>>>>
>>>>> Unfortunately, I'm getting the following error when trying to import Nio:
>>>>> [root_at_elvis PyNIO-1.3.0b1]# python
>>>>> Python 2.4.3 (#1, Jul 16 2009, 06:21:14)
>>>>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
>>>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>>>> import Nio
>>>>> Traceback (most recent call last):
>>>>> File "<stdin>", line 1, in ?
>>>>> File "Nio.py", line 61, in ?
>>>>> from nio import *
>>>>> ImportError: /usr/lib/python2.4/site-packages/PyNIO/nio.so: undefined symbol: SZ_BufftoBuffCompress
>>>>>>>>
>>>>>
>>>>> Here's what my environment variables look like:
>>>>> F2CLIBS=g2c
>>>>> F2CLIBS_PREFIX=/usr/lib/gcc/i386-redhat-linux/3.4.6
>>>>> HAS_NETCDF4=1
>>>>> HDF_PREFIX=/usr/local/HDF
>>>>> NCARG_ROOT=/usr/local/ncl
>>>>> NETCDF4_PREFIX=/usr/local
>>>>>
>>>>> In googling "undefined symbol: SZ_BufftoBuffCompress", I've figured out that it's the szip libraries. The most relevant hit that I found indicated that it was due to building the HDF libraries with the --with-szlib option. I rebuilt the libraries without szlib support and reinstalled them and got the same error. I'm at a loss. The only thing that I didn't build from scratch was NCL. Does that rely on the szip libraries? Does it expect to find them in a standard location?
>>>>>
>>>>> Any help is GREATLY appreciated.
>>>>> THANKS!
>>>>> Pat
>>>>> _______________________________________________
>>>>> pyngl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>>>>>
>>>>
>>>
>>
>
_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Thu Sep 10 2009 - 09:27:47 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 10 2009 - 15:06:39 MDT