Subject: Re: Why do I need to add an entry into
To: None <>
From: Rich Neswold <>
List: port-i386
Date: 03/23/2005 15:08:59
On Wed, 23 Mar 2005 19:52:00 +0000 (UTC), Rui Paulo
<> wrote:
> When building packages, pkgsrc adds linker flags to gcc command line,
> so, when the program is executed, some library paths are hardcoded in
> ELF's .dynamic section:

I've been trying to create a package for omniORB. I'm to the point of
testing out the libraries, so I built the demo found in the
documentation. The link line for the demo is:

    g++ -g -R /usr/pkg/lib -L /usr/pkg/lib -o eg1 echoSK.o eg1.o \
        -lomniORB4 -lomnithread -lpthread

When I run the test app, I get:

    Shared object "" not found

Using your "objdump" example (partially) shows:

    Dynamic Section:
      RPATH       /usr/pkg/lib

Yet, omnithread did get installed:

$ ls -l /usr/pkg/lib/libomnithread*
-rw-r--r--  1 root  wheel    22208 Mar 22 21:35 /usr/pkg/lib/libomnithread.a
lrwxr-xr-x  1 root  wheel       18 Mar 22 21:35
/usr/pkg/lib/ ->
lrwxr-xr-x  1 root  wheel       20 Mar 22 21:35
/usr/pkg/lib/ ->
-rwxr-xr-x  1 root  wheel    27699 Mar 22 21:35

Rereading this thread, I was reminded of the 'ldd' command. Running it
exposed this:

$ ldd eg1
         -lomnithread.3 => not found
         -lpthread.0 => /usr/lib/
         -lstdc++.5 => /usr/lib/
         -lm.0 => /usr/lib/
         -lm.0 => /usr/lib/
         -lgcc_s.1 => /usr/lib/
         -lomniORB4.0 => /usr/pkg/lib/
         -lc.12 => /usr/lib/
         -lomnithread.3 => /usr/pkg/lib/

omnithread is in the list twice! The first entry is "not found", so it
fails to load the executable. Maybe there's a dependency in the
omniORB4 library to the omnithread library... When I built the
package, the runtime path wasn't properly specified?

Anyone have any ideas?

Getting back to Mr. Pereira's original posting... does the wmswallow
project have several libraries that are dependant on each other?


AIM : rnezzy
ICQ : 174908475