
On St 10-03-21 14:29:00, Gabriel F. T. Gomes wrote:
Hi, Libor...
You did everything right...
On Wed, 10 Mar 2021, Libor Pechacek wrote:
$ gcc -Wl,-rpath,. -L. -o main main.c -lworkload
^ ^ ... it is very unfortunate that you hit a usability bug. It would have worked if you had used $PWD instead of '.', such as:
$ gcc -Wl,-rpath,$PWD -L$PWD -o main main.c -lworkload
Indeed! Now it works! :)
Libpulp, more specifically ulp_trigger, currently ignores things that don't start with a foward slash. This is where it happens:
https://github.com/SUSE/libpulp/blob/master/tools/introspection.c#L384-L385
These lines should probably just go away (probably no side-effects).
I'm not sure. There is a good reason why "." should not be in $PATH. IMHO the same reasoning applies to -rpath as well. Anyway, trying to invoke 'main' from another directory fails, so I'd consider my -rpath setting flawed. I agree, however, that a warning from ulp_trigger would be useful when it encounters a library loaded from relative path. Alternativelu, it may have an option to enable patching libraries with relative paths, should anyone depend on such behavior. Thanks! Libor -- Libor Pechacek SUSE Labs Remember to have fun...