I also used plain "cmake". If I do not add "-DCMAKE_SKIP_RPATH=ON", the following error will occur: [ 124s] CMake Error at src/cmake_install.cmake:60 (file): [ 124s] file RPATH_CHANGE could not write new RPATH: [ 124s] [ 124s] /usr/lib64 [ 124s] [ 124s] to the file: [ 124s] [ 124s] /home/abuild/rpmbuild/BUILDROOT/openbabel-2.4.1-1.5.x86_64/usr/lib64/libopenbabel.so.5.0.0 [ 124s] [ 124s] No valid ELF RPATH or RUNPATH entry exists in the file; [ 124s] Call Stack (most recent call first): [ 124s] cmake_install.cmake:75 (include) [ 124s] [ 124s] [ 124s] make: *** [Makefile:117: install] Error 1 [ 124s] error: Bad exit status from /var/tmp/rpm-tmp.3Hqauh (%install) [ 124s] [ 124s] [ 124s] RPM build errors: [ 124s] Bad exit status from /var/tmp/rpm-tmp.3Hqauh (%install) [ 124s] [ 124s] helium failed "build openbabel.spec" at Mon Mar 27 20:38:45 UTC 2017. [ 124s] Therefore I have to use all of the three: "-DCMAKE_SKIP_RPATH=ON", "-DCMAKE_C_FLAGS="-Wl,-rpath={%_libdir}", "-DCMAKE_CXX_FLAGS=-Wl,-rpath={%_libdir}". It works when building directly but still no RUNPATH or RPATH when using "osc build..." Best wishes, Xing On 03/27/2017 03:15 PM, Dmitriy Perlow wrote:
Mon, 27 Mar 2017 21:34:06 +0300: Dear All, I'm trying to build and package openbabel. It needs the "RUNPATH" tag to run correctly or the "obabel" command will not find the plugin directories. Openbabel uses CMAKE and on OBS "-DCMAKE_SKIP_RPATH=ON" is set automatically by the %cmake marco. I can use "-DCMAKE_C_FLAGS="-Wl,-rpath={%_libdir}" and "-DCMAKE_CXX_FLAGS=-Wl,-rpath={%_libdir}" to force passing the flags to gcc and build with RUNPATH on my local computer directly (without using "osc build "). However it gcc will just ignore the "-Wl,-rpath" flag when I use "osc build" or the online building service and no RUNPATH information is written to the binary and .so files.
Does any one know why gcc behaves differently like this (invoke directly vs via OBS) and how to insert the "RUNPATH" information into the final .rpm files?
Hello.
Please try `cmake` instead `%cmake`. Afaik %cmake can be used only via rpmbuild by OBS/osc/hands.
Thanks and best wishes, Xing
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org