Re: [MacPorts] #57733: netcdf: Ports linking with netcdf also link with hdf5—overlinking?

MacPorts noreply at macports.org
Thu Dec 20 03:08:14 UTC 2018


#57733: netcdf: Ports linking with netcdf also link with hdf5—overlinking?
-------------------------+----------------------
  Reporter:  ryandesign  |      Owner:  tenomoto
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:  netcdf      |
-------------------------+----------------------

Comment (by Dave-Allured):

 For static linking, I think you need to name all those libraries.  For
 dynamic linking, you are right, this is overlinking.  From Netcdf install
 docs:

 https://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html#linking

 {{{
 "For shared builds, only -L${NCDIR}/lib -lnetcdf is needed.
 All other libraries will be found automatically."
 }}}

 I am not familiar with pkg-config.  In scenarios like this, single library
 with many dependencies under the hood, what is best practice for use or
 non-use of pkg-config or nc-config in package make files, and in the port
 file?  I would imagine there is already a standard solution for this.

 Use of nc-config and pkg-config is currently being discussed here.  Feel
 free to ask about application to Macports:

 https://github.com/Unidata/netcdf-c/issues/1257

-- 
Ticket URL: <https://trac.macports.org/ticket/57733#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list