Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 760255 - dev-lang/spidermonkey:102[clang] fails to compile on arm with fatal error: 'type_traits' file not found
Summary: dev-lang/spidermonkey:102[clang] fails to compile on arm with fatal error: 't...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-16 13:24 UTC by tt_1
Modified: 2022-08-20 12:05 UTC (History)
2 users (show)

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


Attachments
compressed build log (failed-spidermonkey-without-lto+clang-10.0.1.log.gz,19.37 KB, application/gzip)
2020-12-16 13:24 UTC, tt_1
Details
output from emerge --info (emerge-info,5.28 KB, text/plain)
2020-12-16 13:26 UTC, tt_1
Details
compressed log (failed-spidermonkey-lto+clang.log.gz,19.42 KB, application/gzip)
2020-12-17 14:19 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2020-12-16 13:24:35 UTC
Created attachment 678484 [details]
compressed build log

tested toolchains are: 

rust-bin-1.41.1 + llvm9
rust-bin-1.44.1 + llvm9
rust-bin-1.45.2 + llvm10
rust-bin-1.46.0 + llvm10

they all fail with the same error: 

The following warnings were emitted during compilation:

warning: In file included from wrappers.cpp:11:
warning: In file included from /var/tmp/portage/dev-lang/spidermonkey-78.6.0/work/build/dist/include/mozilla/Assertions.h:418:
warning: /var/tmp/portage/dev-lang/spidermonkey-78.6.0/work/build/dist/system_wrappers/type_traits:3:15: fatal error: 'type_traits' file not found
warning: #include_next <type_traits>
warning:               ^~~~~~~~~~~~~
warning: 1 error generated.

error: failed to run custom build command for `mozglue-static v0.1.0 (/var/tmp/portage/dev-lang/spidermonkey-78.6.0/work/firefox-78.6.0/mozglue/static/rust)`


output from emerge -pv spidermonkey: 

emerge -pv =spidermonkey-78.6.0: [ebuild     U ~] dev-lang/spidermonkey-78.6.0:78::gentoo [78.5.0:78::gentoo] USE="clang%* jit -debug -lto* -test" CPU_FLAGS_ARM="neon" 0 KiB
Comment 1 tt_1 2020-12-16 13:26:13 UTC
Created attachment 678487 [details]
output from emerge --info
Comment 2 tt_1 2020-12-16 13:28:38 UTC
problem with this bug is, I fail to understand from where the failed include of type_traits might actually come from. Anyone able to help and give some advice maybe? 

and maybe it's possible to not force the clang, at least for spidermonkey, so that arm people can still use desktop until this is solved?
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2020-12-17 13:32:44 UTC
Please try

> --- old/gfx/angle/checkout/src/compiler/translator/InfoSink.h
> +++ new/gfx/angle/checkout/src/compiler/translator/InfoSink.h
> @@ -7,7 +7,7 @@
>  #ifndef COMPILER_TRANSLATOR_INFOSINK_H_
>  #define COMPILER_TRANSLATOR_INFOSINK_H_
> 
> -#include <math.h>
> +#include <cmath>
>  #include <stdlib.h>
>  #include "compiler/translator/Common.h"
>  #include "compiler/translator/Severity.h"
>
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2020-12-17 13:36:21 UTC
I wonder about your tested toolchains btw, FreeBSD did https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250161 to address this. But let's see if the patch will help you.
Comment 5 tt_1 2020-12-17 14:19:22 UTC
Created attachment 678586 [details]
compressed log

hey, thanks for picking this up. Sadly, the patch didn't work, build log is attached. 

