On Mon, 17 May 1999, Bernd Kreimeier wrote:
> Juergen Kreileder writes:
>
> >> I do not have the option to link against X11 libs directly.
> > That was my first solution...
>
> > With LD_PRELOAD all I have to do is
> > $ LD_PRELOAD="libXm.so" LD_BIND_NOW=true ./bug
>
> bash-2.01$ LD_PRELOAD="libXm.so" LD_BIND_NOW=true ./bug
> ./bug: error in loading shared libraries
> /opt/local/lib/libXm.so: undefined symbol: XtStrings
>
> > libXm.so is Metro Links' Motif 2.1 library.
>
> Which I do not have. Frankly, it is nice of Metro to donate
> their Motif for building, but if that's supposed to say I have
> to buy it to get JDK to work, I am not too enthusiastic. What
> is the problem with Lesstif?
>
>
> > $ ldd /usr/X11R6/lib/libXm.so
>
> bash-2.01$ ldd /opt/local/lib/libXm.so
> libc.so.6 => /lib/libc.so.6 (0x40164000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
Here is what I use for the preload.
(Motif)
LD_PRELOAD="libXm.so libXpm.so libXt.so libSM.so libICE.so libXext.so
libX11.so"
(LessTif)
LD_PRELOAD="libXt.so libXm.so libXext.so"
later
mo
> Hmmm. Maybe that's the problem with Lesstif. Guess I have to
> take a closer look at a more recent release, and the way it
> links. Anybody been down this road already?
>
>
> > $ ldd ./bug
>
> libjava.so
> => /opt/local/java/jdk/lib/i586/native_threads/libjava.so (0x40010000)
> libc.so.6 => /lib/libc.so.6 (0x40075000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x4011c000)
> libm.so.6 => /lib/libm.so.6 (0x40129000)
> libdl.so.2 => /lib/libdl.so.2 (0x40142000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> and no way to change this. In reality, it is even worse:
> I want to create a DLL that is loaded by an application
> with the following fixed linkage:
>
> libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40010000)
> libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x400b3000)
> libdl.so.2 => /lib/libdl.so.2 (0x400c1000)
> libm.so.6 => /lib/libm.so.6 (0x400c4000)
> libc.so.6 => /lib/libc.so.6 (0x400dd000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> This app will do dlopen("bug"), effectively. I have to link
> bug.so against libXm.so and libjava.so, and have to preload
> them when starting an application that doesn't use them.
>
> > The preload of libjava.so should not be necessary with v2/v3
> > because I've added an ld lock.
>
> OK. I got another bug program to test that ;-).
>
>
> b.
>
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]