Opened 5 years ago

Closed 4 years ago

#51152 closed defect (worksforme)

netcdf @4.4.0_1: nc-config and netcdf.pc contain erroneous "-loptimized" and "-ldebug"

Reported by: ryandesign (Ryan Schmidt) Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: Cc:
Port: netcdf


Upgrading py27-netcdf4 to fails for me with:

/Applications/ -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/
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:

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") 


-- 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

Change History (2)

comment:1 Changed 4 years ago by tenomoto (Takeshi Enomoto)

I can't reproduced the problem. I updated netcdf in r147800 and r147988, but even with r147494 I don't get these libraries. Could you try again with the current port and upload main.log if you still find the problem?

comment:2 Changed 4 years ago by ryandesign (Ryan Schmidt)

Resolution: worksforme
Status: newclosed

I can't reproduce this either anymore.

Note: See TracTickets for help on using tickets.