Re: Current status of OpenBSD BEAST



Nedko Arnaudov <nedko.arnaudov@atia.com> writes:

> Tim Janik <timj@gtk.org> writes:
>
>> On Mon, 29 Dec 2003 chris.wareham@btopenworld.com wrote:
>>
>>> Tim Janik <timj@gtk.org> wrote:
>>> >
>>> > how do other packages that come with libraries or link against
>>> > libraries deal with this on bsd?
>>> >
>>>
>>> Inform the linker where to automatically look for libraries. For
>>> instance, if Beast is going to be installed into /usr/local, then
>>> the following would be passed to the linker via gcc:
>>>
>>> -Wl,-R/usr/local/lib
>>
>> why isn't libtool taking care of this automatcially on BSDs then?
>
> /usr/local/lib IS included in standard search path for shared
> libraries. Also LD_LIBRARY_PATH is an option unless beast is set-user-ID
> and set-group-ID executable. If this is libtool issue, it may be realted
> to recent switch to ELF OpenBSD executables. If so, 1.3.5p3 version of
> libtool (OpenBSD ports) is likely to have fixes for it. I'll check if
> 1.3.5p3 works.

Here is what I've found so far:

# objdump -p cvs/cvs.gnome.org/gnomeweb/beast/beast-gtk/.libs/beast 

cvs/cvs.gnome.org/gnomeweb/beast/beast-gtk/.libs/beast:     file format elf32-i386

Program Header:
    PHDR off    0x00000034 vaddr 0x1c000034 paddr 0x1c000034 align 2**2
         filesz 0x00000160 memsz 0x00000160 flags r-x
  INTERP off    0x00000194 vaddr 0x1c000194 paddr 0x1c000194 align 2**0
         filesz 0x00000013 memsz 0x00000013 flags r--
    LOAD off    0x00000000 vaddr 0x1c000000 paddr 0x1c000000 align 2**12
         filesz 0x00097294 memsz 0x00097294 flags r-x
    LOAD off    0x00098000 vaddr 0x3c000000 paddr 0x3c000000 align 2**12
         filesz 0x0005783c memsz 0x0005783c flags r--
    LOAD off    0x000f0000 vaddr 0x3c058000 paddr 0x3c058000 align 2**12
         filesz 0x000014f0 memsz 0x000014f0 flags rw-
    LOAD off    0x000f14f0 vaddr 0x3c05a4f0 paddr 0x3c05a4f0 align 2**12
         filesz 0x00001174 memsz 0x00001174 flags rw-
    LOAD off    0x000f2680 vaddr 0x3c05c680 paddr 0x3c05c680 align 2**12
         filesz 0x00000000 memsz 0x00000620 flags rw-
 DYNAMIC off    0x000f1328 vaddr 0x3c059328 paddr 0x3c059328 align 2**2
         filesz 0x000001c8 memsz 0x000001c8 flags rw-
    NOTE off    0x000001a8 vaddr 0x1c0001a8 paddr 0x1c0001a8 align 2**2
         filesz 0x00000018 memsz 0x00000018 flags r--

Dynamic Section:
  NEEDED      ../bsw/.libs/libbsw.so.6.0
  NEEDED      libbse-0.5.so.6.0
  NEEDED      /usr/local/lib/libvorbisfile.so.3.0
  NEEDED      /usr/local/lib/libvorbisenc.so.2.0
  NEEDED      /usr/local/lib/libvorbis.so.2.0
  NEEDED      /usr/local/lib/libogg.so.4.0
  NEEDED      /usr/local/lib/libmad.so.1.0
  NEEDED      libestdc++.so.5.5
  NEEDED      ../sfi/.libs/libsfi.so.6.0
  NEEDED      /usr/local/lib/libgthread-2.0.so.0.10
  NEEDED      libpthread.so.2.1
  NEEDED      libossaudio.so.2.0
  NEEDED      libz.so.2.0
  NEEDED      /usr/local/lib/libgnomecanvas-2.so.200.1
  NEEDED      /usr/local/lib/libart_lgpl_2.so.5.14
  NEEDED      /usr/local/lib/libpangoft2-1.0.so.0.9
  NEEDED      /usr/local/lib/libgtk-x11-2.0.so.0.12
  NEEDED      /usr/local/lib/libgdk-x11-2.0.so.0.12
  NEEDED      libXinerama.so.2.0
  NEEDED      libXext.so.7.0
  NEEDED      /usr/local/lib/libatk-1.0.so.0.5
  NEEDED      /usr/local/lib/libgdk_pixbuf-2.0.so.0.12
  NEEDED      /usr/local/lib/libpangoxft-1.0.so.0.9
  NEEDED      libXft.so.3.0
  NEEDED      libfreetype.so.10.0
  NEEDED      libXrender.so.2.1
  NEEDED      libfontconfig.so.1.0
  NEEDED      /usr/local/lib/libpangox-1.0.so.0.9
  NEEDED      libX11.so.7.0
  NEEDED      /usr/local/lib/libpango-1.0.so.0.9
  NEEDED      /usr/local/lib/libgobject-2.0.so.0.10
  NEEDED      /usr/local/lib/libgmodule-2.0.so.0.10
  NEEDED      /usr/local/lib/libglib-2.0.so.0.10
  NEEDED      /usr/local/lib/libintl.so.1.1
  NEEDED      /usr/local/lib/libiconv.so.3.0
  NEEDED      libm.so.1.0
  NEEDED      libc.so.30.1
  RPATH       /usr/local/lib:/usr/local/lib/.
  HASH        0x1c0001c0
  STRTAB      0x1c00ab40
  SYMTAB      0x1c003090
  STRSZ       0xbc7d
  SYMENT      0x10
  DEBUG       0x0
  PLTGOT      0x3c05a4f0
  PLTRELSZ    0x22b0
  PLTREL      0x11
  JMPREL      0x1c016840
  REL         0x1c0167c0
  RELSZ       0x80
  RELENT      0x8

----------------------
As seen from NEEDED entries some of libraries are looked up at relative
paths, some at absolute paths and some in default paths. All libraries
to be found are actually available in /usr/lib and /usr/local/lib

I think all NEEDED entries should be without paths and RPATH could
contain /usr/lib and /usr/local/lib but may be only later. Other option
to use newly installed beast libraries is to run ldconfig -R by hand.

I've checked beast-gtk/beast which is script than enables to run beast
before installation. It adds the right .libs directories in
LD_LIBRARY_PATH so if executables does not contain paths to libraries
everythink should work ok.

Now the actual quiestion. Does anybody knows why beast executables have
relative or absolute paths in their dynamic section (NEEDED
entries) ?

And also why /usr/local/lib is included twice in RPATH entry ? 

-- 
Nedko Arnaudov




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]