[MacPorts] #51152: netcdf @4.4.0_1: nc-config and netcdf.pc contain erroneous "-loptimized" and "-ldebug"
MacPorts
noreply at macports.org
Thu Apr 14 12:16:11 PDT 2016
#51152: netcdf @4.4.0_1: nc-config and netcdf.pc contain erroneous "-loptimized"
and "-ldebug"
--------------------------+-----------------------
Reporter: ryandesign@… | Owner: takeshi@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.99
Keywords: | Port: netcdf
--------------------------+-----------------------
Upgrading py27-netcdf4 to 1.2.3.1 fails for me with:
{{{
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-bundle -undefined dynamic_lookup -isysroot / -L/opt/local/lib
-Wl,-headerpad_max_install_names -L/opt/local/lib/db48 -arch x86_64 -arch
x86_64 build/temp.macosx-10.11-x86_64-2.7/netCDF4/_netCDF4.o
-L/opt/local/lib -L/opt/local/lib -lnetcdf -lhdf5_hl -lhdf5 -lz -ldl
-loptimized -lm -ldebug -lmd -lcurl -o
build/lib.macosx-10.11-x86_64-2.7/netCDF4/_netCDF4.so
ld: library not found for -loptimized
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
}}}
This is coming from files installed by the netcdf port.
There aren't many references to this kind of problem on Google but I found
this:
http://stackoverflow.com/questions/18309438/cmake-differences-between-
linking-when-target-is-a-library-vs-executable
It seems to be saying the problem is quoting a cmake list variable, which
causes it to be interpreted as a string.
netcdf's configure output includes these occurrences of "optimized":
{{{
-- Found HDF5:
/opt/local/lib/libhdf5.dylib;/opt/local/lib/libz.dylib;/usr/lib/libdl.dylib;optimized;/usr/lib/libm.dylib;debug;/opt/local/lib/libmd.dylib;/opt/local/lib/libhdf5_hl.dylib;/opt/local/lib/libhdf5.dylib;/opt/local/lib/libz.dylib;/usr/lib/libdl.dylib;optimized;/usr/lib/libm.dylib;debug;/opt/local/lib/libmd.dylib
(found version "1.10.0")
}}}
And:
{{{
-- Linking against:
/opt/local/lib/libhdf5_hl.dylib;/opt/local/lib/libhdf5.dylib;/opt/local/lib/libz.dylib;/usr/lib/libdl.dylib;optimized;/usr/lib/libm.dylib;debug;/opt/local/lib/libmd.dylib;/opt/local/lib/libcurl.dylib
}}}
And finally:
{{{
Extra libraries: -lhdf5_hl -lhdf5 -lz -ldl -loptimized -lm -ldebug
-lmd -lcurl
}}}
--
Ticket URL: <https://trac.macports.org/ticket/51152>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list