From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10215 Path: news.gmane.org!not-for-mail From: Andrei Pozolotin Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl ldd: swt build: Error relocating / symbol not found Date: Thu, 23 Jun 2016 19:42:44 +0000 Message-ID: <576C3BB4.3010307@gmail.com> References: <576B58E6.6040400@gmail.com> <20160623042448.GX10893@brightrain.aerifal.cx> <576C02C2.7070006@gmail.com> <20160623171008.GY10893@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1466711019 24787 80.91.229.3 (23 Jun 2016 19:43:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jun 2016 19:43:39 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10228-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 23 21:43:18 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bGAWz-0004xB-8p for gllmg-musl@m.gmane.org; Thu, 23 Jun 2016 21:43:17 +0200 Original-Received: (qmail 18179 invoked by uid 550); 23 Jun 2016 19:43:14 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 18155 invoked from network); 23 Jun 2016 19:43:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=ngiblEao46h7UxrZ9IhMe8HmUyIWoQBPbdX+VMLFUBs=; b=LjPz0E1JFL4sxzx72HYRrTcozcxaHJHwbJidKgjf//RtbDhvpWhXiWIlvKoUkGCYWa ibqLXxowFDI5Z9E9DAkCE+GX8FU/IDZ9bsGklSNarIT/fQ7ZfOJrq49NLJssJAuj8nHk MOatrGs660q0LzZPd7QhtD/Kly2pkihU4cq2q2AF/QlH3gNNxM5EHuN/FPSUlpfS29MT lbJyGrWbS8Gg/qBeyRHjDSaaKPmewPb7UxsksjNgfFLzGs1LF3g5De4+XRrU4mWy07Wa 9mRFEVrx4tJ9I+NYKY23f3GZ3U0Y99faqMdrTjC03Rrlbj0sUvEDel02FxX8XPEkd9Sx DUrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ngiblEao46h7UxrZ9IhMe8HmUyIWoQBPbdX+VMLFUBs=; b=MfYJiP+cjyRS3Aj8JvAlsTXj9sWMbcI0eQUeDYjjJnVFTrzcYDDPzVV812yJ8iRbkg Wci6/UWslUQch6svWP0RhD+UekLJvBsttJZvx6lf6GPGAYMsX9t/TAYhTi3cWZtMjsYg 0ar6uuPl4pS1OuQCccq5CIwX7QAc4bXeB5U1DSIiBLMrC+AaMugPVhIgMD87JAlfIutP XI1zxE7g+8f26LkV0KjXyQYPnZd0WqbJthAr3Tt9A1thgE2DawLER+9shb4HRJTS1Q4o srFhQdo/guoaICK1eO1ooBHXF5vfbzb2/FrTWyJCW4C6raokcUZ3CiaJMwCUGoW6w9bj 5FVw== X-Gm-Message-State: ALyK8tJXyf1TYp9fs+UJBtpblP0+GtciljNRZFKf573+JxeM7cjTouwFHzVmgcKQPbm9Gg== X-Received: by 10.107.20.10 with SMTP id 10mr2530201iou.15.1466710981560; Thu, 23 Jun 2016 12:43:01 -0700 (PDT) X-Google-Original-From: Andrei Pozolotin X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <20160623171008.GY10893@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:10215 Archived-At: 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?