mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Andrei Pozolotin <andrei.pozolotin@gmail.com>
To: musl@lists.openwall.com
Subject: Re: musl ldd: swt build: Error relocating / symbol not found
Date: Thu, 23 Jun 2016 19:42:44 +0000	[thread overview]
Message-ID: <576C3BB4.3010307@gmail.com> (raw)
In-Reply-To: <20160623171008.GY10893@brightrain.aerifal.cx>

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?



  reply	other threads:[~2016-06-23 19:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23  3:35 Andrei Pozolotin
2016-06-23  4:24 ` Rich Felker
2016-06-23 15:39   ` Andrei Pozolotin
2016-06-23 17:10     ` Rich Felker
2016-06-23 19:42       ` Andrei Pozolotin [this message]
2016-06-23 23:15         ` Szabolcs Nagy
2016-06-24 16:23           ` Andrei Pozolotin
2016-06-24 17:03             ` Rich Felker
2016-06-24 17:17               ` Alexander Monakov
2016-06-24 17:30                 ` Andrei Pozolotin
2016-06-24 21:41                 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=576C3BB4.3010307@gmail.com \
    --to=andrei.pozolotin@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).