Gentoo Archives: gentoo-dev

From: Javier Villavicencio <the_paya@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Mozilla, pthread libs, and Gentoo/FreeBSD.
Date: Wed, 07 Mar 2007 13:43:05
Message-Id: 45EEC0C4.4080003@gentoo.org
In Reply to: Re: [gentoo-dev] Mozilla, pthread libs, and Gentoo/FreeBSD. by Timothy Redaelli
1 Timothy Redaelli wrote:
2 > Javier Villavicencio wrote:
3 >> Hello,
4 >>
5 >> A bit of background first:
6 >> Currently firefox-2* and seamonkey-1.1.1 doesn't build on
7 >> Gentoo/FreeBSD. The main reason is that upstream (I think) has 'fixed'
8 >> how the pthread lib has to be linked, and now it needs -lc to link
9 >> successfully. This little issue is easily solvable the same way as it's
10 >> done by the FreeBSD ports patches [1].
11 >>
12 >> The next issue (having the above one fixed) is that the resulting binary
13 >> (firefox or seamonkey's -bin) is linked against libc_r.so.6 *and*
14 >> libpthread.so.2 (which are two of the thread implementations available
15 >> in FreeBSD).
16 >
17 > No, actual firefox-bin is only linked with libpthread.so.2 (directly
18 > with -lpthread)
19 > # wget
20 > ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/firefox.tbz
21 > # mkdir firefox ; tar xjf firefox.tbz -C firefox
22 > # scanelf -nR . | grep c_r
23 >
24 Nice to know, by the way i was talking about g/fbsd there not vanilla
25 freebsd. (I don't have an install yet, i was using a friend's server to
26 try some gcc tests).
27
28 BUT!!, why 'our' mozilla tries to link against libc_r.so.6 then? afaics
29 we do not touch the 'selection' of the threading library, and i haven't
30 seen anything besides the GECKO_PTHREADS_LIBS, and even if I pass that
31 variable (with -lpthread) to make our build still uses libc_r.so.6.
32 And why the only way to make it work is by remapping libpthread.so.2 to
33 libc_r.so.6, or (as I have experimented) by removing libpthread.so.2
34 from the linkage? Or is this also being done in some wrapper on vanilla
35 fbsd?
36
37 Besides this, what's your suggestion? make all mozilla ebuilds patch
38 accordingly to avoid libc_r and use libpthread alone?
39 --
40 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Mozilla, pthread libs, and Gentoo/FreeBSD. Timothy Redaelli <drizzt@g.o>