Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 711656 - media-libs/mesa fails to build with sys-devel/clang-10.0.0_rc3: ERROR: C++ library 'clangCodeGen' not found
Summary: media-libs/mesa fails to build with sys-devel/clang-10.0.0_rc3: ERROR: C++ li...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL: https://gitlab.freedesktop.org/mesa/m...
Whiteboard:
Keywords:
: 714852 715196 (view as bug list)
Depends on: 715196
Blocks: llvm-10
  Show dependency tree
 
Reported: 2020-03-06 08:42 UTC by Johannes Hirte
Modified: 2020-04-30 17:35 UTC (History)
8 users (show)

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


Attachments
mesa-9999 clang-10 patch (mesa-clan10.patch,1.21 KB, patch)
2020-03-13 17:16 UTC, jospezial
Details | Diff
build log with llvm:10 (build.log.gz,133.80 KB, application/gzip)
2020-04-24 13:36 UTC, charles17
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Hirte 2020-03-06 08:42:49 UTC
As llvm/clang are now build with one big shared lib instead of shared libs for all components, build of mesa fails with:

src/gallium/targets/opencl/meson.build:36:0: ERROR: C++ library 'clangCodeGen' not found

upstream is already aware of this: https://gitlab.freedesktop.org/mesa/mesa/issues/2560

Reproducible: Always




emerge --info
Portage 2.3.92 (python 3.8.2-final-0, default/linux/amd64/17.1/systemd, gcc-9.2.0, glibc-2.30-r4, 5.6.0-rc4-00001-gb9a27ae9968f x86_64)
=================================================================
System uname: Linux-5.6.0-rc4-00001-gb9a27ae9968f-x86_64-AMD_Ryzen_5_PRO_2500U_w-_Radeon_Vega_Mobile_Gfx-with-glibc2.4
KiB Mem:    15308888 total,   5599492 free
KiB Swap:    2097148 total,   1651096 free
Head commit of repository gentoo: cfaac76098fe1f301605b7b118ccebbe2814b967

Head commit of repository kde: 372adef934f588f579e156c0ecf77deda37a7004

Head commit of repository qt: 0d81f7d4583d9ecf1b279b83506990c108ba68c8

sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          5.0_p16::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.2::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::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.34::gentoo
sys-devel/gcc:            9.2.0-r4::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r4::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git
    priority: -1000

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo
    priority: 50

local
    location: /var/db/repos/local
    masters: gentoo
    priority: 50

qt
    location: /var/db/repos/qt
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/qt.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=znver1 -mtune=znver1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -ftree-vectorize -fvect-cost-model -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=znver1 -mtune=znver1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -ftree-vectorize -fvect-cost-model -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n"
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 -march=znver1 -mtune=znver1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -ftree-vectorize -fvect-cost-model -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=znver1 -mtune=znver1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -ftree-vectorize -fvect-cost-model -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j8 -l8"
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 aacplus acl activities alsa alt-svc amd64 amr amrenc anacron berkdb bluetooth bzip2 cairo caps celt chm cleartype_hinting cli corefonts crypt cryptsetup cups cxx d3d9 dav1d dbus dell device-mapper djvu dri drm dvd ebook editorconfig efi egl eps epub evdev exif faac fdk ffmpeg fftw flac fontconfig fortran gbm gdbm gif git glamor gmp gold gpg gphoto2 gpm graphviz harfbuzz iconv icu id3tag ipv6 ithreads jpeg kipi lcms lensfun libatomic libcxx libcxxabi libffi libinput libkms libsamplerate libtirpc libunwind libxml2 lm-sensors lz4 lzma lzo mad matroska mjpeg mmap mng mobi modern-top mp3 mpeg mtp multilib mysql ncurses networkmanager nfs nls nptl ogg openal opencv openexr opengl openmp openssl opus pam parted pcre pcre16 pdf png policykit postscript pulseaudio python qml qt5 raw readline s3tc schroedinger sdl sdl2 seccomp sift smp sndfile sox speex spice split-usr sqlite ssl subversion svg system-jsoncpp system-sqlite systemd taglib tcpd tesseract theora threads thumbnail tiff truetype udev uefi unicode urandom usb usbredir user-session v4l vaapi vde vdpau vhosts virgl virt-network virtfs vorbis vpx vte vulkan wavpack wayland webp wmf x264 x265 xattr xcb xcomposite xkb xml xmp xpm xv xvid zip zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="canon ricoh ricoh_g3" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 ssse3 sse4_1 sse4_2" 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" GRUB_PLATFORMS="efi-32 efi-64 pc" INPUT_DEVICES="evdev libinput synaptics" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU BPF NVPTX X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7 python3_8" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="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 1 Matt Turner gentoo-dev 2020-03-09 23:36:43 UTC
What would you have me do? It's not fixed upstream and as noted in $URL the patch Fedora is applying is not suitable for upstream.
Comment 2 Johannes Hirte 2020-03-11 09:57:28 UTC
What about blocking llvm/clang-10 for mesa? Or enforcing llvm/clang-build with individual component libraries, like prior versions are build.
Comment 3 jospezial 2020-03-13 17:16:37 UTC
Created attachment 618586 [details, diff]
mesa-9999 clang-10 patch