I can't even find the correct line in the source code, where the type_traits header is included. Were you able to find it?
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2020-12-21 16:53:48 UTC
Does www-client/firefox with enforced clang build on the same system for you?
Comment 7 tt_1 2020-12-21 17:03:03 UTC
my device has not enough ram to build firefox nativly, maybe you can ask sam_ to test that for you? I've heard he is affiliated with the team that has access to the very strong arm device they got donated.
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2020-12-21 17:38:09 UTC
That's why I am asking because it builds on our test box and I currently have to decide to hold back stabilization because of the problem you reported or ignore it because we cannot reproduce.
Comment 9 tt_1 2020-12-21 21:07:17 UTC
well, then please provide all the infos from that machine and we will compare them to gain some insight from that. I need whole clang/llvm/lld and rust useflags at least in addition to emerge --info
Comment 10 Steve Arnold archtester gentoo-dev 2021-04-14 17:39:53 UTC
Getting the same error now with latest armv7 stage3, and I don't have a workaround/fix:

  cargo:warning=In file included from wrappers.cpp:11:
  cargo:warning=In file included from /var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/build/dist/include/mozilla/Assertions.h:418:
  cargo:warning=/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/build/dist/system_wrappers/type_traits:3:15: fatal error: 'type_traits' file not found
  cargo:warning=#include_next <type_traits>
  cargo:warning=              ^~~~~~~~~~~~~
  cargo:warning=1 error generated.
  exit code: 1

  --- stderr


  error occurred: Command "/usr/lib/llvm/11/bin/armv7a-unknown-linux-gnueabihf-clang++" "-std=gnu++17" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=armv7-unknown-linux-gnueabihf" "-I/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/build/dist/system_wrappers" "-include" "/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/firefox-78.9.0/config/gcc_hidden.h" "-fstack-protector-strong" "-DNDEBUG=1" "-DTRIMMED=1" "-DEXPORT_JS_API" "-DMOZ_HAS_MOZGLUE" "-I/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/firefox-78.9.0/js/src/rust" "-I/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/build/js/src/rust" "-I/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/build/dist/include" "-I/usr/include/nspr" "-fPIC" "-DMOZILLA_CLIENT" "-include" "/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/build/js/src/js-confdefs.h" "-Qunused-arguments" "-Qunused-arguments" "-Wall" "-Wbitfield-enum-conversion" "-Wempty-body" "-Wignored-qualifiers" "-Woverloaded-virtual" "-Wpointer-arith" "-Wshadow-field-in-constructor-modified" "-Wsign-compare" "-Wtype-limits" "-Wunreachable-code" "-Wunreachable-code-return" "-Wwrite-strings" "-Wno-invalid-offsetof" "-Wclass-varargs" "-Wempty-init-stmt" "-Wfloat-overflow-conversion" "-Wfloat-zero-conversion" "-Wloop-analysis" "-Wc++2a-compat" "-Wcomma" "-Wimplicit-fallthrough" "-Wunused-function" "-Wunused-variable" "-Wstring-conversion" "-Wtautological-overlap-compare" "-Wtautological-unsigned-enum-zero-compare" "-Wtautological-unsigned-zero-compare" "-Wno-error=tautological-type-limit-compare" "-Wno-inline-new-delete" "-Wno-error=deprecated-declarations" "-Wno-error=array-bounds" "-Wno-error=backend-plugin" "-Wno-error=return-std-move" "-Wno-error=atomic-alignment" "-Wno-error=deprecated-copy" "-Wformat" "-Wformat-security" "-Wno-gnu-zero-variadic-macro-arguments" "-Wno-noexcept-type" "-Wno-unknown-warning-option" "-fno-sized-deallocation" "-fno-aligned-new" "-mtune=generic-armv7-a" "-mfloat-abi=hard" "-O2" "-pipe" "-ftree-vectorize" "-mfpu=neon" "-fno-rtti" "-ffunction-sections" "-fdata-sections" "-fno-exceptions" "-fno-math-errno" "-pthread" "-pipe" "-g" "-fno-omit-frame-pointer" "-funwind-tables" "-fexperimental-new-pass-manager" "-DMOZILLA_CONFIG_H" "-I" "/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/build/js/src" "-I" "/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/build/dist/include" "-DMOZ_HAS_MOZGLUE" "-o" "/var/tmp/portage/dev-lang/spidermonkey-78.9.0/work/build/armv7-unknown-linux-gnueabihf/release/build/mozglue-static-fb662835e3e8c2af/out/wrappers.o" "-c" "wrappers.cpp" with args "armv7a-unknown-linux-gnueabihf-clang++" did not execute successfully (status code exit code: 1).


