Opened 8 weeks ago

Closed 8 weeks ago

#70467 closed defect (fixed)

openEMS uses incorrect paths for linking dylibs

Reported by: barracuda156 Owned by: ra1nb0w
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: eborisch (Eric A. Borisch)
Port: openEMS

Description

The port it doing a strange thing with dylibs and I got no idea where this comes from:

/opt/local/bin/g++-mp-14 -pipe -I/opt/local/libexec/boost/1.76/include -Os -DNDEBUG -I/opt/local/libexec/boost/1.76/include -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -DNO_WARN_X86_INTRINSICS -DSSE_CORRECT_DENORMALS -arch ppc -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/libexec/boost/1.76/lib -L/opt/local/lib -Wl,-headerpad_max_install_names CMakeFiles/nf2ff_bin.dir/main.cpp.o -o nf2ff   -L/opt/local/lib/libhdf5.dylib  -L/opt/local/lib/libMacportsLegacySupport.dylib  -L/opt/local/lib/libsz.dylib  -L/opt/local/lib/libz.dylib  -L//usr/lib/libdl.dylib  -L//usr/lib/libm.dylib  -Wl,-rpath,/opt/local/lib/libhdf5.dylib -Wl,-rpath,/opt/local/lib/libMacportsLegacySupport.dylib -Wl,-rpath,/opt/local/lib/libsz.dylib -Wl,-rpath,/opt/local/lib/libz.dylib -Wl,-rpath,//usr/lib/libdl.dylib -Wl,-rpath,//usr/lib/libm.dylib libnf2ff.0.1.0.dylib /opt/local/lib/libtinyxml.dylib /opt/local/lib/libhdf5.dylib /opt/local/lib/libMacportsLegacySupport.dylib /opt/local/lib/libsz.dylib /opt/local/lib/libz.dylib //usr/lib/libdl.dylib //usr/lib/libm.dylib /opt/local/libexec/boost/1.76/lib/libboost_thread-mt.dylib /opt/local/libexec/boost/1.76/lib/libboost_system-mt.dylib /opt/local/libexec/boost/1.76/lib/libboost_date_time-mt.dylib /opt/local/libexec/boost/1.76/lib/libboost_serialization-mt.dylib /opt/local/libexec/boost/1.76/lib/libboost_chrono-mt.dylib /opt/local/libexec/boost/1.76/lib/libboost_atomic-mt.dylib
ld: warning: path '/opt/local/lib/libhdf5.dylib' following -L not a directory
ld: warning: path '/opt/local/lib/libMacportsLegacySupport.dylib' following -L not a directory
ld: warning: path '/opt/local/lib/libsz.dylib' following -L not a directory
ld: warning: path '/opt/local/lib/libz.dylib' following -L not a directory
ld: warning: path '//usr/lib/libdl.dylib' following -L not a directory
ld: warning: path '//usr/lib/libm.dylib' following -L not a directory

The build succeeds despite this mess, but perhaps it should be still addressed.

Change History (4)

comment:1 Changed 8 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: eborisch added

openEMS doesn't depend on libMacportsLegacySupport, libsz, or libz, but hdf5 does, and openEMS depends on hdf5, so I suspect hdf5 is telling the openEMS build to link with these things, which is overlinking, which should be fixed in the hdf5 port.

For each of the libraries, the build is using both a nonsensical -L path like -L/opt/local/lib/libhdf5.dylib and a nonsensical -rpath like -Wl,-rpath,/opt/local/lib/libhdf5.dylib, followed by the correct /opt/local/lib/libhdf5.dylib, so all the libraries are being linked to. The nonsensical arguments just need to go away.

comment:2 Changed 8 weeks ago by ryandesign (Ryan Carsten Schmidt)

I believe the reason for the incorrect library flags is:

https://github.com/thliebig/openEMS/blob/1ccf0942477e9178b27f5e00dddd4d62bff78d29/CMakeLists.txt#L118

link_directories(${HDF5_LIBRARIES})

${HDF5_LIBRARIES} contains a list of libraries, of course, not a list of directories.

A bug should be filed with the developers of openEMS.

comment:3 in reply to:  2 Changed 8 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

A bug should be filed with the developers of openEMS.

https://github.com/thliebig/openEMS/pull/145

comment:4 Changed 8 weeks ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 6d0b1741a7a70153648ea127f94c051d8e52f290/macports-ports (master):

openEMS: Fix wrong library path linker warnings

Closes: #70467

Note: See TracTickets for help on using tickets.