Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 589978 - www-client/chromium, dev-qt/qtwebengine: ABI=x32 incorrectly detected as amd64
Summary: www-client/chromium, dev-qt/qtwebengine: ABI=x32 incorrectly detected as amd64
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL: https://bugs.chromium.org/p/chromium/...
Whiteboard:
Keywords:
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2016-07-29 11:54 UTC by Dainius Masiliūnas
Modified: 2016-07-30 07:46 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,105.09 KB, text/plain)
2016-07-29 11:54 UTC, Dainius Masiliūnas
Details
/usr/include/pci/config.h (config.h,1.50 KB, text/plain)
2016-07-29 11:56 UTC, Dainius Masiliūnas
Details
emerge --info (emerge-info.log,5.50 KB, text/plain)
2016-07-29 12:00 UTC, Dainius Masiliūnas
Details
chromium environment (environment,200.91 KB, text/plain)
2016-07-29 19:19 UTC, Dainius Masiliūnas
Details
chromium build.log (build.log.gz,170.92 KB, application/x-gzip)
2016-07-29 19:24 UTC, Dainius Masiliūnas
Details
chromium build.log with target_arch=x32 (build.log,5.00 KB, text/plain)
2016-07-29 19:46 UTC, Dainius Masiliūnas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dainius Masiliūnas 2016-07-29 11:54:07 UTC
Created attachment 441868 [details]
build.log

Attempting to compile QtWebEngine on x32 results in a build failure in obj/src/3rdparty/chromium/build/linux/obj/src/3rdparty/chromium/build/linux/libpci.gen/libpci.libpci_loader.o:
                 from obj/src/3rdparty/chromium/build/linux/libpci.gen/libpci_loader.cc:4:
/usr/include/pci/config.h:10:4: error: #error "abi_x86_64 not supported by the package."

This is very odd, because it seems like it's trying to include libpci and it should get the x32 version, as the relevant code in pci/config.h is:

#if defined(__x86_64__) /* amd64 */
#       if defined(__ILP32__) /* x32 ABI */
#               include <x86_64-pc-linux-gnux32/pci/config.h>
#       else /* 64-bit ABI */
#               error "abi_x86_64 not supported by the package."
#       endif

Full build log and config.h are attached.
Comment 1 Dainius Masiliūnas 2016-07-29 11:56:06 UTC
Created attachment 441870 [details]
/usr/include/pci/config.h
Comment 2 Dainius Masiliūnas 2016-07-29 12:00:07 UTC
Created attachment 441872 [details]
emerge --info
Comment 3 Dainius Masiliūnas 2016-07-29 18:09:35 UTC
I see the issue now: it incorrectly thinks that x32 is amd64, as it's using -m64 -march=x86-64 and such. Same issue is with the chromium ebuild. On x32, $(tc-arch) still returns "amd64"!
Comment 4 Dainius Masiliūnas 2016-07-29 19:19:15 UTC
Created attachment 441950 [details]
chromium environment

Here's the environment log file from the chromium compilation that shows, among other things:

declare -- ffmpeg_target_arch="x64"
declare -- target_arch="x64"
Comment 5 Dainius Masiliūnas 2016-07-29 19:24:08 UTC
Created attachment 441952 [details]
chromium build.log

Attached the build log from Chromium compilation. It gets quite far, but using the wrong architecture completely.
Comment 6 Dainius Masiliūnas 2016-07-29 19:46:59 UTC
Created attachment 441954 [details]
chromium build.log with target_arch=x32

When I edit the ebuild to have {ffmpeg_,}target_arch=x32, I get this configure error instead:
gyp: Undefined variable platform_heap_asm_files in /var/tmp/portage/www-client/chromium-52.0.2743.82/work/chromium-52.0.2743.82/third_party/WebKit/Source/platform/blink_platform.gyp
Comment 7 Dainius Masiliūnas 2016-07-29 19:55:03 UTC
Looking around, I found this ChromeOS bug about x32, with most of the work done by Mike Frysinger. But I'm not sure how far it got, and whether it relates to Chromium itself?

(Also, oddly enough the See Also bug field does not support the Chromium bug tracker...)
Comment 8 Mike Gilbert gentoo-dev 2016-07-29 20:09:24 UTC
commit 85bd6a2e4790671fd6adea1d973ff8ea1ac99ff2
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Fri Jul 29 16:07:08 2016 -0400

    www-client/chromium: set target_arch=x32 when appropriate

    Bug: https://bugs.gentoo.org/589978

    Package-Manager: portage-2.3.0_p16

 www-client/chromium/chromium-53.0.2785.21.ebuild | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)


I have no idea what is going on with qtwebengine; the qt maintainers will need to address any issues with that ebuild.
Comment 9 Dainius Masiliūnas 2016-07-29 20:20:31 UTC
As I mentioned in comment #6, it doesn't seem that target_arch=x32 gets accepted as a valid option by the build system at the moment? The change does help to prevent building it all for the wrong architecture, though.

I'm thinking that a bug report about x32 support should be opened upstream.
Comment 10 Mike Gilbert gentoo-dev 2016-07-29 20:50:03 UTC
(In reply to Dainius Masiliūnas from comment #9)
> As I mentioned in comment #6, it doesn't seem that target_arch=x32 gets
> accepted as a valid option by the build system at the moment? The change
> does help to prevent building it all for the wrong architecture, though.

Various pieces support it, but others do not.

> I'm thinking that a bug report about x32 support should be opened upstream.

You are certainly welcome to do so. :)
Comment 11 Mike Gilbert gentoo-dev 2016-07-29 21:32:45 UTC
Hmm, the gn build system doesn't support x32 at all.

You'll need to get x32 supported upstream before we even consider supporting it here.
Comment 12 Dainius Masiliūnas 2016-07-30 07:46:32 UTC
Yea, that's what I thought. Open an issue upstream.