MAKEOPTS="-j1" emerge -av chromium ends with [21/621] aarch64-unknown-linux-gnu-clang++ -MMD -MF obj/v8/v8_libplatform/default-platform.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"321529-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DV8_INTL_SUPPORT -DV8_USE_SNAPSHOT -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_TARGET_ARCH_ARM64 -I../.. -Igen -I../../v8 -I../../v8/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -pthread -fcolor-diagnostics -no-canonical-prefixes --target=aarch64-linux-gnu -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wsign-compare -Winconsistent-missing-override -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -std=gnu++14 -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -mcpu=cortex-a53+crc -mtune=cortex-a53 -O2 -pipe -c ../../v8/src/libplatform/default-platform.cc -o obj/v8/v8_libplatform/default-platform.o FAILED: obj/v8/v8_libplatform/default-platform.o aarch64-unknown-linux-gnu-clang++ -MMD -MF obj/v8/v8_libplatform/default-platform.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"321529-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DV8_INTL_SUPPORT -DV8_USE_SNAPSHOT -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_TARGET_ARCH_ARM64 -I../.. -Igen -I../../v8 -I../../v8/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -pthread -fcolor-diagnostics -no-canonical-prefixes --target=aarch64-linux-gnu -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wsign-compare -Winconsistent-missing-override -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections -ffunction-sections -std=gnu++14 -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -mcpu=cortex-a53+crc -mtune=cortex-a53 -O2 -pipe -c ../../v8/src/libplatform/default-platform.cc -o obj/v8/v8_libplatform/default-platform.o In file included from ../../v8/src/libplatform/default-platform.cc:5: ../../v8/src/libplatform/default-platform.h:8:10: fatal error: 'functional' file not found #include <functional> ^~~~~~~~~~~~ Reproducible: Always Steps to Reproduce: 1. MAKEOPTS="-j1" emerge -av chromium 2. observe that version 65.0.3325.146 isselected. 3. Allow the emerge to proceed. Actual Results: See above. Expected Results: The build terminated with the fatal error: 'functional' file not found error. # emerge --info chromium Portage 2.3.24 (python 2.7.14-final-0, default/linux/arm64/17.0/desktop, gcc-7.3.0, glibc-2.26-r6, 4.9.0-4-arm64 aarch64) ================================================================= System Settings ================================================================= System uname: Linux-4.9.0-4-arm64-aarch64-with-gentoo-2.4.1 KiB Mem: 131544964 total, 83139584 free KiB Swap: 3321056 total, 3321056 free Timestamp of repository gentoo: Tue, 13 Mar 2018 08:45:01 +0000 Head commit of repository gentoo: 3d8f26d5467637a6d4bc4eb11e221c31019cc83f sh bash 4.4_p19 ld GNU gold (Gentoo 2.30 p1 2.30.0) 1.15 distcc 3.2rc1 aarch64-unknown-linux-gnu [disabled] app-shells/bash: 4.4_p19::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.26.1-r2::gentoo dev-lang/python: 2.7.14-r1::gentoo, 3.5.4-r1::gentoo dev-util/cmake: 3.10.2::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.35.3::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.15.1-r1::gentoo, 1.16.1::gentoo sys-devel/binutils: 2.29.1-r1::gentoo, 2.30::gentoo sys-devel/gcc: 6.4.0-r1::gentoo, 7.3.0-r1::gentoo sys-devel/gcc-config: 1.9.1::gentoo sys-devel/libtool: 2.4.6-r4::gentoo sys-devel/make: 4.2.1-r2::gentoo sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers) sys-libs/glibc: 2.26-r6::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.namerica.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: no sync-rsync-extra-opts: Pi_aarch64 location: /usr/local/last_out_of_the_past masters: gentoo mrueg location: /var/lib/layman/mrueg masters: gentoo priority: 50 palemoon location: /var/lib/layman/palemoon masters: gentoo priority: 50 ACCEPT_KEYWORDS="arm64 ~arm64" ACCEPT_LICENSE="* -@EULA FraunhoferFDK" CBUILD="aarch64-unknown-linux-gnu" CFLAGS="-mcpu=cortex-a53+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fomit-frame-pointer" CHOST="aarch64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-mcpu=cortex-a53+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fomit-frame-pointer" DISTDIR="/var/cache/distfiles" FCFLAGS="-O2" FEATURES="assume-digests binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2" GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo/ http://mirror.mdfnet.se/gentoo http://mirrors.163.com/gentoo/ http://gentoo.mirror.web4u.cz/ http://64.50.236.52/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.mneisen.org/ http://gentoo.mirror.pw.edu.pl/ http://gentoo.prz.rzeszow.pl http://mirror.mdfnet.se/mirror/gentoo http://ftp.gentoo.bg/ http://distfiles.gentoo.bg/ http://mirrors.ludost.net/gentoo/ http://mirror.hamakor.org.il/pub/mirrors/gentoo/ http://ftp.dei.uc.pt/pub/linux/gentoo/" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--fix-cortex-a53-843419 -Wl,--fix-cortex-a53-835769 -Wl,--no-map-whole-files" LINGUAS="en en_GB" MAKEOPTS="-j50" PKGDIR="/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa arm64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdnav dvdr eds egl emboss encode exif fam flac fortran gdbm gif glamor gles1 gles2 gnome-keyring gpm gtk iconv icu ipv6 jpeg lcms libnotify mad minizip mng modules mp3 mp4 mpeg multilib ncurses nls nptl nss ogg opengl openmp openssl pango pcre pcre16 pdf pie png policykit postproc ppds python qt3support qt5 readline script seccomp skia spell sqlite ssl ssp startup-notification svc svg tcpd threads tiff truetype udev udisks unicode upower usb virt-network vorbis wxwidgets x264 xattr xcb xml xv xvid xvmc zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 crc32 v4 v5 v6 v7 v8 thumb2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby21 ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="fbdev vc4" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= www-client/chromium-64.0.3282.186::gentoo was built with the following: USE="cups gnome-keyring hangouts (pic) proprietary-codecs suid system-ffmpeg system-icu -component-build -custom-cflags -jumbo-build (-kerberos) -neon -pulseaudio (-selinux) (-system-libvpx) (-tcmalloc) (-widevine)" L10N="en-GB -am -ar -bg -bn -ca -cs -da -de -el -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW" CFLAGS="-mcpu=cortex-a53+crc -mtune=cortex-a53 -O2 -pipe" CXXFLAGS="-mcpu=cortex-a53+crc -mtune=cortex-a53 -O2 -pipe -fno-delete-null-pointer-checks"
Created attachment 523718 [details] MAKEOPTS='j1' Build Log for chromium-64.0.3282.186 Makes it easy to see the first error. With higher MAKEOPTS, more missing files are reported.
Unless someone running ARM64 wants to fix this, I will just drop the keyword.
By butchering the ebuild, so it tries to build with gcc-7.3.0-r1 by commenting the clang forcing # if ! tc-is-clang; then # Force clang since gcc is pretty broken at the moment. # CC=${CHOST}-clang # CXX=${CHOST}-clang++ strip-unsupported-flags # fi The missing headers are found. It appears that there needs to be an include of /usr/lib/gcc/aarch64-unknown-linux-gnu/7.3.0/include/g++-v7/ or the clang equivalent, if it has its own include. As per the warning about gcc "being pretty broken at the moment" the build failed later. sys-devel/clang-6.0.0-r1 is installed.
The problem when building with clang is that chromium adds "--target=aarch64-linux-gnu" to CFLAGS when the arch is arm64 and the compiler is clang (this comes from build/config/compiler/BUILD.gn). When specifying "--target=aarch64-linux-gnu", clang looks for the headers in /usr/lib/gcc/aarch64-linux-gnu/7.3.0/include/g++-v7/, where they do not exist. If "--target=aarch64-unknown-linux-gnu" is used instead, or the "--target" option is dropped altogether, then the compilation works.
The patch below builds here. The ldflags looks wrong but I did not try building with fixing cflags alone. less /etc/portage/patches/www-client/chromium/chromium-build-on-arm64.patch --- ./build/config/compiler/BUILD.gn 2018-04-23 12:55:44.867374501 +0100 +++ ./build/config/compiler/BUILD.gn 2018-04-23 13:22:20.619539044 +0100 @@ -645,8 +645,8 @@ } } else if (current_cpu == "arm64") { if (is_clang && !is_android && !is_nacl && !is_fuchsia) { - cflags += [ "--target=aarch64-linux-gnu" ] - ldflags += [ "--target=aarch64-linux-gnu" ] + cflags += [ "--target=aarch64-unknown-linux-gnu" ] + ldflags += [ "--target=aarch64-unknown-linux-gnu" ] } } else if (current_cpu == "mipsel" && !is_nacl) { if (custom_toolchain == "") {
Please try removing the cflags and ldflags assignment entirely.
First a minor detail. The build testing today has been on www-client/chromium-67.0.3377.1 rather than 65.0.3325.146, which the bug was opened against. Editing the patch to --- ./build/config/compiler/BUILD.gn 2018-04-23 12:55:44.867374501 +0100 +++ ./build/config/compiler/BUILD.gn 2018-04-23 13:22:20.619539044 +0100 @@ -645,8 +645,6 @@ } } else if (current_cpu == "arm64") { if (is_clang && !is_android && !is_nacl && !is_fuchsia) { - cflags += [ "--target=aarch64-linux-gnu" ] - ldflags += [ "--target=aarch64-linux-gnu" ] } } else if (current_cpu == "mipsel" && !is_nacl) { if (custom_toolchain == "") { builds too. That's a tad ugly as it leaves the empty if statement.
If you feel it is more aesthetically pleasing, the following patch works as well: --- chromium-66.0.3359.66/build/config/compiler/BUILD.gn.orig 2018-04-23 11:37:55.857336526 +0200 +++ chromium-66.0.3359.66/build/config/compiler/BUILD.gn 2018-04-23 11:38:43.721158311 +0200 @@ -645,8 +645,8 @@ } } else if (current_cpu == "arm64") { if (is_clang && !is_android && !is_nacl && !is_fuchsia) { - cflags += [ "--target=aarch64-linux-gnu" ] - ldflags += [ "--target=aarch64-linux-gnu" ] + # cflags += [ "--target=aarch64-linux-gnu" ] + # ldflags += [ "--target=aarch64-linux-gnu" ] } } else if (current_cpu == "mipsel" && !is_nacl) { if (custom_toolchain == "") { Tested with chromium-66.0.3359.66
This should be fixed in 67.0.3396.18. I added a patch that disables the compiler_cpu_abi config section. https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-compiler-r0.patch?id=3800f8726b23842d9dc0c578ac4503dfeae298a8
Hi. I confirm that chromium-67.0.3396.18 builds correctly without user patches. Thanks!
Hi. The issue with incorrect target triplet is back again in chromium-67.0.3396.62, at least when not enabling the system-ffmpeg USE flag (which is masked on arm): Chrome configure/build: Running /var/tmp/portage/www-client/chromium-67.0.3396.62/work/chromium-67.0.3396.62/third_party/ffmpeg/configure --disable-everything [...] --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --target-os=linux --extra-cflags=--target=aarch64-linux-gnu --extra-ldflags=--target=aarch64-linux-gnu [...] --enable-parser=aac,h264 /usr/bin/aarch64-linux-gnu-gcc is unable to create an executable file. C compiler test failed.
Created attachment 534420 [details, diff] Patch to fix configuration of ffmpeg on ARM and MIPS Attached a patch which fixes configuration of ffmpeg by removing the implicit cross-compilation stuff for ARM and MIPS. With this ffmpeg builds. The jury is still out on whether chromium as a whole builds for a couple of more hours (currently at [170/14061])... :-)
Unfortunately, it didn't get all the way: [2901/14054] aarch64-unknown-linux-gnu-clang -MMD -MF obj/third_party/ffmpeg/ffmpeg_internal/fft_neon.o.d -DHAVE_AV_CONFIG_H -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -D_ISOC99_SOURCE -D_LARGEFILE_SOURCE -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DOPUS_FIXED_POINT -I../../third_party/ffmpeg/chromium/config/Chrome/linux/arm64 -I../../third_party/ffmpeg -I../.. -Igen -I../../third_party/opus/src/include -DHAVE_VFP_ARGS=1 -fno-strict-aliasing -fmerge-all-constants --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -pthread -fcolor-diagnostics -no-canonical-prefixes -std=gnu11 -c ../../third_party/ffmpeg/libavcodec/aarch64/fft_neon.S -o obj/third_party/ffmpeg/ffmpeg_internal/fft_neon.o FAILED: obj/third_party/ffmpeg/ffmpeg_internal/fft_neon.o <instantiation>:15:9: error: unknown directive .func fft4_neon ^ ../../third_party/ffmpeg/libavcodec/aarch64/fft_neon.S:38:1: note: while in macro instantiation function fft4_neon ^
If compiling fft_neon.S with gcc instead of clang (and removing -fcolor-diagnostics, which gcc does not like), then it works...
So, basically, ffmpeg gets built twice. I don't know if this is correct or intentional. The first time it is built with gcc, and the object files end up in third_party/ffmpeg/build.arm64.linux/Chrome/ The second time it is built with clang (using ninja), and the object files end up in out/Release/obj/third_party/ffmpeg/ffmpeg_internal/ I see that the is a patch in files/chromium-ffmpeg-clang.patch to prevent the first build from using clang, but it seems moot if it is rebuilt using clang later anyway?
I removed the ffmpeg configure step in chromium-68.0.3438.3. If you encounter errors with that version, please create a new bug report.
That works on arm64 >>> Installing (26 of 29) www-client/chromium-68.0.3438.3::gentoo
Hi. chromium-68.0.3438.3 gave me two unrelated build fails, so I created a new issue about that (#657472). Thanks.