Closed tigerfoot closed 6 years ago
/tmp/b/dll/laszip_api.c:964: undefined reference to `dlopen'
LASzip needs to find/link CMAKE_DL_LIBS
.
Ok didn't realize on first look.
With adjusted parameters the build works now
%cmake \
-DCMAKE_C_FLAGS="%{optflags} -fno-strict-aliasing -fPIE -pie" \
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -fno-strict-aliasing -fPIE -pie" \
-DCMAKE_CXX_FLAGS="%{optflags} -fno-strict-aliasing -fPIE -pie" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -fno-strict-aliasing -fPIE -pie" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -Wl,--no-as-needed -ldl"
Hi, during the refresh of openSUSE package, I'm facing build error (in linking). If I build it locally without any flags, the build finished correctly, but I'm not allowed to remove all the flags used by default on the distribution (or at least I need a solid explanation, not hurting also security guys ;-)
Here the process, flags used and the failing
If there's any tests of try you would like to see, don't hesitate to ask. (I've tried the the following patch commit 0bf1c60 6602717 8e1feba without more success)