I created an ebuild to compile the Chromium browser from sources (to avoid "hacking" library symlinks as in https://bugs.gentoo.org/show_bug.cgi?id=272805). Please review it, and help me getting it into the tree. If you think I can, I have resources to become the maintainer of this package. I'm still working on publishing downloadable tarball with sources with each release. For now there is no such public tarball, but I hope that it will appear by the time I fix the issues pointed out in the ebuild review. I'm going to attach necessary files in a second...
Created attachment 199022 [details] chromium-3.0.195.1.ebuild
Created attachment 199024 [details] chromium-launcher.sh
# ebuild chromium-3.0.195.1.ebuild digest >>> Creating Manifest for /usr/local/portage/www-client/chromium # emerge www-client/chromium Calculating dependencies... done! >>> Verifying ebuild manifests >>> Emerging (1 of 1) www-client/chromium-3.0.195.1 from unknown repo * chromium-3.0.195.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... ... But the tar.bz2 downloaded is actually an HTML page...
See the source of the ebuild: SRC_URI="http://chromium.org/downloads/${P}.tar.bz2" # FIXME: does not exist It will take a bit of time to publish the source tarball. I'm working on it, and will post an update when it's available.
the ebuild ends up downloading the chrome html page as a .tar.bz2 and then failing to build.
Hi Pawel, that's good news! I hope the tarball will be soon available for testing. I'll be without internet connection for the next 2 weeks, but here a few quick comments: * AFAIK, the build process has hardcoded CFLAGS/LDFLAGS/..., including processor type, sse, ... For a good ebuild, these should honour the flags passed from portage. The ebuild in the THE overlay (not tested) has some code in src_prepare for that: http://git.zen-sources.org/?p=THE.git;a=blob;f=www-client/chromium/chromium-9999.ebuild;h=528e817f42f07031a4907ebfd2eb8892c3437112;hb=655ddc8aaf253483d30caf951bf90fc264136d36 * Bundled sources: is there an option available to use installed version for some of them, or are they all patched versions? ffmpeg, spell checking, scons in building process... * amd64 support: except missing 32bit gconf, it should work there with multilib (except custom paths like plugins I guess, that will be in /usr/lib32 and not /usr/lib, ...), wine ebuild does that for example
I agree that it would be nice to get this building on 64-bit, even if builds as a 32-bit executable and depends on multilib. Also, can /opt/netscape/plugins32 or /usr/lib32/nsbrowser/plugins be added to the plugins path, for 32-bit plugins installed on a 64-bit system? By convention, the /opt prefix holds binary packages. Can the built-from-source Chromium package fit in with the rest of the system at /usr? I don't think this runs counter to any Gentoo policy, it's just odd.
Created attachment 200069 [details] chromium-3.0.195.1.ebuild Uploading compilable ebuild (the tarball is now published). Please test it, and report any issues. I'm going to fix bundling/CFLAGS issues, but to do that properly requires changes to the gyp script (it's one of the build steps). It will be picked up by later releases. For now, it uses system SCONS. So, for this version of the ebuild I would recommend to accept bundled libraries and hardcoded CFLAGS. There is work to easily switch to several system libraries, and it will be included in later releases (it's in the tree now).
Oh, few more things to comment on: I just didn't test it on amd64 yet. I'm going to do that. I really tried to fit things in /usr hierarchy, but for now it would require heavy patching of source code. The problem is, it was really designed to be in /opt. That's fixable, but will take time. For now, I would recommend accepting it being in /opt.
Doesn't compile on my amd64: /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../libgio-2.0.so when searching for -lgio-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../libgio-2.0.a when searching for -lgio-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgio-2.0.so when searching for -lgio-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgio-2.0.a when searching for -lgio-2.0 /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgio-2.0 collect2: ld returned 1 exit status upstream bug: http://code.google.com/p/o3d/issues/detail?id=90#c0
The libgio problem can be solved by updating to latest emul-linux-x86-baselibs (unstable). However, the amd64 build is still blocked on bug #252220 .
(In reply to comment #6) > Hi Pawel, that's good news! I hope the tarball will be soon available for > testing. I'll be without internet connection for the next 2 weeks, but here a > few quick comments: > * Bundled sources: is there an option available to use installed version for > some of them, or are they all patched versions? ffmpeg, spell checking, scons > in building process... If I recall it correctly there has been a lot of noise around the net about the bundled libraries that comes with Chrome, esp ffmpeg. To recap for anyone not willing to google for it: Google ships Chrome with ffmpeg bundled which might or not might break ffmpeg's license. Google claim that they only build ffmpeg with options that makes it adhere to LGPL rather than the GPL and that they thus are not violating any license. They also seem to refuse the idea (last I checked) that they could just aswell be using libraries already on the system. If I understand it right it's because Chrome is closed source and thus can't be using any library which is GPL licensed (which they couldn't control if using system provided libs), even if they only actually use parts that are LGPLed. Now that Pawel says that they're planning to add the option to I wonder what has changed, but I do think it's a good move for Chrome, esp keeping in mind that bundling libraries are frowned upon [1] [2] [3]. ;-) It's a mess either way. [1] http://blog.flameeyes.eu/2009/01/02/bundling-libraries-for-despair-and-insecurity [2] http://blog.flameeyes.eu/2009/03/23/bundling-libraries-the-curse-of-the-ancients [3] http://blog.flameeyes.eu/2009/04/03/security-considerations-scanning-bundled-libraries
Status update on this one: don't worry the bug has not gone stale, I'm working with Pawel on this, most system libraries are used now, compiles fine on gcc 4.4, on amd64, ... I also grabbed a few parts from the forums live ebuild (namely setting CFLAGS/LDFLAGS via include.gypi) Current version of the ebuild is available in my overlay, I'll post it here too for the curious people In fact the only big problem left (apart from --as-needed failure) is that the source tarballs are not automatically published yet upstream. This is being worked on, so when it is fixed, expect chromium in-tree soonish :)
Created attachment 202693 [details] chromium-4.0.203.0.ebuild
(In reply to comment #14) > Created an attachment (id=202693) [edit] > chromium-4.0.203.0.ebuild Since Chromium now builds as a 64-bit application on amd64, does the ebuild really need to "inherit multilib"?
The multilib eclass is not only used to compile programs in 32bit on 64bit arches, it also has some helper functions, for example to install files in the correct places :) The ebuild has a few calls to $(get_libdir), to install correctly in /usr/lib64 (and not fail on multilib-strict checks), and also to find the correct 64bit nsplugins
(In reply to comment #14) > Created an attachment (id=202693) [edit] > chromium-4.0.203.0.ebuild > I get a 404 not found when trying to download the tarball.
Until official tarballs are available, I've made one with the export_tarball tool (hosted on Gentoo mirrors). So enjoy chromium-4.0.210.0_p26329 in tree! Let the bugreports flow in
>>> Downloading 'http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/chromium-4.0.203.0.tar.bz2' --2009-12-11 02:21:13-- http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/chromium-4.0.203.0.tar.bz2 Resolving distro.ibiblio.org... 152.46.7.109 Connecting to distro.ibiblio.org|152.46.7.109|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2009-12-11 02:21:17 ERROR 404: Not Found. >>> Downloading 'http://build.chromium.org/buildbot/archives/chromium-4.0.203.0.tar.bz2' --2009-12-11 02:21:17-- http://build.chromium.org/buildbot/archives/chromium-4.0.203.0.tar.bz2 Resolving build.chromium.org... 209.85.231.100, 209.85.231.101, 209.85.231.102 Connecting to build.chromium.org|209.85.231.100|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2009-12-11 02:21:21 ERROR 404: Not Found.