Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 702920 - sys-devel/llvm-10.0.0.9999 fails to install libLLVMFrontendOpenMP.a
Summary: sys-devel/llvm-10.0.0.9999 fails to install libLLVMFrontendOpenMP.a
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: 2019-12-14 18:47 UTC by Mike Lothian
Modified: 2019-12-18 21:19 UTC (History)
2 users (show)

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


Attachments
llvm build log (successful) but no LLVMFrontendOpenMP (llvm-build.log.xz,84.65 KB, application/x-xz)
2019-12-14 18:49 UTC, Mike Lothian
Details
clang failed log, then restarted with -lLLVMFrontendOpenMP removed from build.ninja (clang-build.log.xz,86.29 KB, application/x-xz)
2019-12-14 18:50 UTC, Mike Lothian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2019-12-14 18:47:02 UTC
I think the llvm ebuild is missing the installation of the LLVMFrontendOpenMP files

This causes anything that uses the llvm cmake file to fail (such as clang) with the following error:

/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: cannot find -lLLVMFrontendOpenM

As a work around I've been removing -lLLVMFrontendOpenM from the build.ninja after it fails to allow clang-10 to build

I'm afraid I don't understand the llvm ebuild or the cmake build system enough to debug this further

Reproducible: Always
Comment 1 Mike Lothian 2019-12-14 18:49:13 UTC
Created attachment 599540 [details]
llvm build log (successful) but no LLVMFrontendOpenMP
Comment 2 Mike Lothian 2019-12-14 18:50:11 UTC
Created attachment 599542 [details]
clang failed log, then restarted with -lLLVMFrontendOpenMP removed from build.ninja
Comment 3 Mike Lothian 2019-12-14 18:53:52 UTC
Here are all the files in /var/tmp/portage/sys-devel/clang-10.0.0.9999 related to OpenMP (the OpenMP directory in image is empty

./image/usr/lib/llvm/10/include/llvm/Frontend/OpenMP
./work/llvm-abi_x86_64.amd64/lib64/libLLVMFrontendOpenMP.a
./work/llvm-abi_x86_64.amd64/lib/Frontend/OpenMP
./work/llvm-abi_x86_64.amd64/lib/Frontend/OpenMP/cmake_install.cmake
./work/llvm-abi_x86_64.amd64/lib/Frontend/OpenMP/CMakeFiles
./work/llvm-abi_x86_64.amd64/lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir
./work/llvm-abi_x86_64.amd64/lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o
./work/llvm-abi_x86_64.amd64/lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPConstants.cpp.o
./work/llvm-abi_x86_32.x86/lib/libLLVMFrontendOpenMP.a
./work/llvm-abi_x86_32.x86/lib/Frontend/OpenMP
./work/llvm-abi_x86_32.x86/lib/Frontend/OpenMP/cmake_install.cmake
./work/llvm-abi_x86_32.x86/lib/Frontend/OpenMP/CMakeFiles
./work/llvm-abi_x86_32.x86/lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir
./work/llvm-abi_x86_32.x86/lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o
./work/llvm-abi_x86_32.x86/lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPConstants.cpp.o
./work/llvm/utils/gn/secondary/llvm/lib/Frontend/OpenMP
./work/llvm/utils/gn/secondary/llvm/lib/Frontend/OpenMP/BUILD.gn
./work/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/openmp
./work/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/openmp/BUILD.gn
./work/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
./work/llvm/test/Transforms/IPConstantProp/openmp_parallel_for.ll
./work/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
./work/llvm/lib/Frontend/OpenMP
./work/llvm/lib/Frontend/OpenMP/CMakeLists.txt
./work/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
./work/llvm/lib/Frontend/OpenMP/OMPConstants.cpp
./work/llvm/lib/Frontend/OpenMP/LLVMBuild.txt
./work/llvm/include/llvm/Frontend/OpenMP
./work/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
./work/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
./work/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-15 13:37:27 UTC
I'm surprised you managed to get that far.  Clang is currently completely broken for me due to upstream writing into /usr/lib/llvm/10/bin/gen_ast_dump_json_test.py.
Comment 5 Mike Lothian 2019-12-15 15:24:42 UTC
I've stopped most things using Python 2.7 unless absolutely necessary, has 2.7 support been stripped from Clang 10 perhaps?

[ebuild   R    ] sys-devel/clang-common-9.0.1_rc3::gentoo  0 KiB
[ebuild   R   *] sys-devel/clang-runtime-10.0.0.9999:10.0.0::gentoo  USE="compiler-rt openmp sanitize -libcxx" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild   R   *] sys-devel/llvmgold-10::gentoo  0 KiB
[ebuild   R   *] sys-devel/llvm-10.0.0.9999:10::gentoo  USE="gold libffi xml -debug -doc -exegesis -libedit -ncurses -test -xar -z3" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU (X86) -AArch64 -ARC -ARM -AVR -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ -WebAssembly -XCore" 0 KiB
[ebuild   R   *] sys-devel/llvm-common-10.0.0.9999::gentoo  0 KiB
[ebuild   R    ] dev-util/cmake-3.16.1::gentoo  USE="ncurses qt5 -doc -emacs -system-jsoncpp -test" 0 KiB
[ebuild   R   *] sys-libs/libomp-10.0.0.9999::gentoo  USE="ompt -cuda -hwloc -offload -test" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild   R   *] sys-devel/clang-10.0.0.9999:10::gentoo  USE="static-analyzer xml -debug -default-compiler-rt -default-libcxx -doc -test" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU (X86) -AArch64 -ARC -ARM -AVR -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ -WebAssembly -XCore" PYTHON_SINGLE_TARGET="python3_7 -python2_7 -python3_5 -python3_6" PYTHON_TARGETS="python3_7 -python2_7 -python3_5 -python3_6" 0 KiB
[ebuild   R   *] sys-libs/compiler-rt-10.0.0.9999:10.0.0::gentoo  USE="clang -test" 0 KiB
[ebuild   R   *] sys-libs/compiler-rt-sanitizers-10.0.0.9999:10.0.0::gentoo  USE="clang libfuzzer profile sanitize xray -test" 0 KiB


