Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278975 - www-client/chromium [new ebuild]
Summary: www-client/chromium [new ebuild]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Bernard Cafarelli
URL: http://chromium.org/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-24 20:15 UTC by Paweł Hajdan, Jr. (RETIRED)
Modified: 2009-12-10 04:43 UTC (History)
13 users (show)

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


Attachments
chromium-3.0.195.1.ebuild (chromium-3.0.195.1.ebuild,1.55 KB, text/plain)
2009-07-24 20:16 UTC, Paweł Hajdan, Jr. (RETIRED)
Details
chromium-launcher.sh (chromium-launcher.sh,620 bytes, text/plain)
2009-07-24 20:16 UTC, Paweł Hajdan, Jr. (RETIRED)
Details
chromium-3.0.195.1.ebuild (chromium-3.0.195.1.ebuild,1.53 KB, text/plain)
2009-08-03 22:44 UTC, Paweł Hajdan, Jr. (RETIRED)
Details
chromium-4.0.203.0.ebuild (chromium-4.0.203.0.ebuild,2.66 KB, text/plain)
2009-08-30 08:40 UTC, Bernard Cafarelli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2009-07-24 20:15:05 UTC
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...
Comment 1 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2009-07-24 20:16:10 UTC
Created attachment 199022 [details]
chromium-3.0.195.1.ebuild
Comment 2 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2009-07-24 20:16:33 UTC
Created attachment 199024 [details]
chromium-launcher.sh
Comment 3 Timo Nentwig 2009-07-25 14:58:20 UTC
# 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...
Comment 4 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2009-07-25 18:12:46 UTC
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.
Comment 5 Anatoly Yakovenko 2009-07-28 18:04:19 UTC
the ebuild ends up downloading the chrome html page as a .tar.bz2 and then failing to build.
Comment 6 Bernard Cafarelli gentoo-dev 2009-07-30 14:06:23 UTC
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
Comment 7 Daniel Lin 2009-08-03 19:50:34 UTC
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.
Comment 8 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2009-08-03 22:44:32 UTC
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).
Comment 9 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2009-08-03 22:46:37 UTC
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.
Comment 10 crusaderky 2009-08-04 08:29:12 UTC
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
Comment 11 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2009-08-04 17:28:44 UTC
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 .
Comment 12 Viktor S 2009-08-07 11:20:21 UTC
(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
Comment 13 Bernard Cafarelli gentoo-dev 2009-08-30 08:38:46 UTC
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 :)
Comment 14 Bernard Cafarelli gentoo-dev 2009-08-30 08:40:18 UTC
Created attachment 202693 [details]
chromium-4.0.203.0.ebuild
Comment 15 Daniel Lin 2009-08-31 17:56:04 UTC
(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"?
Comment 16 Bernard Cafarelli gentoo-dev 2009-09-01 08:03:55 UTC
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
Comment 17 crusaderky 2009-09-01 08:35:21 UTC
(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.
Comment 18 Bernard Cafarelli gentoo-dev 2009-09-16 13:38:57 UTC
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
Comment 19 dE 2009-12-10 04:37:20 UTC
>>> 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.