Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <576C3BB4.3010307@gmail.com>
Date: Thu, 23 Jun 2016 19:42:44 +0000
From: Andrei Pozolotin <andrei.pozolotin@...il.com>
To: musl@...ts.openwall.com
Subject: Re: musl ldd: swt build: Error relocating / symbol not found

Rich:

On 06/23/2016 05:10 PM, Rich Felker wrote:
>>> On Thu, Jun 23, 2016 at 03:35:02AM +0000, Andrei Pozolotin wrote:
>>>>     https://github.com/random-alpiner/repository/blob/master/bugs/01/1-app.log
>>>>     https://github.com/random-alpiner/repository/blob/master/bugs/01/2-ldd.log
>>>>     https://github.com/random-alpiner/repository/blob/master/bugs/01/3-readelf.log
>>>>     https://github.com/random-alpiner/repository/blob/master/bugs/01/4-strace.log
> OK so it looks like you're trying to run foreign glibc binaries with
> musl. That might or might not work, and in this case it seems to be
no, the intent not to use foreign glibc libraries at all.
but they do sneak in :-)
> not working. You really should be using a build of eclipse and all its
> libraries against musl rather than putting glibc-linked binaries on
> the system.
full eclipse build is large and heavy,
and "override native swt.so" approach worked for us in the past
>
>> * is there a way to tell musl ld.so to blacklist private path libraries?
> No, but you could just rm (or mv) them. But I suspect you'll still run
> into other problems. Support for using glibc-linked programs/libraries
> is inherently error-prone and really only intended for use in
> situations where you can't get a properly-built binary (e.g. Flash
> plugin).
>
> Rich
1) the "other" problems are fine, when we get to them :-)
we do intend to override all default eclipse glibc-linked libraries,
via approach described in this conversation, so that would not be an issue

2) we found a way to switch eclipse library loading logic to the following:
a) try to load public path (i.e.  provided musl libc dependent)
libraries - first
b) then try to load private path (i.t. bundled foreign libc dependent)
libraries - second

3) after the change in the loading logic, the trace now shows that:
https://github.com/random-alpiner/repository/blob/master/bugs/01/5-strace.log

libswt-* ---> ... ---> libgobject [g_type_check_class_cast] 

loading chain is now 100% pure musl libc only

4) nonetheless, we still have the "original contradiction problem":

a) the application error is bubbling up form the musl ld.so: "Error
relocating / symbol not found":

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
    /usr/lib/libswt-atk-gtk-4530.so: Error relocating /usr/lib/libswt-atk-gtk-4530.so: g_type_check_class_cast: symbol not found
    /home/work/space/none-4.5.0/conf/org.eclipse.osgi/748/0/.cp/libswt-atk-gtk-4530.so: Error relocating /home/work/space/none-4.5.0/conf/org.eclipse.osgi/748/0/.cp/libswt-atk-gtk-4530.so: g_type_interface_peek: symbol not found
    /usr/lib/libswt-atk-gtk-4530.so: Error relocating /usr/lib/libswt-atk-gtk-4530.so: g_type_check_class_cast: symbol not found


b) while at the same time musl ldd reporting that library dependency
tree is resolved with no error:

lddtree /usr/lib/libswt-atk-gtk-4530.so
libswt-atk-gtk-4530.so => /usr/lib/libswt-atk-gtk-4530.so (interpreter => none)
    libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0
            libffi.so.6 => /usr/lib/libffi.so.6
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0
            libpcre.so.1 => /usr/lib/libpcre.so.1
        libintl.so.8 => /usr/lib/libintl.so.8
    libc.musl-x86_64.so.1 => /lib/libc.musl-x86_64.so.1


5) so it seems we are indeed dealing with genuine musl ld.so issue?

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.