Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 376219 - www-client/chromium-13.0.782.99: KeyError: 'linux3'
Summary: www-client/chromium-13.0.782.99: KeyError: 'linux3'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
: 377489 377519 377793 378607 (view as bug list)
Depends on:
Blocks: linux-3.0
  Show dependency tree
 
Reported: 2011-07-24 14:14 UTC by hakushka
Modified: 2011-09-19 21:25 UTC (History)
22 users (show)

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


Attachments
source patch to add support for "linux3" (add_support_for_linux3.patch,476 bytes, patch)
2011-07-25 22:19 UTC, James Ausmus
Details | Diff
Patch for ebuild to apply the above patch (add_linux3_patch_to_ebuild.patch,411 bytes, patch)
2011-07-25 22:20 UTC, James Ausmus
Details | Diff
build.log (build.log,3.42 KB, text/plain)
2011-09-17 10:00 UTC, Dennis Schridde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hakushka 2011-07-24 14:14:25 UTC
failed to build witch kernel version 3.0.0

Reproducible: Always




emerge -1 www-client/chromium
Calculating dependencies                        ... done!             

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) www-client/chromium-13.0.782.99
 * chromium-13.0.782.99.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                                                            [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/3.0.0-gentoo/build
 * Found sources for kernel version:
 *     3.0.0-gentoo
 * Checking for suitable kernel configuration options...                                                                                                                                                   [ ok ]
>>> Unpacking source...
>>> Unpacking chromium-13.0.782.99.tar.bz2 to /var/tmp/portage/www-client/chromium-13.0.782.99/work
>>> Source unpacked in /var/tmp/portage/www-client/chromium-13.0.782.99/work
>>> Preparing source in /var/tmp/portage/www-client/chromium-13.0.782.99/work/chromium-13.0.782.99 ...
 * Applying chromium-system-vpx-r4.patch ...                                                                                                                                                               [ ok ]
 * Applying chromium-perl-5.14-r0.patch ...                                                                                                                                                                [ ok ]
 * Applying chromium-glibc-2.14-r0.patch ...                                                                                                                                                               [ ok ]
 * Applying chromium-libgcrypt-r0.patch ...                                                                                                                                                                [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/www-client/chromium-13.0.782.99/work/chromium-13.0.782.99 ...
build/gyp_chromium --depth=. -Ddisable_sse2=1 -Duse_system_bzip2=1 -Duse_system_flac=1 -Duse_system_icu=1 -Duse_system_libevent=1 -Duse_system_libjpeg=1 -Duse_system_libpng=1 -Duse_system_libwebp=1 -Duse_system_libxml=1 -Duse_system_speex=1 -Duse_system_vpx=1 -Duse_system_xdg_utils=1 -Duse_system_yasm=1 -Duse_system_zlib=1 -Duse_cups=0 -Duse_gconf=0 -Duse_gnome_keyring=0 -Dlinux_link_gnome_keyring=0 -Dlinux_sandbox_path=/usr/lib64/chromium-browser/chrome_sandbox -Dlinux_sandbox_chrome_path=/usr/lib64/chromium-browser/chrome -Dtarget_arch=x64 -Dwerror=
Updating projects from gyp files...
Traceback (most recent call last):
  File "build/gyp_chromium", line 171, in <module>
    sys.exit(gyp.main(args))
  File "/var/tmp/portage/www-client/chromium-13.0.782.99/work/chromium-13.0.782.99/tools/gyp/pylib/gyp/__init__.py", line 323, in main
    'sunos5':   'make',}[sys.platform] ]
