[ncl-install] Problems build ncl 6.4.0 on Archlinux

David Brown dbrown at ucar.edu
Tue May 16 14:29:56 MDT 2017


Hi Xavier,
Try adding this patch to NclNewHDF5.c. I think it may fix your problem.

 -dave

On Mon, May 15, 2017 at 10:18 PM, David Brown <dbrown at ucar.edu> wrote:
> Xavier,
> As is, the NCL source code is built for version 1.8.x. To work with
> 1.10.x the code will need to be modified to include the extra argument
> as the error at 1499:19 states. But it can be built with the 1.10.x
> library if the
>  -DH5_USE_18_API is set.  I think the best policy would be to use
> whichever version your netcdf and gdal libraries use. If that is the
> 1.10 series, then you want to set things up such that the macro
> H5Rdereference gets defined as H5Rdereference1. There is also a more
> specific flag you could try: -DH5Rdereference_vers=1. Note that these
> are options to h5cc. I am not sure how this works with gcc.
>
>  -dave
>
> On Mon, May 15, 2017 at 8:31 PM, Xavier Corredor Llano
> <xcorredorl at unal.edu.co> wrote:
>> On Monday, 15 May 2017 20:18:15 -05 David Brown wrote:
>>> Hi Xavier and Kevin,
>>>
>>> H5Rdereference is defined in libhdf5. It is referenced but not defined in
>>> libhdf5_hl.
>>>
>>> One thing that might be related to this problem is the fact that in HDF5
>>> 1.10.x H5Rdereference has become a macro that points to one of two
>>> different function signatures: H5Rdereference1 or H5Rdereference2,
>>> depending on various compiler flags and/or source code defines.
>>> H5dereference2 has one more argument and is the newer version intended for
>>> use with HDF5 1.10 and newer.
>>> If you were compiling against 1.8.x header files but linking against 1.10
>>> libraries, then that could be a scenario where H5Rdereference would show up
>>> as an undefined symbol. I'm not sure if this is a plausible explanation,
>>> but, if not, it is an interesting coincidence that this is one of only two
>>> cases where a function name was changed to a macro in the migration from
>>> 1.8.x to 1.10.x.
>>>
>>> See https://support.hdfgroup.org/HDF5/doc/RM/APICompatMacros.html
>>>
>>>  -dave
>>>
>>> On Mon, May 15, 2017 at 6:31 PM, Kevin Hallock <hallock at ucar.edu> wrote:
>>> > Hi Xavier,
>>> >
>>> > First of all, thank you for maintaining this package on the AUR. I use
>>> > Arch Linux at home, so it’s great to see someone supporting this!
>>> >
>>> > I tried makepkg’ing the PKGBUILD you provided, but I encountered the same
>>> > H5Rdereference error. I noticed that the hdf5_18 package is listed as a
>>> > dependency, and then noticed that /usr/lib/hdf5_18 does not include
>>> > libhdf5_hl.so. Someone reported this for a previous version of hdf5_18,
>>> > but
>>> > it doesn’t appear to have been fixed since then: https://bugs.archlinux.
>>> > org/task/51902
>>> >
>>> > I also found that the newer hdf5 package was installed as a dependency for
>>> > both gdal and netcdf, with its libs and includes directly in /usr/lib and
>>> > /usr/include (as opposed to /usr/{lib,include}/hdf5_18 for hdf5_18); the
>>> > libs and includes seem to be duplicated between the two packages (except
>>> > the libhdf5_hl.so* files mentioned above), so I wonder if perhaps having
>>> > both of these installed is causing a conflict?
>>> >
>>> > Also, I noticed that the Site.local you provided has “
>>> > -I/usr/include/hdf5_18” in IncSearch, but no corresponding “
>>> > -L/usr/lib/hdf5_18” in LibSearch. I tried adding “-L/usr/lib/hdf5_18”,
>>> > but the build still failed.
>>> >
>>> > For what it’s worth, /usr/lib/hdf5_18/libhdf5.so *does* seem have a
>>> > reference to H5Rdereference:
>>> > $ nm -D /usr/lib/hdf5_18/libhdf5.so | grep H5Rdereference
>>> > 000000000016cfb0 T H5Rdereference
>>> >
>>> > I hope this helps!
>>> > Kevin
>>> >
>>> > PS - I currently run NCL 6.4.0 on Arch using conda: http://ncl.ucar.edu/
>>> > Download/conda.shtml
>>> >
>>> > On May 15, 2017, at 3:06 PM, Xavier Corredor Llano
>>> > <xcorredorl at unal.edu.co>
>>> > wrote:
>>> >
>>> > hi everyone,
>>> >
>>> > I'm the maintainer of the NCL packages for Archlinux [1], I have some
>>> > issues for build the new version 6.4.0, the error is:
>>> >
>>> > NclNewHDF5.o: In function `_checkH5attribute':
>>> > NclNewHDF5.c:(.text+0x2818): undefined reference to `H5Rdereference'
>>> > NclNewHDF5.c:(.text+0x3552): undefined reference to `H5Rdereference'
>>> > NclNewHDF5.o: In function `_region2string':
>>> > NclNewHDF5.c:(.text+0x4c89): undefined reference to `H5Rdereference'
>>> > NclNewHDF5.o: In function `_mem2string':
>>> > NclNewHDF5.c:(.text+0x4de1): undefined reference to `H5Rdereference'
>>> > NclNewHDF5.o: In function `_readH5dataInfo':
>>> > NclNewHDF5.c:(.text+0x64aa): undefined reference to `H5Rdereference'
>>> > collect2: error: ld returned 1 exit status
>>> > make[4]: *** [Makefile:707: ncl] Error 1
>>> > make[4]: Leaving directory '/build/ncl/src/ncl_ncarg-6.4.0/ni/src/ncl'
>>> >
>>> > using hdf5 version 1.8.18, the build instructions (PKGBUILD) and completed
>>> > build log can found in [2].
>>> >
>>> > Thanks for any help!
>>> >
>>> > Xavier
>>> >
>>> > [1] https://aur.archlinux.org/packages/ncl/
>>> > [2] https://drive.google.com/drive/folders/0B2KQf7Dbx7DUNkZXRVRwOEVLcm8__
>>> > _____________________________________________
>>> > ncl-install mailing list
>>> > List instructions, subscriber options, unsubscribe:
>>> > http://mailman.ucar.edu/mailman/listinfo/ncl-install
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > ncl-install mailing list
>>> > List instructions, subscriber options, unsubscribe:
>>> > http://mailman.ucar.edu/mailman/listinfo/ncl-install
>>
>> Hi Kevin and David!
>>
>> Thanks for your help, but not build yet. I tried build ncl with hdf5 1.10.0
>> (disabling hdf-eos5 because it not build with this version) and the error is:
>>
>> NclNewHDF5.c:1499:55: error: incompatible type for argument 3 of
>> ‘H5Rdereference2’
>>       dataset_id = H5Rdereference(attr_id, H5R_OBJECT, &rbuf[i]);
>>                                                        ^
>> NclNewHDF5.c:1499:19: error: too few arguments to function ‘H5Rdereference2’
>>       dataset_id = H5Rdereference(attr_id, H5R_OBJECT, &rbuf[i]);
>>
>> My question here is if ncl is compatible with hdf5 1.10.x, I think that Kevin
>> is right if build ncl using hdf5 1.8.x while some dependencies (like gdal,
>> netcdf) are built with 1.10.x version, and it maybe causing a conflict.
>>
>> Regards,
>> Xavier CLL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hdf5.patch
Type: application/octet-stream
Size: 265 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-install/attachments/20170516/dffc6f6d/attachment.obj 


More information about the ncl-install mailing list