These are the USE flags I'm using 

And here's the output of emerge --info


Portage 2.3.81 (python 3.7.5-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.2.0, glibc-2.30-r3, 5.5.0-rc1-tip+ x86_64)
=================================================================
System uname: Linux-5.5.0-rc1-tip+-x86_64-Intel-R-_Core-TM-_i7-6820HK_CPU_@_2.70GHz-with-gentoo-2.6
KiB Mem:    32748184 total,   3777492 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: 6421d9661b623c9c784c338f339d1931144857dc

Head commit of repository FireBurn: e455e01dd1b92614ced7749b9295b0a818c1f661

Head commit of repository gamerlay: 4bbdd8768371bef56d8c9b0b738493673b535d5d

Head commit of repository kde: b5c03cc131a0b6cd7e974261db7e28dba0df5c2e

Timestamp of repository qt: Thu, 12 Dec 2019 22:45:46 +0000
Head commit of repository qt: f51707e1c2d2e892304fd9bcc2d0d688a8b7feac

Timestamp of repository steam-overlay: Wed, 11 Dec 2019 23:05:48 +0000
Head commit of repository steam-overlay: 23f79bf5bc34331d92ec1db826242148d993b6ee

Timestamp of repository x11: Wed, 11 Dec 2019 19:13:35 +0000
Head commit of repository x11: 39c732f6456c27b91a4fe8a764bf474659a8131f

sh bash 5.0_p11
ld GNU gold (Gentoo 2.33.1 p1 2.33.1) 1.16
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.7.5-r1::gentoo
dev-util/cmake:           3.16.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.33.1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo
    priority: -1000

FireBurn
    location: /home/fireburn/Overlay
    sync-type: git
    sync-uri: https://github.com/FireBurn/Overlay
    sync-user: fireburn:users
    masters: gentoo

gamerlay
    location: /var/db/repos/gamerlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gamerlay.git
    masters: gentoo

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo

qt
    location: /var/db/repos/qt
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/qt.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

x11
    location: /var/db/repos/x11
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/x11.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=native -pipe -flto=8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
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="-O3 -march=native -pipe -flto=8"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write --with-bdeps y --complete-graph y --keep-going"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://mirror.bytemark.co.uk/gentoo/ https://mirrors.evowise.com/gentoo/ http://gentoo.osuosl.org http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -flto=8"
LINGUAS="en_GB en"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/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 activities alsa amd64 apng berkdb bluetooth branding brightness-control bzip2 cairo cdr cli connection-sharing crypt cups custom-cflags cxx d3d9 dav1d dbus declarative default-gold dri dri3 drm dts dvdr egl emboss encode exif fam faudio ffmpeg flac fortran gbm gdbm gentoo-vm gif gold googledrive gpm graphite gstreamer gtk harfbuzz http2 iconv icu ipv6 ithreads jpeg kde kipi kwallet lcms ldap legacy-systray libkms libnotify libtirpc llvm lm-sensors lzma lzo mad mng mp3 mp4 mpeg mpris mpx multilib ncurses networkmanager nls nptl nsplugin ogg ompt openal opengl openmp openssl opus pam pango pba pcre pdf pdfimport phonon plasma png policykit postproc ppds pulseaudio qml qt5 readline seccomp spell split-usr ssl startup-notification svg sync-plugin-portage systemd tcpd theora threads thumbnail tiff touchpad truetype udev udisks unicode upower usb user-session v4l vaapi vdpau vkd3d vorbis vpx vulkan vulkan-overlay wayland webp widgets wifi wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" 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 access_compat" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="evdev synaptics libinput" KERNEL="linux" L10N="en-GB en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU OpenMP" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel i965 iris radeon radeonsi amdgpu" 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, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 6 Mike Lothian 2019-12-16 11:31:20 UTC
This works around the issue in clang until llvm can be sorted:

--- a/usr/portage/sys-devel/clang/clang-10.0.0.9999.ebuild
+++ b/usr/portage/sys-devel/clang/clang-10.0.0.9999.ebuild
@@ -285,6 +285,7 @@
 }

 multilib_src_compile() {
+       sed -i 's#-lLLVMFrontendOpenMP##g' ${BUILD_DIR}/build.ninja || die
        cmake-utils_src_compile

        # provide a symlink for tests
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-18 21:19:25 UTC
That's not a bug.  Clang-tidy is wrongly trying to link it.  I've prepared a patch [1].  Since this is a live ebuild, I'm just going to wait till it's reviewed and push it upstream.