Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 29 Apr 2014 17:40:06 -0400
From: "" <>
Subject: Re: static musl-based gdb and -fPIC

On 04/20/2014 04:31 PM, Rich Felker wrote:
> On Sun, Apr 20, 2014 at 01:03:12PM -0400,  wrote:
>> Greetings,
>> While building a statically linked musl-based gdb, ld asked that
>> libc.a be recompiled with -fPIC.
> This is a bug in the gdb build process. Despite your request for a
> static gdb, it's trying to build a shared library for something.
> There's a way to disable it (IIRC --disable-gdbserver is a big hammer
> that can do it, and there might be a more fine-grained approach) but
> the real issue is that the build process is broken and doing something
> that can't work.

> Rich
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 (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/ 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 

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,


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.