<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>96187</bug_id>
          
          <creation_ts>2005-06-15 08:45 0000</creation_ts>
          <short_desc>sci-libs/netcdf dependency for sci-libs/hdf causes conflict</short_desc>
          <delta_ts>2005-10-01 14:32:25 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Library</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>princely@emirates.net.ae</reporter>
          <assigned_to>sci@gentoo.org</assigned_to>
          <cc>ribosome@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>princely@emirates.net.ae</who>
            <bug_when>2005-06-15 08:45:49 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>markusle@gentoo.org</who>
            <bug_when>2005-09-21 19:37:18 0000</bug_when>
            <thetext>Created an attachment (id=68982)
trivial patch to remove netcdf dependency

The netcdf dependencies are indeed not required by hdf. 

Unfortunately, I don&apos;t quite understand what you mean by &quot;the sci-libs/hdf
library defines functions found in sci-libs/netcdf library causing linking
conflicts&quot;. 
Do you mean that the hdf binaries link to netcdf libaries when they 
shouldn&apos;t? They don&apos;t on my system. Also, I don&apos;t seen any conflict in
installed library names between hdf and netcdf and hence don&apos;t see any linking
conflict
either. Could you please clarify. Thanks!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>princely@emirates.net.ae</who>
            <bug_when>2005-09-22 04:10:09 0000</bug_when>
            <thetext>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&apos;t specify &apos;netcdf&apos; in my USE flags I 
don&apos;t expect it to be present on my system. 
 </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>markusle@gentoo.org</who>
            <bug_when>2005-09-22 12:43:24 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ribosome@gentoo.org</who>
            <bug_when>2005-10-01 14:32:25 0000</bug_when>
            <thetext>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. </thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>68982</attachid>
            <date>2005-09-21 19:37 0000</date>
            <desc>trivial patch to remove netcdf dependency</desc>
            <filename>hdf-remove-netcdf.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvcG9ydGFnZS9zY2ktbGlicy9oZGYvaGRmLTQuMi4wLXIzLmVidWlsZAkyMDA1LTAx
LTI1IDIyOjA4OjQ2LjAwMDAwMDAwMCArMDAwMAorKysgL3Vzci9sb2NhbC9wb3J0YWdlL3NjaS1s
aWJzL2hkZi9oZGYtNC4yLjAtcjMuZWJ1aWxkCTIwMDUtMDktMjIgMDE6NDQ6MTIuMDAwMDAwMDAw
ICswMDAwCkBAIC0yMiw3ICsyMiw2IEBACiAKIERFUEVORD0ic3lzLWxpYnMvemxpYgogCQltZWRp
YS1saWJzL2pwZWcKLQkJc2NpLWxpYnMvbmV0Y2RmCiAJCT49c3lzLWFwcHMvc2VkLTQKIAkJc3pp
cD8gKCBzY2ktbGlicy9zemlwICkiCiAK
</data>        

          </attachment>
    </bug>

</bugzilla>