Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296917 - www-client/chromium minor multilib compatibility changes
Summary: www-client/chromium minor multilib compatibility changes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Paweł Hajdan, Jr. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-14 18:37 UTC by ferret
Modified: 2010-04-11 15:27 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---
phajdan.jr: Bugday?


Attachments
chromium-4.0.266.0.ebuild patch (chromium-multilib-compat.patch,1.24 KB, patch)
2009-12-14 18:38 UTC, ferret
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ferret 2009-12-14 18:37:11 UTC
I'm working with a dual multilib setup and have come across a couple of minor issues:
1. Tests: 'use amd64' instead of '[[ $ABI = amd64 ]]'
2. ABI dependent variable exported in ebuild-level scope

Changes in patch form below.  Should cause no change in behaviour for the vast majority of people. :)
Comment 1 ferret 2009-12-14 18:38:11 UTC
Created attachment 213013 [details, diff]
chromium-4.0.266.0.ebuild patch
Comment 2 ferret 2009-12-14 18:40:16 UTC
Hmm, forgot to say... I added a test in there to set ia32 as target when x86 is the ABI.  This is currently the default build target in chromium.  However, I thought it would make sense to protect against possible future changes in the build system, e.g. detection of the processor, which might cause problems down the line.
Comment 3 Bernard Cafarelli gentoo-dev 2009-12-15 14:05:11 UTC
Thanks for the patch! I've applied the changes to 4.0.266.0 and 9999 ebuilds
Comment 4 ferret 2010-01-26 12:27:36 UTC
Reverted by changes in 301652.

I'm going to see if I can find a way to fix this without causing problems with cross compiling systems.
Comment 5 Bernard Cafarelli gentoo-dev 2010-01-26 13:52:25 UTC
I just sent you an email on this, but apparently you already spotted it ;)

Reopening and CC-ing new co-maintainer
Comment 6 ferret 2010-01-28 19:48:41 UTC
I've been investigating to get this right.  Basically, I wanted to make sure it will even work if someone has a cross-compiler on (or even for) a multilib system.  There are a few ways of setting up cross-compilers, some a bit outdated, so I wanted to make it as correct as possible.

- ABI only gets set if the active profile is a multilib one.  A cross-compiler on a multilib system will not have it set.  A cross-compiler that is a multilib compiler also will have ABI set to correct values.
- ARCH gets set on every system, but it is possible for it to not be correct on multilib.  Otherwise it should be correct (and is equivalent to the 'use somearch' test).

That leads to the following logic:

	local myarch="$ABI"
	[[ $myarch = "" ]] && myarch="$ARCH"

	if [[ $myarch = amd64 ]] ; then
		myconf="${myconf} -Dtarget_arch=x64"
	elif [[ $myarch = x86 ]] ; then
                myconf="${myconf} -Dtarget_arch=ia32"
	elif [[ $myarch = arm ]] ; then
                myconf="${myconf} -Dtarget_arch=arm -Ddisable_nacl=1 -Dv8_use_snapshot=false -Dlinux_use_tcmalloc=0"
	else
		die "could not determine arch to build chromium for, got myarch='${myarch}'"
	fi

I've added the else clause so that if chromium starts working on any other arches, another line needs to be added to the if statement.  It's annoying, but until chromium gets a proper build system that makes things for the right arch, I think it's better for it to be explicitly set by portage like this.

Giacomo do you want to test this to make sure it works for you too?
Comment 7 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-03-03 18:09:36 UTC
amd64, could you suggest the best course of action / validate the posted patch? Feel free to modify the ebuilds too. TIA.
Comment 8 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-03-12 19:58:26 UTC
Pacho, could you comment on https://bugs.gentoo.org/show_bug.cgi?id=296917#c6 ? Does it look good to you?
Comment 9 Pacho Ramos gentoo-dev 2010-03-13 09:52:20 UTC
(In reply to comment #8)
> Pacho, could you comment on https://bugs.gentoo.org/show_bug.cgi?id=296917#c6 ?
> Does it look good to you?
> 

Sadly I don't know what is the best way to go :-(, but I am CCing QA team since they will know much more than me on this for sure
Comment 10 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2010-04-11 15:27:44 UTC
(In reply to comment #6)
Thanks for the suggested patch, I applied it to the most recent chromium ebuilds.