On Mon, Apr 06, 2020 at 10:51:57PM -0500, Bruce Dubbs via lfs-dev wrote:
> Can someone remind me why we keep /usr/lib/libc.a around?
> 
> I was rebuilding grep-3.4 with pcre and it was segfaulting.  Upon
> investigation I find I had:
> 
> [ /build/grep/grep-3.4 ]$ ldd src/grep
>         linux-vdso.so.1 (0x00007ffded180000)
>         libpcre.so.1 => /lib/libpcre.so.1 (0x00007f38dd95e000)
>         libsigsegv.so.2 => /usr/lib/libsigsegv.so.2 (0x00007f38dd958000)
>         libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f38dd93e000)
>         libc.so.6 => /lib/libc.so.6 (0x00007f38dd77b000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f38dd9d4000)
> 
> I wondered why the heck libgcc_s.so.1 was there so I found that the build
> was linking in /usr/lib/libc.a.  Removing that fixed things up.
> 
>   -- Bruce

I think it might get used from time to time by tests, or when
building fully-static libraries.  Like most static libs mine is
normally renamed (libc.a.hidden in this case), but a quick look at
my current scripts doesn't find anything where I make it available.

For grep I've just run the following:

./configure --prefix=/usr --bindir=/bin
make

and
ken@origin /tmp/grep-3.4 $ldd src/grep
        linux-vdso.so.1 (0x00007ffe0a7b4000)
        libpcre.so.1 => /lib/libpcre.so.1 (0x00007fe15f089000)
        libc.so.6 => /lib/libc.so.6 (0x00007fe15ee96000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007fe15ee74000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fe15f123000)

I don't have libsigsegv on this new system at the moment.

On a 9.0 system where I do have libsigsegv:

ken@deluxe /tmp/grep-3.4 $ldd src/grep
        linux-vdso.so.1 (0x00007ffe55ae7000)
        libpcre.so.1 => /lib/libpcre.so.1 (0x00007fec26b78000)
        libsigsegv.so.2 => /usr/lib/libsigsegv.so.2 (0x00007fec26b72000)
        libc.so.6 => /lib/libc.so.6 (0x00007fec26980000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007fec2695d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fec26c15000)

So I have no idea why your build linked to libgcc_s.  I didn't
install either version, but the tests seemed ok (7 skipped without
libsigsegv, only 6 skipped with it).

ĸen
-- 
The beauty of reading a page of de Selby is that it leads one
inescapably to the conclusion that one is not, of all nincompoops,
the greatest.            -- du Garbandier
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to