Hello, On Thu, 30 Mar 2017, Xing wrote:
It seems that -rpath option will not work in chroot enviroment because gcc is not configued with --with-sysroot in openSUSE and thereore -DCMAKE_SKIP_RPATH should always be set to ON. Anyway the new build works and the original problems seems to be caused by some uninstalled libraries from previous builds.
On 03/27/2017 05:03 PM, Stefan Bruens wrote:
On Montag, 27. März 2017 20:34:06 CEST Xing wrote:
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
First: it's '%{_libdir}', not {%_libdir}. The latter should IIRC get expanded to e.g. '{/usr/lib64}'. Which might actually work but is wrong. Second: -Wl, ... are linker flags and irrelevant while compiling (and thus C(XX)FLAGS). You need to look at LDFLAGS. And yes, cmake is a pretty borked makesystem. As are all. Well, no, all are borked but cmake is about the worst, and autotools still the best, at the least autotools is selfcontained. A configure from 10, 15, 20 years ago should still run and work. It might not quite exactly be doing what you'll want it to. But that can easily be patched. As exemplified by dozens of packages in the official SUSE tree. And no, I have no .spec in my (large) osc tree that mangles LDFLAGS with cmake. Maybe -DCMAKE_LD_FLAGS='-Wl,...' or something? There might be some patching CMakeFiles.txt to achive that, that a) I don't want to search for stuff like that and b) it just goes to show. And c) a lot of stuff could only be patched in system cmake-files or copying those from who knows where and then patching. *gah* As I've said: cmake is borked (beyond repair). Who'd 'a thunk one'd love autotools... Being self-contained and working even out of decades old tarballs, and easy to grep through configure*s and Makefile*s ... Beware of "autoreconf" on those cases though, unless you know how to fix changes. It's easy though, normally. -dnh -- Error: File not found -- search behind couch? (Y/N) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org