Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796350 - sys-devel/clang-12.0.0-r1 compilation failure
Summary: sys-devel/clang-12.0.0-r1 compilation failure
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-16 14:39 UTC by Paolo Pedroni
Modified: 2021-06-17 14:14 UTC (History)
1 user (show)

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


Attachments
clang-12.0.0-r1:20210616-143524.log.gz (clang-12.0.0-r1:20210616-143524.log.gz,9.99 KB, application/gzip)
2021-06-16 14:39 UTC, Paolo Pedroni
Details
clang-12.0.0-r1:20210616-143241.log.gz (compilation with gcc) (clang-12.0.0-r1:20210616-143241.log.gz,15.04 KB, application/gzip)
2021-06-16 14:49 UTC, Paolo Pedroni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Pedroni 2021-06-16 14:39:42 UTC
Created attachment 716457 [details]
clang-12.0.0-r1:20210616-143524.log.gz

FAILED: bin/clang-tblgen 
: && /usr/lib/llvm/11/bin/clang++ -m32 -O2 -pipe -frecord-gcc-switches -march=skylake -ftree-vectorize -flto=thin -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -pedantic -Wno-long-long -Wno-nested-anon-types -Wl,-O2 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -ftree-vectorize -fuse-ld=lld -flto=thin -Wl,--color-diagnostics    -Wl,-O3 -Wl,--gc-sections utils/TableGen/CMakeFiles/clang-tblgen.dir/ASTTableGen.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangASTNodesEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangASTPropertiesEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentCommandInfoEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangCommentHTMLTagsEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDataCollectorsEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangDiagnosticsEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOpcodesEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOpenCLBuiltinEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangOptionDocEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangSACheckersEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangSyntaxEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangTypeNodesEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/MveEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/NeonEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/SveEmitter.cpp.o utils/TableGen/CMakeFiles/clang-tblgen.dir/TableGen.cpp.o -o bin/clang-tblgen -L/usr/lib/llvm/12/lib -Wl,-rpath,"\$ORIGIN/../lib"  /usr/lib/llvm/12/lib/libLLVMSupport.a  /usr/lib/llvm/12/lib/libLLVMTableGen.a  -lpthread  /usr/lib/llvm/12/lib/libLLVMSupport.a  -lrt  -ldl  -lpthread  -lm  /usr/lib/libz.so  /usr/lib/libtinfo.so  /usr/lib/llvm/12/lib/libLLVMDemangle.a && :
Wrong types for attribute: inalloca nest noalias nocapture noundef nonnull readnone readonly signext zeroext byref(void) byval(void) preallocated(void) sret(void) align 1 dereferenceable(1) dereferenceable_or_null(1)
  tail call fastcc align 4 void @_ZL25getPragmaAttributeSupportRN4llvm12RecordKeeperE(%"class.llvm::RecordKeeper"* nonnull align 4 dereferenceable(97) %0)
in function _ZN5clang33EmitClangAttrSubjectMatchRuleListERN4llvm12RecordKeeperERNS0_11raw_ostreamE
LLVM ERROR: Broken function found, compilation aborted!
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.      Running pass 'Function Pass Manager' on module 'utils/TableGen/CMakeFiles/clang-tblgen.dir/ClangAttrEmitter.cpp.o'.
1.      Running pass 'Module Verifier' on function '@_ZN5clang33EmitClangAttrSubjectMatchRuleListERN4llvm12RecordKeeperERNS0_11raw_ostreamE'
 #0 0x00007fb0d3d48770 (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x1a1d770)
 #1 0x00007fb0d3d45fa2 llvm::sys::RunSignalHandlers() (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x1a1afa2)
 #2 0x00007fb0d3d48eba (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x1a1deba)
 #3 0x00007fb0d204d780 (/lib64/libc.so.6+0x38780)
 #4 0x00007fb0d204d701 raise (/lib64/libc.so.6+0x38701)
 #5 0x00007fb0d2037536 abort (/lib64/libc.so.6+0x22536)
 #6 0x00007fb0d3c7a6f2 llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x194f6f2)
 #7 0x00007fb0d3c7a568 (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x194f568)
 #8 0x00007fb0d3f53a6f (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x1c28a6f)
 #9 0x00007fb0d3ec784b llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x1b9c84b)
#10 0x00007fb0d3ecf8e3 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x1ba48e3)
#11 0x00007fb0d3ec8121 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x1b9d121)
#12 0x00007fb0d55059f2 llvm::lto::opt(llvm::lto::Config const&, llvm::TargetMachine*, unsigned int, llvm::Module&, bool, llvm::ModuleSummaryIndex*, llvm::ModuleSummaryIndex const*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&) (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x31da9f2)
#13 0x00007fb0d550ae94 (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x31dfe94)
#14 0x00007fb0d550aa06 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap<std::__1::unordered_set<unsigned long, std::__1::hash<unsigned long>, std::__1::equal_to<unsigned long>, std::__1::allocator<unsigned long> >, llvm::MallocAllocator> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*> > const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >, std::__1::vector<std::__1::pair<llvm::StringRef, llvm::BitcodeModule>, std::__1::allocator<std::__1::pair<llvm::StringRef, llvm::BitcodeModule> > > >&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&) (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x31dfa06)
#15 0x00007fb0d55020c7 (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x31d70c7)
#16 0x00007fb0d5501bee (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x31d6bee)
#17 0x00007fb0d3cebb83 std::__1::packaged_task<void ()>::operator()() (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x19c0b83)
#18 0x00007fb0d3ceb992 (/usr/lib/llvm/12/lib64/libLLVM-12libcxx.so+0x19c0992)
#19 0x00007fb0d1f11e3e start_thread (/lib64/libpthread.so.0+0x7e3e)
#20 0x00007fb0d210d92f clone (/lib64/libc.so.6+0xf892f)
clang-11: error: unable to execute command: Aborted (core dumped)
clang-11: error: linker command failed due to signal (use -v to see invocation)
ninja: build stopped: subcommand failed.
 * ERROR: sys-devel/clang-12.0.0-r1::gentoo failed (compile phase):
 *   ninja -v -j7 -l6 distribution failed

