Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.
Using rpath on executable link with Insure++
LegacyForum
Posts: 1,664 ✭✭
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
-
A slight modification to the way the rpath is specified should take care of it you have
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 it0