Using rpath on executable link with Insure++

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in Insure++
use of rpath in executables
rpath on .so and executables

Insure++ 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


  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    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

    With a space after the -rpath but if you specify it like

    $ insure g++ -Bdynamic -Wl,-rpath,. -Wl,-rpath,../lib myobject.o -o


    $ insure g++ -Bdynamic -Wl,-rpath=. -Wl,-rpath=../lib myobject.o -o

    with either a comma or an = sign it will probably take care of it
Sign In or Register to comment.