Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541610 - www-client/chromium: NaCl (NativeClient) always disabled
Summary: www-client/chromium: NaCl (NativeClient) always disabled
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 5 votes (vote)
Assignee: Chromium Project
Depends on:
Reported: 2015-02-28 10:14 UTC by Pacho Ramos
Modified: 2017-06-06 17:16 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---

A patch to add NaCl use flag for chromium-43.0.2357.65 (enable_nacl.patch,1.37 KB, patch)
2015-05-23 23:46 UTC, Kelvin Ng
Details | Diff
chromium-51.0.2704.63.ebuild with nacl support (chromium-51.0.2704.63.ebuild,21.67 KB, text/plain)
2016-06-09 19:57 UTC, Garry Filakhtov
Patch for enabling NaCl in chromium-53.0.2785.92.ebuild (chromium-53.0.2785.92.patch,2.72 KB, patch)
2016-09-08 01:54 UTC, Garry Filakhtov
Details | Diff
chromium 53.0.2785.143 ebuild patch for enabling NaCL (chromium-53.0.2785.143-nacl.patch,18.53 KB, patch)
2016-10-13 12:29 UTC, Garry Filakhtov
Details | Diff
NaCl patch for chromium-54.0.2840.59 (chromium-54.0.2840.59.patch,20.02 KB, patch)
2016-10-24 08:11 UTC, Garry Filakhtov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2015-02-28 10:14:15 UTC
But I don't follow why it's disabled, I see this in ebuilds:
	# Disable nacl, we can't build without pnacl (
	myconf+=" -Ddisable_nacl=1"

	# Disable glibc Native Client toolchain, we don't need it (bug #417019).
	# myconf+=" -Ddisable_glibc=1"

	# TODO: also build with pnacl
	# myconf+=" -Ddisable_pnacl=1"

Why cannot both (pnacl and nacl) be disabled/enabled at the same time with an unique USE flag (to save build time if desired)?

