Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96187 - sci-libs/netcdf dependency for sci-libs/hdf causes conflict
Summary: sci-libs/netcdf dependency for sci-libs/hdf causes conflict
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-15 08:45 UTC by Robin Princeley
Modified: 2005-10-01 14:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
trivial patch to remove netcdf dependency (hdf-remove-netcdf.patch,309 bytes, patch)
2005-09-21 19:37 UTC, Markus Dittrich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Princeley 2005-06-15 08:45:49 UTC
The sci-libs/hdf library defines functions found in sci-libs/netcdf library
causing linking conflicts. netcdf library is not required to compile hdf (mfhdf
includes headers,etc. that it needs). Therefore netcdf should not be required by
HDF. Also this is not easy to catch because it compiles fine and only causes
problems at runtime when the wrong function gets linked / called.

This causes problems with other applications and libraries higher up, such as GDAL.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Markus Dittrich (RETIRED) gentoo-dev 2005-09-21 19:37:18 UTC
Created attachment 68982 [details, diff]
trivial patch to remove netcdf dependency

The netcdf dependencies are indeed not required by hdf. 

Unfortunately, I don't quite understand what you mean by "the sci-libs/hdf
library defines functions found in sci-libs/netcdf library causing linking
conflicts". 
Do you mean that the hdf binaries link to netcdf libaries when they 
shouldn't? They don't on my system. Also, I don't seen any conflict in
installed library names between hdf and netcdf and hence don't see any linking
conflict
either. Could you please clarify. Thanks!
Comment 2 Robin Princeley 2005-09-22 04:10:09 UTC
I have problems with non-portage applications that support both, their 
configure scripts detect both libraries and attempt to use them together 
(libmfhdf.so and libnetcdf.a). These libraries export the same netcdf functions 
causing linking errors (using netcdf functions from libmfhdf.so instead of 
libnetcdf.a). 
 
But this is unexpected - since I didn't specify 'netcdf' in my USE flags I 
don't expect it to be present on my system. 
 
Comment 3 Markus Dittrich (RETIRED) gentoo-dev 2005-09-22 12:43:24 UTC
If you can assure that no other portage package on your system
pulls in netcdf (scientific python comes to mind) the removal of netcdf as 
dependency of hdf should solve your problem. In the long run, however,
you might consider fixing the configure/makefiles of you non-portage
application to link to the proper library; e.g. via presence/absence of
-lnetcdf or linking in /path/to/libmfhdf.so.
Comment 4 Olivier Fisette (RETIRED) gentoo-dev 2005-10-01 14:32:25 UTC
I removed the dependency. This should solve your problem if you do not need    
netcdf on your system. Otherwise, as Markus said, you will have to patch other    
programs to link to the correct library.