[MacPorts] #60904: ncplot @2020-02-21_1: Overlinking

MacPorts noreply at macports.org
Mon Jul 27 03:59:20 UTC 2020


#60904: ncplot @2020-02-21_1: Overlinking
---------------------------+----------------------
  Reporter:  Dave-Allured  |      Owner:  mf2k
      Type:  enhancement   |     Status:  assigned
  Priority:  Low           |  Milestone:
 Component:  ports         |    Version:
Resolution:                |   Keywords:
      Port:  ncplot        |
---------------------------+----------------------

Comment (by Dave-Allured):

 That Makefile appeared to be somewhat old and unrefined, so I was
 suspicious.  I checked the code two different ways for zlib dependency.  I
 could not find any recognizable references to zlib headers or functions.
 Also I tried omitting `-lz` from the link command, and that gave a working
 executable with no complaints.

 I suspect that in your case, `-lz` was in your linker formula via the
 makefile patch, before checking the result with `otool`.  My guess is that
 this forces `/opt/local/lib/libz.*.dylib` to be visible, regardless of
 whether the application actually has any direct reference.  You might try
 omitting `-lz` and see if you get a good executable.

 My test setup is a little different than yours.  I am working with a down
 level Macports setup, thanks in part to Covid.  I am compiling `ncplot`
 stand-alone rather than with `port install`.  I do not see how any of that
 would make a difference for this particular dependency, but I suppose it
 is possible.

 {{{
 ~/3rd/ncplot/0725 32> otool -L ncplot
 ncplot:
   /opt/local/lib/libXm.4.dylib (compatibility version 5.0.0, current
 version 5.4.0)
   /opt/local/lib/libXt.6.dylib (compatibility version 7.0.0, current
 version 7.0.0)
   /opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current
 version 10.0.0)
   /opt/local/lib/libnetcdf.15.dylib (compatibility version 15.0.0, current
 version 15.0.0)
   /opt/local/lib/libgsl.23.dylib (compatibility version 25.0.0, current
 version 25.0.0)
   /opt/local/lib/libpng16.16.dylib (compatibility version 53.0.0, current
 version 53.0.0)
   /opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0,
 current version 7.25.0)
   /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
 1252.250.1)
   /opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0,
 current version 1.0.0)
 }}}

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


More information about the macports-tickets mailing list