Thanks for the info :)
Comment 1 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2015-03-03 18:17:51 UTC
Last time I checked it just didn't work.
Comment 2 Pacho Ramos gentoo-dev 2015-03-15 19:56:24 UTC
was this reported or similar to upstream? (to know if something was improved before trying to re-emerge chromium with that options to test again :/)
Comment 3 Kelvin Ng 2015-05-23 03:53:20 UTC
(In reply to Paweł Hajdan, Jr. from comment #1)
> Last time I checked it just didn't work.

It does not work only because the ebuild is wrong. It works if the ebuild is fixed according to
Comment 4 Kelvin Ng 2015-05-23 23:46:34 UTC
Created attachment 403856 [details, diff]
A patch to add NaCl use flag for chromium-43.0.2357.65

The patch adds NaCl use flag for chromium-43.0.2357.65.
Comment 5 Garry Filakhtov 2016-06-09 19:57:35 UTC
Created attachment 437022 [details]
chromium-51.0.2704.63.ebuild with nacl support

This is latest stable ebuild with nacl flag included to enable building of native client for chromium.
Comment 6 Garry Filakhtov 2016-09-08 01:54:51 UTC
Created attachment 445178 [details, diff]
Patch for enabling NaCl in chromium-53.0.2785.92.ebuild

Patch for updated chromium version (53.0.2785.92).
Comment 7 Pacho Ramos gentoo-dev 2016-09-17 10:31:00 UTC
Can this finally be included please? Thanks
Comment 8 Mike Gilbert gentoo-dev 2016-09-17 13:10:44 UTC
The patches that have been provided so far call in src_prepare. Downloading binaries in a src function would be an obvious QA violation, and wont even work with network-sandbox enabled.

Two options:

1. Add the toolchain binaries to SRC_URI and extract them in the right place.

2. Create an ebuild to build/install the necessary toolchain, as we have done in the past.
Comment 9 Garry Filakhtov 2016-09-17 13:18:40 UTC
Hey Mike,

Thanks for the hint. Are you suggesting to install toolchain on the host as a separate package and put it as a dependency for building chromium? Or are you suggesting to have an additional SRC_URI in chromium ebuild and doing necessary preps in src_unpack and src_prepare?

Comment 10 Mike Gilbert gentoo-dev 2016-09-17 17:43:01 UTC
(In reply to Garry Filakhtov from comment #9)

Yes, those are exactly the two options I presented.

Option 2 only really makes sense if we are building the toolchain from source.
Comment 11 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2016-09-22 05:11:51 UTC
(In reply to Pacho Ramos from comment #7)
> Can this finally be included please? Thanks

Curious, what's your use case? I admit I felt somewhat discouraged to work on it since it seems nacl didn't get much usage.

Ideally we'd build the toolchain from source, and I believe Fedora has managed to do so (

We could also consider generating a tarball with downloaded binary toolchains upstream and using that - it's way easier than compiling entire toolchain from source. In that case I believe the corresponding USE flag should be masked.
Comment 12 Ben Sagal 2016-09-22 05:14:51 UTC
I found that uploading images at does not work without NaCl
Comment 13 Garry Filakhtov 2016-09-22 08:29:33 UTC
Hey guys,

I'm currently working on getting a proper ebuild, including URLs with binary upstream toolchain and unpack routines.

I need nacl for several chrome apps, including chrome remote desktop app.

As for building from source - it doesn't feel right, as it is only needed for building chromium and building chromium itself takes a lot of time. If we will build toolchain in addition to that it would take eternity!

So at the moment, whenever I have free time, am working on getting necessary arch-dependent upstream toolchain packages and properly extracting them and then starting build process. Not much progress, but I have some strategy to keep maintenance/updating of the ebuild easier.
Comment 14 Pacho Ramos gentoo-dev 2016-09-22 18:41:12 UTC
Also Videostream extension requires it
Comment 15 Garry Filakhtov 2016-10-13 12:29:10 UTC
Created attachment 450080 [details, diff]
chromium 53.0.2785.143 ebuild patch for enabling NaCL

Hello Ladies and Gentlemen,

I have finally finished my work on proper ebuild implementation for NaCL support.

I have created src_unpack() function that in addition to extracting chromium package itself takes care of symlinking metadata and toolchain binary archives into native_client/toolchain/.tars/{linux_x86,package_archives} respectively.

At a very next step I'm using, but only extract function. You can safely do emerge --fetchonly, disconnect internet and build chromium offline from cached source files.

As a nice bonus all ARM and MIPS binaries are ignored to save space and speed-up downloading phase.

Logic inside of src_unpack() is done in a way that, if necessary to add new toolchain in addition to that already is used (pnacl_translator, pnacl_newlib and nacl_x86_newlib) you can easily do so by including respective files into SRC_URI and that's it. src_unpack() will find proper revision hashes and toolchain directories to place your new files to.

I'm open for the feedback and hope we can get this into main tree soon.

Comment 16 Garry Filakhtov 2016-10-24 08:11:18 UTC
Created attachment 451292 [details, diff]
NaCl patch for chromium-54.0.2840.59

Hi every1,

It appears that we switched to GN builds following the upstream decision, which is great.

I've created another patch for latest stable version of Chromium: 54.0.2840.59

There is one caveat, though: nacl bootstrap toolchain is using clang ignoring all and any flags, so I had to create a patch to fix that issue.

Everything necessary is provided in my patch, please, review and give me any suggestions/corrections.

Thanks in advance. Hope to see NaCl chromium in portage tree soon!
Comment 17 Andrew Udvare 2017-01-13 22:59:40 UTC
Is there a patch for the latest versions?
Comment 18 Garry Filakhtov 2017-01-13 23:40:28 UTC
Hi Andrew,

Sorry, but I've gave up doing patches for every single version, because maintainers are not interested in integrating that change it seems.
Comment 19 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2017-06-06 17:16:38 UTC
Note .