Using rpath on executable link with Insure++
use of rpath in executables
rpath on .so and executablesInsure++ Version 7.0.1 (build 2004-10-30)
Linux 2.4.20-8, RH9
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
I am trying to build an application which uses .so and includes an rpath in the link. The flags in question are -Wl,-rpath . -Wl,-rpath ../lib .
When insure attempts this link, it errors out with:
.: file not recognized: Invalid argument
collect2: ld returned 1 exit status
How do I fix this to allow the rpath in the executable? The compile call starts like this:
insure g++ -DNDEBUG -O1 -DACE_NDEBUG -DENABLE_CA_SDK -pipe -w -fPIC -D_REENTRANT=1 -DLINUX=1 -DCALLPBUILD -Bdynamic -Wl,-rpath . -Wl,-rpath ../lib
0
Comments
it specified like
$ insure g++ -Bdynamic -Wl,-rpath . -Wl,-rpath ../lib myobject.o -o libfoo.so
With a space after the -rpath but if you specify it like
$ insure g++ -Bdynamic -Wl,-rpath,. -Wl,-rpath,../lib myobject.o -o libfoo.so
Or
$ insure g++ -Bdynamic -Wl,-rpath=. -Wl,-rpath=../lib myobject.o -o libfoo.so
with either a comma or an = sign it will probably take care of it