From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4992 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: static musl-based gdb and -fPIC Date: Tue, 29 Apr 2014 22:57:52 -0400 Message-ID: <20140430025752.GE26358@brightrain.aerifal.cx> References: <5353FDD0.6090903@midipix.org> <20140420203140.GA26358@brightrain.aerifal.cx> <53601C36.7050601@midipix.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1398826693 20962 80.91.229.3 (30 Apr 2014 02:58:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2014 02:58:13 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4996-gllmg-musl=m.gmane.org@lists.openwall.com Wed Apr 30 04:58:09 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WfKim-0005AP-M8 for gllmg-musl@plane.gmane.org; Wed, 30 Apr 2014 04:58:08 +0200 Original-Received: (qmail 17894 invoked by uid 550); 30 Apr 2014 02:58:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 17878 invoked from network); 30 Apr 2014 02:58:06 -0000 Content-Disposition: inline In-Reply-To: <53601C36.7050601@midipix.org> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:4992 Archived-At: On Tue, Apr 29, 2014 at 05:40:06PM -0400, writeonce@midipix.org wrote: > I built a static gdb (v7.7, passing --disable-gdbserver to > configure) and _thought_ that everything was fine. Then I checked > the build logs and saw that gdb refused to use the present libexpat, > libncurses/tinfo, and libpython. In the case of expat, at least, > the "solution" was easy, albeit unacceptable: temporarily break my > local system by renaming libexpat.so (so that gdb cannot find it). > But for ncurses and python that didn't work. > > It appears that expat is passed to the linker as a full path > (/full/path/to/libexpat.so) rather than normally (-lexpat), which > makes the whole thing break since there is no way to request a > static expat instead. Note, however, that this problem is not > musl-specific > (https://sourceware.org/ml/crossgcc/2013-06/msg00003.html). It's not clear at all to me from your email or from the linked thread who the passer in "is passed" might be. Is this something broken in gdb's build script, or expat's pkg-config or similar, or ct-ng, or something else? > At this point I am no longer seeking a solution (unless you have one > ready), but thought I should share this for the record. As an > aside, it looks like the static python interpreter is missing some > modules as well (see, for instance, > https://trac.torproject.org/projects/tor/ticket/7557). Static python is not very useful since most important python extensions are partly implemented as C code, which necessarily must be dynamically loaded. Rich