KeyError: 'linux3'
 * ERROR: www-client/chromium-13.0.782.99 failed (configure phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_configure
 *   environment, line 6392:  Called die
 * The specific snippet of code:
 *       egyp ${myconf} || die
 * 
 * If you need support, post the output of 'emerge --info =www-client/chromium-13.0.782.99',
 * the complete build log and the output of 'emerge -pqv =www-client/chromium-13.0.782.99'.
 * The complete build log is located at '/var/tmp/portage/www-client/chromium-13.0.782.99/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/chromium-13.0.782.99/temp/environment'.
 * S: '/var/tmp/portage/www-client/chromium-13.0.782.99/work/chromium-13.0.782.99'

>>> Failed to emerge www-client/chromium-13.0.782.99, Log file:

>>>  '/var/tmp/portage/www-client/chromium-13.0.782.99/temp/build.log'
Comment 1 Pim Vullers 2011-07-25 12:12:06 UTC
Same issue here, the build system seems to depend on on the kernel version (and 3.0 has not been yet added).
Comment 2 James Ausmus 2011-07-25 22:19:47 UTC
Created attachment 280961 [details, diff]
source patch to add support for "linux3"
Comment 3 James Ausmus 2011-07-25 22:20:13 UTC
Created attachment 280963 [details, diff]
Patch for ebuild to apply the above patch
Comment 4 James Ausmus 2011-07-25 22:20:52 UTC
Same issues here with chromium-13.*

Attached patches fix the problem for me
Comment 5 Alexey Charkov 2011-07-26 17:55:28 UTC
(In reply to comment #2)
> Created attachment 280961 [details, diff]
> source patch to add support for "linux3"

s/.orig//

Then it works ;-)
Comment 6 Alexey Charkov 2011-07-26 18:01:53 UTC
Note: my previous comment only applies if one downloads the diff by first clicking on the attachment link and then following Bugzilla's "raw unified" url. This for some reason changes the filename to .py.orig in both instances, which obviously doesn't work.

The original patch works fine if applied verbatim (clicking on it in the "Attachments" box on top of the page, for example). Thanks, James!
Comment 7 Mike Gilbert gentoo-dev 2011-07-26 18:14:00 UTC
This is a dup of bug 372137, which has been fixed in chromium-14.

However, it might be a good idea to back-port the fix to chromium-13, depending on kernel@g.o's timeline for making linux-3 stable.

Is the gyp patch the only one that is required?
Comment 8 James Ausmus 2011-07-27 19:56:50 UTC
(In reply to comment #7)
> This is a dup of bug 372137, which has been fixed in chromium-14.
> 
> However, it might be a good idea to back-port the fix to chromium-13, depending
> on kernel@g.o's timeline for making linux-3 stable.
> 
> Is the gyp patch the only one that is required?

Looks like not - there are multiple places that do an "if os == 'linux2'" thing - most notably in the i18n resource generation files, which explains some massive build failures I was seeing (and not understanding/root-causing until just now).

I'll try and work through all the other locations that "linux2" is used, and Do The Right Thing, and generate some patches
Comment 9 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-07-27 20:44:51 UTC
(In reply to comment #8)
> I'll try and work through all the other locations that "linux2" is used, and Do
> The Right Thing, and generate some patches

The patches are upstream, in 14.x versions, they're just not in 13.x. Feel free to work on a Gentoo backport.
Comment 10 Mike Gilbert gentoo-dev 2011-08-03 01:07:14 UTC
*** Bug 377489 has been marked as a duplicate of this bug. ***
Comment 11 Zac Medico gentoo-dev 2011-08-03 12:42:34 UTC
Replacement of all occurrences of linux2 with linux3 in src_prepare works for me with chromium-13.0.782.107: 

if [[ ${KV_MAJOR} == 3 ]] ; then
	grep -rlZ linux2 . 2>/dev/null | \
		xargs -0 sed -e "s:linux2:linux3:g" -i || \
		die "failed to replace linux2 with linux3"
fi

Maybe this fix will suffice, so there won't be any need to backport the upstream fixes.
Comment 12 Zac Medico gentoo-dev 2011-08-03 18:20:32 UTC
*** Bug 377519 has been marked as a duplicate of this bug. ***
Comment 13 Ian Stakenvicius (RETIRED) gentoo-dev 2011-08-04 17:34:44 UTC
*** Bug 377793 has been marked as a duplicate of this bug. ***
Comment 14 Francois Chenier 2011-08-05 03:26:54 UTC
(In reply to comment #11)
> 
> Maybe this fix will suffice, so there won't be any need to backport the
> upstream fixes.

Not enough Zac, you need to change all 'linux2' conditional stuff in chrome/app/generated_resources.grd as well. Not doing so, compilation fails if LINGUAS is set (which is en_GB for me).
Comment 15 Zac Medico gentoo-dev 2011-08-05 03:42:18 UTC
(In reply to comment #14)
> (In reply to comment #11)
> > 
> > Maybe this fix will suffice, so there won't be any need to backport the
> > upstream fixes.
> 
> Not enough Zac, you need to change all 'linux2' conditional stuff in
> chrome/app/generated_resources.grd as well. Not doing so, compilation fails if
> LINGUAS is set (which is en_GB for me).

My sed command should patch chrome/app/generated_resources.grd as well as anything else, so I'm not sure why it wouldn't work. It's true that I don't have of chromium's linguas_* flags enabled, so I haven't tested that case.
Comment 16 Fabian Di Milia 2011-08-05 07:48:34 UTC
(In reply to comment #14)
> (In reply to comment #11)
> > 
> > Maybe this fix will suffice, so there won't be any need to backport the
> > upstream fixes.
> 
> Not enough Zac, you need to change all 'linux2' conditional stuff in
> chrome/app/generated_resources.grd as well. Not doing so, compilation fails if
> LINGUAS is set (which is en_GB for me).



Zac's src_prepare-patch works for me and my LINGUAS is set to "de".

gentoo ~ # cat /etc/make.conf | grep LINGUAS
LINGUAS="de"
Comment 17 Francois Chenier 2011-08-05 08:15:09 UTC
> My sed command should patch chrome/app/generated_resources.grd as well as
> anything else, so I'm not sure why it wouldn't work. It's true that I don't
> have of chromium's linguas_* flags enabled, so I haven't tested that case.

Fine for me Zac. My fault. Compile fine with LINGUAS="en en_US en_GB" now. Thanks.
Comment 18 Ooblick 2011-08-06 11:13:08 UTC
The same failure is also present in www-client/chromium-13.0.782.109 when built on linux-3.0.0.
Comment 19 Richard Cox 2011-08-06 13:20:09 UTC
(In reply to comment #11)
> Replacement of all occurrences of linux2 with linux3 in src_prepare works for
> me with chromium-13.0.782.107: 
> 
> if [[ ${KV_MAJOR} == 3 ]] ; then
>     grep -rlZ linux2 . 2>/dev/null | \
>         xargs -0 sed -e "s:linux2:linux3:g" -i || \
>         die "failed to replace linux2 with linux3"
> fi
> 
> Maybe this fix will suffice, so there won't be any need to backport the
> upstream fixes.

That worked very well for me.  Thank you for posting this.
Comment 20 Drake Donahue 2011-08-06 19:40:17 UTC
version 14.0.835.18 emerges and works on amd64.
Comment 21 Vasilis Lourdas 2011-08-06 21:08:30 UTC
The latest stable (13.0.782.107-r1) emerged just fine with Zac's patch.
Comment 22 Zac Medico gentoo-dev 2011-08-11 01:47:12 UTC
*** Bug 378607 has been marked as a duplicate of this bug. ***
Comment 23 Ooblick 2011-08-11 06:48:30 UTC
So https://bugs.gentoo.org/show_bug.cgi?id=377475 marks chromium < 13.0.782.107 as a security issue, yet I cannot build 13.0.782.107-r1 or 13.0.782.109 due to this issue. This leaves me exposed to the security issues marked in that bug.
Comment 24 Vasilis Lourdas 2011-08-11 06:55:27 UTC
(In reply to comment #23)
> So https://bugs.gentoo.org/show_bug.cgi?id=377475 marks chromium < 13.0.782.107
> as a security issue, yet I cannot build 13.0.782.107-r1 or 13.0.782.109 due to
> this issue. This leaves me exposed to the security issues marked in that bug.

If you know how to edit ebuilds (always in your local overlay), you can always try the patch in comment 11. It worked fine here.
Comment 25 Martin von Gagern 2011-08-11 07:32:44 UTC
(In reply to comment #24)
> If you know how to edit ebuilds (always in your local overlay), you can always
> try the patch in comment 11. It worked fine here.

Worked fine for me, using a portage hook instead of an overlay:

# mkdir -p /etc/portage/env/www-client/
# cat <<EOF> /etc/portage/env/www-client/chromium
post_src_prepare() {
  if [[ ${KV_MAJOR} == 3 ]] ; then
    grep -rlZ linux2 . 2>/dev/null | \
      xargs -0 sed -e "s:linux2:linux3:g" -i || \
      die "failed to replace linux2 with linux3"
    elog "Custom work-around for https://bugs.gentoo.org/376219 enabled."
  fi
}
EOF

That will ensure that you won't have to worry about keeping the overlay up to date from the main portage tree. The hook installed above will apply to all chromium ebuilds until you delete that file again. Given the fact that this issue already affected three different ebuilds (.99 in comment #0, .107 in comment #11 and .109 in comment #18), that's a huge atvantage.

Obviously, the Gentoo chromium maintainers actually getting this fix into their ebuild, even if it is only intended as a temporary solution, would be even better.
Comment 26 Martin von Gagern 2011-08-11 08:02:54 UTC
(In reply to comment #25)
> # cat <<EOF> /etc/portage/env/www-client/chromium

Should have been "cat <<'EOF'> /etc/portage/env/www-client/chromium". Or simply edit the file. Sorry for the noise.
Comment 27 André Terpstra 2011-08-12 06:15:31 UTC
www-client/chromium-14.0.835.35 builds fine with gentoo-sources-3.0.1 here.
Comment 28 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-08-12 16:21:22 UTC
(In reply to comment #27)
> www-client/chromium-14.0.835.35 builds fine with gentoo-sources-3.0.1 here.

Excellent, I'll close this bug when 14.x hits stable.
Comment 29 Richard 2011-08-27 04:41:21 UTC
Martin, thanks for the workaround. It let me compile chromium without hacking away at things or rebooting.
Comment 30 Dennis Schridde 2011-09-17 10:00:28 UTC
Created attachment 286765 [details]
build.log

I get "KeyError: 'linux2'" with www-client/chromium-14.0.835.163.
Comment 31 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2011-09-17 16:24:38 UTC
(In reply to comment #30)
> I get "KeyError: 'linux2'" with www-client/chromium-14.0.835.163.

Please file a new bug and include your emerge --info. I can't reproduce. Do you have any local modifications of the ebuild?

By the way, closing this one since 13.x is now in stable.
Comment 32 Martin von Gagern 2011-09-19 21:11:12 UTC
(In reply to comment #30)
> I get "KeyError: 'linux2'" with www-client/chromium-14.0.835.163.

Filed bug #383711.
Comment 33 Dennis Schridde 2011-09-19 21:25:23 UTC
(In reply to comment #31)
> (In reply to comment #30)
> > I get "KeyError: 'linux2'" with www-client/chromium-14.0.835.163.
> I can't reproduce. Do you have any local modifications of the ebuild?
(In reply to comment #32)
> Filed bug #383711.

The issue on my side was a stray /etc/portage/env/www-client/chromium with an sed line in post_src_prepare, conflicting with the latest changes to the ebuild.