Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What’s up with Firefox 57 and Clang?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Wed Nov 15, 2017 6:41 am    Post subject: What’s up with Firefox 57 and Clang? Reply with quote

It wasn't’ too long ago that FF had a rust dependency, and it wasn’t a big deal, but with the latest release, I was taken aback with all its new requirements.

I’ve been kinda-sorta following Chrome/Chromium development, and it seems they’ve moved over to Clang too.

Are we witnessing the slow demise of GCC? Is this going to be like the creeping advance of Systemd/Pulseaudo?

Remember how the Japanese auto industry just sort-of happened on Detroit? It was only with their grudging adaptation of new technologies that they stayed competitive, meanwhile their competitors stayed decades ahead for...decades.

Or maybe this isn’t an adversarial situation—perhaps this isn’t a zero-sum game.

But I sure enjoy the apocalyptic scenario this language paints! So: is this the fetid stench of the advancing hordes I smell? Do I need to sharpen my scythe!?!
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 724
Location: /home

PostPosted: Wed Nov 15, 2017 7:05 am    Post subject: Reply with quote

I was wondering the same. Found the following page,
https://developer.mozilla.org/en-US/docs/Using_CXX_in_Mozilla_code

seems like Firefox's codebase is better supported by Clang. They seem to use Clang to build Firefox on Arch and Fedora too at least. Might be Mozilla's decision that Gentoo cant do much about, other than obey...

I'd be willing to switch to Clang 100 % if it could build the current Linux kernel.
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Wed Nov 15, 2017 8:38 am    Post subject: Reply with quote

Thank you for the link, Juippisi.

I’m not against clang either. I do, however, find it interesting that after having purposefully installed it on my laptop for Chromecast/Chromium, now all-the-sudden my sturdy desktop (having never touched clang) sees it as a hard dependency for Firefox.

It’s as though there’s this mingling of everything.

I remember watching Johnny Mnemonic oh so many years ago thinking: “How cool would that be to have everything linked up to everything else? Hook me up!”

Alas, the now is just me scratching my chin at the latest Firefox update, wondering if clang is getting too tentacle-y. This is not the entertaining future I was promised.

Where is my post-apocalyptic wasteland? Where is my heroically intelligent dolphin? Where are the jacked-up street preachers? Where's my crazy lazer whip?

So many disappointments. Thanks for the letdown, Hollywood!
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1249

PostPosted: Thu Nov 16, 2017 12:06 pm    Post subject: Reply with quote

Juippisi, have you already build Firefox with Clang?
Back to top
View user's profile Send private message
thican
n00b
n00b


Joined: 09 Jul 2017
Posts: 8
Location: Earth

PostPosted: Thu Nov 16, 2017 12:10 pm    Post subject: Reply with quote

I think we might be mislead, see bug 637576.
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 724
Location: /home

PostPosted: Fri Nov 17, 2017 5:13 am    Post subject: Reply with quote

Perfect Gentleman wrote:
Juippisi, have you already build Firefox with Clang?


Nope, apparently not.

Code:

# cat /var/db/pkg/www-client/firefox-57.0/CC
x86_64-pc-linux-gnu-gcc


Might try it later.
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Fri Nov 17, 2017 5:29 am    Post subject: Reply with quote

I might try migrating my desktop over to Clang (as best can be done). It’s either that or play around with distcc. Or, you know, write this term paper that’s due tomorrow. But who wants to do that?

Clang it is—will report.

Also, thanks for the bug link, thican. Very enlightening!
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Fri Nov 17, 2017 7:24 am    Post subject: Reply with quote

Perfect Gentleman,

Just finished compiling FF 57 with the ~amd64 version of Clang on the stable branch of Gentoo:

Code:
cat /var/db/pkg/www-client/firefox-57.0/CC
clang


Code:
sudo qlop -gHltv firefox

firefox-57.0: Tue Nov 14 22:10:01 2017: 49 minutes, 13 seconds <-- with GCC 6.4.0
firefox-57.0: Thu Nov 16 23:54:23 2017: 1 hour, 0 seconds <-- with clang 5.0.0
 


That's not surprising--it took my poor little laptop quite a bit longer to compile Chromium with clang than it did with gcc too (about 6 hours longer).

As far as performance goes, it's too early to tell, but frankly, these seat-of-the-pants kind of things are more placebo-ish than anything else. Maybe I'll play around with the gold liker LTO thing-a-ma-bob later on.

But now that I've set Clang system wide, I'm now wondering if I should do an --emptytree, or run with scissors and just let things roll on...

Danger, Will Robinson
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1249

PostPosted: Fri Nov 17, 2017 7:51 am    Post subject: Reply with quote

unheatedgarage, what patches, switches, flags do you use with Clang?
As I understand there is issue with linking Hunspell
Code:
firefox: symbol lookup error: /usr/lib64/firefox/libxul.so: undefined symbol: _ZNK8Hunspell17get_dict_encodingEv
Back to top
View user's profile Send private message
unheatedgarage
n00b
n00b


Joined: 19 Sep 2016
Posts: 60

PostPosted: Fri Nov 17, 2017 8:41 am    Post subject: Reply with quote

Perfect Gentleman,

:oops: I'm just using the plain-jane desktop profile with this in my accept_keywords:

Code:
# 5 Nov 2017 Keep these testing--some temporarily--check back here occasionally
=games-simulation/flightgear-2017.2.1
www-client/firefox ~amd64
sys-devel/* ~amd64 # keep GCC and related testing
x11-themes/* ~amd64
xfce-base/* ~amd64
xfce-extra/* ~amd64
app-portage/* ~amd64 # all other things portage
sys-apps/portage ~amd64 # just for portage--don't worry about rest of sys-apps/*
media-libs/mesa ~amd64 # temp--masked newer versions--just to get firefox 57
media-sound/audacity ~amd64
sci-misc/boinc ~amd64


I’d be happy to show you my package.use, but good lord that’s even more of a mess, and probably not helpful?

Make.conf, perhaps?

I just followed the Clang tutorial and specifically here: https://wiki.gentoo.org/wiki/Clang#Global_configuration_via_make.conf

I did not mess with link-time optimizations—just the bare bones setup.

Happy to provide any info you need!
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1249

PostPosted: Fri Nov 17, 2017 9:35 am    Post subject: Reply with quote

Oh.
You use Clang globally, I'm not. That could be a reason of such Firefox behavior.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum