Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2017 08:20:20 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Derrick McKee <derrick.mckee@gmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Missing pthread support for custom libc
Message-ID:  <20170124082020.GA7873@spindle.one-eyed-alien.net>
In-Reply-To: <CAJoBWHw_hAXCn30VW3Qbk4GbhhHiyJWvten5CoSGKO4OWXooJg@mail.gmail.com>
References:  <CAJoBWHw_hAXCn30VW3Qbk4GbhhHiyJWvten5CoSGKO4OWXooJg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 24, 2017 at 01:20:54AM +0000, Derrick McKee wrote:
> Hi,
>=20
> I've compiled libc using a custom version of clang, and it seems to be
> missing pthread support.  When I try to compile Firefox and use my version
> of libc, I get the following error:
>=20
> checking for pthread_create in -lpthreads... no
> checking for pthread_create in -lpthread... no
[...]
> I've added -pthread to both CFLAGS and LDFLAGS when I compile libc, and y=
ou
> can see that it is included when I attempt to compile Firefox.  Any ideas
> on what I am missing?  Thanks.

Your clang's library search path clearly doesn't include a libpthread.
Adding -pthread to CFLAGS and LDFLAGS is unlikely to be to solution
since it just adds -lpthread to the link command which the generated
Makefile will do if it's found during configure.  Also, if you're using
-nostdlib to link your custom libc, it looks like -pthread simply does
nothing at all.

If you can find the clang command used to run the checks above in your
configure log, you may find the result of adding -### to the command
informative.

-- Brooks

--bp/iNruPH9dso1Pn
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJYhw5EAAoJEKzQXbSebgfAwbYH/RBLUKPpbxczB6pSQetzxFY0
AHN/RqzqzOVLZ94oisO101oIKzUcjtyOGUZlrm5HwZCqQvD0+yhoduMG6t8rccYV
RRR0JcfRhjxLYmZlgTCaDjiM1PTTKWhDeiLfHbLNY2Id1c/fTb2n5i2hgySvRtDt
eamSXHDRynuUUiDzWkGA952COJsMwbi/oLQVqDg1sgktVAGUdZBPasJav50qyr9A
8icYmdUD68+29dYmgfYsv4Ojarrut+PP6j7RA17XfdoMIz60fMBPudu4P1Jy1oC9
cmL2/41JIAXMz1pjKqI1GLJ3X7dogR2fhmh+fG7h+EaBD6K8g/6NQETR7+ug7IY=
=RN53
-----END PGP SIGNATURE-----

--bp/iNruPH9dso1Pn--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170124082020.GA7873>