# emerge --info =sys-devel/clang-12.0.0-r1
Portage 3.0.18 (python 3.9.5-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-10.3.0, glibc-2.33, 5.10.27-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.10.27-gentoo-x86_64-Intel-R-_Core-TM-_i5-8400_CPU_@_2.80GHz-with-glibc2.33
KiB Mem:    16055264 total,   4893148 free
KiB Swap:   16777212 total,  11201088 free
Timestamp of repository gentoo: Wed, 16 Jun 2021 07:30:01 +0000
Head commit of repository gentoo: c09f2e2eb0e996be2497a17e1f8c6dafb9b70297
sh dash 0.5.11.3-r1
ld GNU gold (Gentoo 2.35.2 p1 2.35.2) 1.16
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 4.3 [disabled]
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          2.7.18_p10::gentoo, 3.9.5_p2::gentoo
dev-lang/rust:            1.52.1::gentoo
dev-util/ccache:          4.3::gentoo
dev-util/cmake:           3.18.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.24::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.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -frecord-gcc-switches -march=skylake -mabm -ftree-vectorize -flto=6"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt"
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="-O2 -pipe -frecord-gcc-switches -march=skylake -mabm -ftree-vectorize -flto=6"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going y --with-bdeps y"
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="-O2 -pipe -frecord-gcc-switches -march=skylake -mabm -ftree-vectorize -flto=6"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs cgroup compress-build-logs config-protect-if-modified distlocks ebuild-locks ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign split-elog split-log strict strict-keepdir test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -frecord-gcc-switches -march=skylake -mabm -ftree-vectorize -flto=6"
GENTOO_MIRRORS="http://mirror.init7.net/gentoo/ https://mirror.init7.net/gentoo/ http://mirror.leaseweb.com/gentoo/ http://ftp.fau.de/gentoo"
LANG="it_IT.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -ftree-vectorize -flto=6"
LINGUAS="it it_IT"
MAKEOPTS="-j7 -l6"
PKGDIR="/var/cache/binpkgs"
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 aalib acl acpi activities adns alsa amd64 ao audiofile bash-completion bluetooth branding brotli bzip2 cairo caps cdda cddb cdparanoia cdr cli crypt css cups curl dbus declarative dga djvu dri dts dvd dvdr emboss encode exif expat fbcon ffmpeg fftw flac fontconfig foomaticdb fortran ftp gd gdbm geoip gif gimp gmp gnutls gphoto2 gpm graphviz gtk gui handbook iconv icu idn imagemagick imlib introspection ipv6 java javascript jbig jemalloc jpeg jpeg2k kde kipi kwallet lame lcms libass libglvnd libnotify libsamplerate libtirpc lm_sensors lua lzma lzo mad magic mmap mng mp3 mp4 mpeg mplayer multilib musicbrainz ncurses nls nptl nsplugin offensive ogg openal opengl openmp pam pango pch pcre pdf phonon plasma png policykit postscript ppds pulseaudio qml qt5 rdesktop readline recode samba sctp sdl seccomp sndfile sockets speex spell split-usr sqlite ssl startup-notification svg symlink syslog systemd sysvipc taglib telemetry test theora threads tidy tiff truetype udev udisks unicode upower usb v4l vaapi vala verify-sig vim-syntax vnc vorbis wavpack wayland widgets win32codecs wmf wxwidgets x264 xattr xcb xine xinerama xml xpm xscreensaver xv xvid yahoo zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel virmidi" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="gnutls" 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" KERNEL="linux" L10N="it en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="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_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel i965" 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

# emerge -1pqv =sys-devel/clang-12.0.0-r1
[ebuild  NS   ] sys-devel/clang-12.0.0-r1 [11.1.0] USE="default-compiler-rt default-libcxx default-lld llvm-libunwind%* static-analyzer test xml -debug -doc" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARC -ARM -AVR (-CSKY) -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore" PYTHON_SINGLE_TARGET="python3_9 -python3_8"
Comment 1 Paolo Pedroni 2021-06-16 14:49:05 UTC
On my system clang (and all the toolchain) is built with the following environment variables set:

CC="clang"                            
CPP="clang-cpp"
CXX="clang++"                         
LD="ld.lld"
CFLAGS="-O2 -pipe -frecord-gcc-switches -march=skylake -ftree-vectorize -flto=thin"              
CXXFLAGS="-O2 -pipe -frecord-gcc-switches -march=skylake -ftree-vectorize -flto=thin"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -ftree-vectorize -fuse-ld=lld -flto=thin"
AR="llvm-ar"
NM="llvm-nm"
STRIP="llvm-strip"
RANLIB="llvm-ranlib"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
OBJSIZE="llvm-size"
READELF="llvm-readelf"

I also tried building sys-devel/clang-12.0.0-r1 with gcc, but the compilation stops at the same point with a different (and much longer) error.
Comment 2 Paolo Pedroni 2021-06-16 14:49:48 UTC
Created attachment 716460 [details]
clang-12.0.0-r1:20210616-143241.log.gz (compilation with gcc)
Comment 3 Paolo Pedroni 2021-06-17 14:14:47 UTC
Problem was apparently on my end. After building llvm and clang with gcc, and then rebuilding with clang, the failure disappeared.

Closing as INVALID.