Chromium is now compiled using clang

chromium_iconIn my previous blog post about Chromium 62, I described the issues I had while attempting to compile it on Slackware14.2. The gcc compiler suite on Slackware 14.2 is “too old” for Chromium because it lacks the required C++11 support. More to the point, the Google developers use clang instead of gcc for their own compilations and therefore gcc support is becoming stale. Response by Google developers when they encounter a gcc-related bug report is to ‘please switch to clang’.

Unfortunately, as previously noted, the chromium build framework will download Google’s own clang binaries in that case. I do not trust these binaries on my Slackware computer. I stated that I would not switch to clang until it became possible to either use Slackware’s own clang or else compile Google’s clang from source on my own computer.

I exchanged a couple of emails with Google developers and got enough hints to convince me that compiling Google’s clang was possible.

And indeed, after a week of trial and error (especially the 32bit build gave me headaches) I managed to add all the needed bits and pieces to my chromium.SlackBuild.

The updated packages for Chromium (version 62.0.3202.75) for which the sources were released last week, are compiled with clang instead of gcc, and that clang has been compiled from source first. Of course, this adds time to the package build… every time I compile the chromium package, the SlackBuild script has to download and compile clang as well. But, the process is fully automated and a separate “gcc5” package is not needed on Slackware 14.2. Also, we are future-proof now. And an added bonus is that the package size has decreased substantially, from 65 to 56 MB (a 14% decrement).

Note about the new Chromium release: it addresses CVE-2017-15396 (Stack overflow in V8) so it will be good to upgrade.

If you want to compile chromium using gcc nevertheless (to decrease the total build time for instance) then all you need to do is: set the variable “USE_CLANG” to “0”.
On Slackware 14.2 you still need my gcc5 package and apply the instructions from my previous post.

The packages for chromium are available for Slackware 14.2 and -current in my repository or one of its mirrors:

Have fun! Eric

10 thoughts on “Chromium is now compiled using clang

  1. Very Nice, Eric.

    Installed and tested here.

    No issues given my use-case ( light use for certain sites which don’t “Like” PaleMoon ).

    Tested from command line — absolutely no output on stderr.

    Thank you !

    — kjh


  2. I am sure you have spent some time onthe clang builds. Thanks Eric look and see how that went with slackware i586 smiles.
    Owe that new cpu I am sure open some doors.
    If I had a dime for failed media builds with CEF3 I be rich.
    Great work


  3. Pingback: Google Pushes Chrome 63 Into Beta with Dynamic Module Imports, Devi… | Dr. Roy Schestowitz (罗伊)

  4. Pingback: Links 30/10/2017: Linux 4.14 RC7, Acumos, Free/Open Source Software as Philanthropy | Techrights


  5. Thank you very much for the ongoing effort to provide packages for 14.2-32.

    Just upgraded from chromium-62.0.3202.62-i586-1alien.txz to chromium-62.0.3202.75-i586-1alien.txz .

    But I do have found one problem for me. I’m using chromium to see netflix in germany. After the upgrade I’m not longer able to see netflix streams. I can surf on their website and select a film. But the screen stays black and never shows anything.

    After a downgrade back to the older version everything is fine again.

    happy halloween,
    have fun,
    Frank


  6. Frank I have no means to test and validate your issue. The only 32bit installation I have is inside a virtual machine and that does not play Netflix video regardless of the chromium version I install and try.


  7. Hello Eric!
    A question about C++11 not supported by the gcc shipped with Slackware 14.2:
    if you add the -std=c++11 flag to the compile flags (something like CFLAGS=”$SLKCFLAGS -std=c++11″) will it work to compile Chromium with gcc-5.3.0?



  8. Thank you for you fast reply. I tried to get some more info.

    Problem is partially solved for me.

    In the past I bought some films in the google play store. Logged in with my account I can still view them in the old and in the new chromium version. Debug info for youtube shows. Both are using “keySystem”: “com.widevine.alpha” for “status”: “output-restricted” successfully. I don’t know how to get the same information, while logged into netflix.

    I have enabled chrome://settings/content/protectedConten
    t

    So I started a new user with a fresh profile without any plugins/extensions.

    Alas, Netflix worked again!

    I nailed it down to an extension called disable-html5-autoplay URL https://github.com/Eloston/disable-html5-autoplay that can be found in the google chrome store.

    Funny thing is, I had already explicitly disabled this plugin for netflix and google play.

    looking for news on the github page…

    sad ending, this plugin seems to be no longer maintained by the author.

    sorry to have bothered you, but it is strange, the plugin has been working fine for me, up till the previous version without any hickups

    will have to find another “stop autoplay extension”

    thank you again for the help

    have fun and happy halloween
    cu Frank


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.