(In reply to Matt Turner from comment #1)
> What would you have me do? It's not fixed upstream and as noted in $URL the
> patch Fedora is applying is not suitable for upstream.

The patch from the upstream bug seems to work for me. I made a patch for the live ebuild out of it.
Comment 4 Matt Turner gentoo-dev 2020-03-13 18:05:24 UTC
The one that says

> Looks like that would break static linking (and/or older versions of clang?), so not suitable as-is for upstream I'm afraid.


... no, sorry. Not going to commit that.
Comment 5 Matt Turner gentoo-dev 2020-04-01 22:39:22 UTC
*** Bug 715196 has been marked as a duplicate of this bug. ***
Comment 6 Matt Turner gentoo-dev 2020-04-01 22:42:50 UTC
*** Bug 714852 has been marked as a duplicate of this bug. ***
Comment 7 Matt Turner gentoo-dev 2020-04-03 00:41:00 UTC
A patch is going upstream in https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4417 that fixes this.
Comment 8 jospezial 2020-04-03 12:39:47 UTC
(In reply to Matt Turner from comment #7)
> A patch is going upstream in
> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4417 that fixes
> this.

https://gitlab.freedesktop.org/mesa/mesa/-/commit/ff1a3a00cb37d84ab9a563f0aa241714876f56b4
merged upstream
Comment 9 charles17 2020-04-21 07:35:53 UTC
Tested mesa-20.0.4-r1 with LLVM_MAX_SLOT="10"
And it works.
Comment 10 charles17 2020-04-21 09:26:24 UTC
(In reply to charles17 from comment #9)
> Tested mesa-20.0.4-r1 with LLVM_MAX_SLOT="10"
> And it works.

Please ignore this comment.  It was still running on llvm:9
Comment 11 charles17 2020-04-21 15:16:35 UTC
Of cause, it works, with llvm:10 line in LLVM_DEPSTR.
Please enable llvm-20.0.4-r1 for llvm:10
Comment 12 brankob 2020-04-22 16:42:20 UTC
Don't know what you are talking about.

Could you simplify it and perhaps recheck ?

I just tried setting LLVM_MAX_SLOT=10 and can't emerge mesa-20* nor mesa-9999...
Comment 13 charles17 2020-04-22 19:10:35 UTC
(In reply to Branko Badrljica from comment #12)
> Don't know what you are talking about.
> 
> Could you simplify it and perhaps recheck ?
> 
> I just tried setting LLVM_MAX_SLOT=10 and can't emerge mesa-20* nor
> mesa-9999...

--- /var/db/repos/gentoo/media-libs/mesa/mesa-20.0.4-r1.ebuild  2020-04-13 18:39:41.000000000 +0200
+++ /var/db/repos/testing/media-libs/mesa/mesa-20.0.4-r1.ebuild 2020-04-21 11:30:50.797823180 +0200
@@ -147,9 +147,10 @@
 # 1. List all the working slots (with min versions) in ||, newest first.
 # 2. Update the := to specify *max* version, e.g. < 10.
 # 3. Specify LLVM_MAX_SLOT, e.g. 9.
-LLVM_MAX_SLOT="9"
+LLVM_MAX_SLOT="10"
 LLVM_DEPSTR="
        || (
+               sys-devel/llvm:10[${MULTILIB_USEDEP}]
                sys-devel/llvm:9[${MULTILIB_USEDEP}]
                sys-devel/llvm:8[${MULTILIB_USEDEP}]
        )
Comment 15 charles17 2020-04-24 13:36:17 UTC
Created attachment 634392 [details]
build log with llvm:10

(In reply to Dmitry Derevyanko from comment #14)
> Mesa-20.0.5 includes fix for one big lib:
> https://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/targets/opencl/
> meson.build?h=20.0&id=b5b56d89a16760560bdb4aed03cc302882e7e544

See attached build "build log with llvm:10"
Comment 16 Larry the Git Cow gentoo-dev 2020-04-30 17:35:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbf95d42221567866896f2e3b0ff14f719171724

commit dbf95d42221567866896f2e3b0ff14f719171724
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2020-04-30 17:15:48 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-04-30 17:34:40 +0000

    media-libs/mesa: Version bump to 20.0.6
    
    Closes: https://bugs.gentoo.org/711656
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 media-libs/mesa/Manifest           |   1 +
 media-libs/mesa/mesa-20.0.6.ebuild | 550 +++++++++++++++++++++++++++++++++++++
 2 files changed, 551 insertions(+)