warning: build failed, waiting for other jobs to finish...
Comment 11 Steve Arnold archtester gentoo-dev 2021-04-14 17:42:04 UTC
Portage 3.0.18 (python 3.8.9-final-0, default/linux/arm/17.0/armv7a/desktop/gnome, gcc-10.3.0, glibc-2.33, 5.3.0-00001-gc094c373f029 armv7l)
=================================================================
System uname: Linux-5.3.0-00001-gc094c373f029-armv7l-ARMv7_Processor_rev_3_-v7l-with-glibc2.4
KiB Mem:     4021728 total,   1371968 free
KiB Swap:    4193276 total,   4117244 free
Timestamp of repository gentoo: Sun, 11 Apr 2021 00:45:01 +0000
sh bash 5.1_p4
ld GNU gold (Gentoo 2.35.2 p1 2.35.2) 1.16
app-shells/bash:          5.1_p4::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          3.8.9::gentoo, 3.9.4::gentoo
dev-lang/rust-bin:        1.51.0::gentoo
dev-util/cmake:           3.20.1::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.43.1::gentoo
sys-apps/sandbox:         2.23::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.3.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: webrsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-webrsync-verify-signature: true

nerdboy
    location: /usr/local/portage/nerdboy
    masters: gentoo
    priority: 0

arm_nerdboy
    location: /usr/local/portage/arm
    masters: gentoo
    priority: 1

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="@FREE CC-Sampling-Plus-1.0 linux-fw-redistributable no-source-code"
CBUILD="armv7a-unknown-linux-gnueabihf"
CFLAGS="-march=armv7-a+mp+sec+simd -mtune=generic-armv7-a -flto -mfpu=auto -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap"
CHOST="armv7a-unknown-linux-gnueabihf"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=armv7-a+mp+sec+simd -mtune=generic-armv7-a -flto -mfpu=auto -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=5 --load-average=4"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=armv7-a+mp+sec+simd -mtune=generic-armv7-a -flto -mfpu=auto -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=armv7-a+mp+sec+simd -mtune=generic-armv7-a -flto -mfpu=auto -mfp16-format=ieee -mfloat-abi=hard -O2 -pipe -ftree-vectorize -ftree-loop-distribution -fvect-cost-model=cheap"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed -fuse-linker-plugin"
LINGUAS="en_US en"
MAKEOPTS="-j5 -l4"
PKGDIR="/var/cache/portage/packages"
PORTAGE_BZIP2_COMMAND="/bin/bzip2"
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 alsa arm berkdb bluetooth branding bzip2 cairo caps cdda cdr clang cli colord crypt cups dbus dri dts dvd dvdr eds egl elogind emboss encode evo exif flac fortran gdbm gif gles2 gles2-only gnome gnome-keyring gnome-online-accounts gold gpm gstreamer gtk gui iconv icu introspection ipv6 jpeg lcms libglvnd libnotify libsecret logrotate lto lzma mad mng mp3 mp4 mpeg nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp spell split-usr ssl startup-notification svg sysprof tcpd tiff truetype udev udisks unicode upower usb vala vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib zstd" ADA_TARGET="gnat_2018" ALSA_CARDS="snd_soc_tegra_max98090 usb-audio" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 v4 v5 v6 v7 thumb2" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput synaptics" KERNEL="linux" L10N="en en-US en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="tegra exynos lima panfrost" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 12 Andrew Athalye 2022-02-11 01:37:49 UTC
I'm able to reproduce this exact problem on musl amd64 - that is to say it fails with #include_next <type_traits> and cannot successfully compile if USE="clang" is enabled. I suspect the causes are related but I can create a separate issue if desired. libstdc++ is also set to be used by clang.