Page MenuHomeFreeBSD

Convert lang/gjs and lang/spidermonkey24 to USES=compiler:c++11-lib
ClosedPublic

Authored by truckman on Apr 29 2015, 7:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 21 2024, 3:13 AM
Unknown Object (File)
Feb 21 2024, 3:13 AM
Unknown Object (File)
Feb 20 2024, 10:59 PM
Unknown Object (File)
Feb 8 2024, 4:25 AM
Unknown Object (File)
Feb 5 2024, 1:32 AM
Unknown Object (File)
Jan 31 2024, 12:29 PM
Unknown Object (File)
Dec 19 2023, 11:53 PM
Unknown Object (File)
Dec 8 2023, 10:07 AM
Subscribers
None

Details

Reviewers
kwm
mat
Summary

lang/gjs and lang/spidermonkey24 are currently built with
USES=compiler:c11. On FreeBSD 8, this causes them to be
compiled with clang from ports, and on FreeBSD 9, they are
built with clang from base. In both cases, they are linked
to libstdc++ from base.

These two ports are dependencies of x11-fm/sushi, which also
depends on webkit-gtk3, which is compiled with
USES=compiler:c++11-lib. On FreeBSD 8 and 9 webkit-gtk3 is
compiled with gcc from ports and linked to its newer bundled
libstdc++. Sushi is compiled with gcc from base and consists
of pure C code, so it does not link directly to libstdc++.
The build fails because ld links in the base version of libstdc++
before it links in webkit-gtk3, and then discovers that the
newer libstdc++ ABI needed by webkit-gtk3 is missing.

Converting sushi to USES=compiler:c++11-lib does not fix
the build failure, and just changes the error message, probably
because sushi does not directly link to any version of libstdc++.
If sushi is further hacked to force it to link directly to the
newer version of libstdc++ bundled with the gcc port, the build
succeeds, but the resulting executable segfaults inside libstdc++
with a stack trace that traverses a bunch of functions contained
in the gjs and spidermonkey24 libraries.

Converting gjs and spidermonkey24 to USES=compiler:c++11-lib
forces them to be compiled with the ports version of gcc on
FreeBSD 8 and 9 and link to its bundled libstdc++ (and is a no-op
on FreeBSD 10 and higher). Because these libraries are linked
into sushi before webkit-gtk3, they load the version of libstdc++
which meets the requirements of webkit-gtk3, and the resulting
executable is functional. No modifications to sushi are necessary.

See:

		<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196078>
		<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199434>
		<https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199435>

MFH: 2015Q2 ?

Test Plan

Since these libraries are used by other ports, build x11/gnome3
on FreeBSD 8, 9, and 10. Test gnome3, including sushi, on FreeBSD 8.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

truckman retitled this revision from to Convert lang/gjs and lang/spidermonkey24 to USES=compiler:c++11-lib.
truckman updated this object.
truckman edited the test plan for this revision. (Show Details)
truckman added reviewers: mat, kwm.
mat edited edge metadata.

Does it apply to the other spidermonkey ports too ?

This revision is now accepted and ready to land.Apr 29 2015, 10:01 AM
In D2396#43826, @mat wrote:

Does it apply to the other spidermonkey ports too ?

Unknown, but I don't think so. I don't have anything installed that requires the others,
but according to INDEX, nothing that uses the other versions links to webkit-gtk*.

kwm edited edge metadata.

This was committed back in april in revision: 385016.