Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 252664
Alias:
Product:
Component:
Status: NEW
Resolution:
Assigned To: AMD64 Project <amd64@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Cyp <cyp561@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
emerge.patch Patch which makes portage warn if user didn't use linux32 chroot. patch Cyp 2008-12-27 20:40 0000 731 bytes Details | Diff
emerge.2.patch Use ARCH instead of CHOST patch Cyp 2008-12-28 22:08 0000 680 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 252664 depends on: Show dependency tree
Bug 252664 blocks:
Votes: 1    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.








View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-12-27 10:05 0000
If $CHOST="i686-pc-linux-gnu" or "i486-pc-linux-gnu" and $(uname -m)="x86_64",
then portage should probably print some warning such as:

WARNING: CHOST does not match uname -m
WARNING: To chroot into a 32-bit environment, use the command "linux32 chroot".
WARNING: See http://www.gentoo.org/proj/en/base/amd64/howtos/chroot.xml for
more information.

(Not sure whether this counts as bug or enhancement.)

Do some applications end up depending on a 64 bit environment, or it the
problem just some failing to build?

------- Comment #1 From Jeroen Roovers 2008-12-27 16:42:31 0000 -------
What bug do you propose to fix? If it's just user errors, then it probably
won't be implemented...

------- Comment #2 From Cyp 2008-12-27 20:40:57 0000 -------
Created an attachment (id=176539) [details]
Patch which makes portage warn if user didn't use linux32 chroot.

(In reply to comment #1)

User errors.

I hadn't heard of linux32, and didn't know that uname -m is used when building
packages, and was trying to build a 32-bit environment on my fast 64 bit
desktop, to run on a small laptop/"netbook", and didn't think of looking for
documentation before doing it.

I don't know how common/uncommon my situation is, but if it's common enough, a
warning would have saved me a bit of time.

Does a patch against portage 2.1.4.5 improve the chance of it being
implemented? (I don't know python or portage, so the patch could be a bit
strange.)

------- Comment #3 From Jeremy Olexa (darkside) 2008-12-28 02:34:17 0000 -------
My opinion is to "read the manual" - If your uname does not say i*86, then of
course your chroot won't be 32bit.

------- Comment #4 From Harald van Dijk 2008-12-28 09:29:28 0000 -------
Well, from my experience, there is no problem setting up a 32-bit chroot
without using linux32/i386. Except that once it's set up, if you install
packages beyond the system ones, you'll find a few that produce indecipherable
error messages. A clear warning would've been nice from my point of view.

A note on the patch: if it should be done at all, it should probably check
$ARCH, not $CHOST, so that it catches all cases. I noticed i586-* was missing,
and I know some folks like to be strange with i686-gentoo-linux-gnu and such,
which is valid as far as I know.

------- Comment #5 From Harald van Dijk 2008-12-28 09:58:04 0000 -------
Another view: if the build of a package depends on uname's output, then
cross-compiling will certainly fail, so such packages should be fixed anyway.
And if such packages are indeed going to be fixed (if this is going to be
considered a bug in the packages), then there's less of a point in getting a
warning in portage.

------- Comment #6 From Cyp 2008-12-28 22:08:01 0000 -------
Created an attachment (id=176694) [details]
Use ARCH instead of CHOST

(In reply to comment #4 and #5)

I'm not sure what ARCH or CHOST are exactly, but ARCH="x86" seems simpler to
test for than CHOST =~ /i.86-.*/. (I don't know whether python has regular
expressions.)

According to the other view, x11-libs/qt-core-4.4.2 should be fixed to not
depend on uname -m.

P.S. Are all packages supposed to be able to be cross-compiled for an arbitrary
architecture on an arbitrary host? Looking at
http://www.gentoo.org/proj/en/base/embedded/cross-development.xml , I get the
impression that it's actually possible.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug