Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 664536 - media-libs/mesa-18.2.0_rc4: meson.build:36:0: ERROR: C++ library 'clangCodeGen' not found
Summary: media-libs/mesa-18.2.0_rc4: meson.build:36:0: ERROR: C++ library 'clangCodeG...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-25 06:55 UTC by Michael Mair-Keimberger (mm1ke)
Modified: 2018-08-31 20:53 UTC (History)
1 user (show)

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


Attachments
build.log of mesa (build.zip,2.90 KB, application/zip)
2018-08-25 06:55 UTC, Michael Mair-Keimberger (mm1ke)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Mair-Keimberger (mm1ke) 2018-08-25 06:55:38 UTC
Created attachment 544952 [details]
build.log of mesa

Hi,

Trying to merge mesa-18.2 fails with following error:

Program nm found: YES (/usr/bin/nm)
DEPRECATION: build_always is deprecated. Combine build_by_default and build_always_stale instead.
Program /var/tmp/portage/media-libs/mesa-18.2.0_rc4/work/mesa-18.2.0-rc4/bin/install_megadrivers.py found: YES (/var/tmp/portage/media-libs/mesa-18.2.0_rc4/work/mesa-18.2.0-rc4/bin/install_megadrivers.py)
Checking for function "mincore" : YES

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

A full log can be found at /var/tmp/portage/media-libs/mesa-18.2.0_rc4/work/mesa-18.2.0-rc4-abi_x86_32.x86/meson-logs/meson-log.txt
 * ERROR: media-libs/mesa-18.2.0_rc4::gentoo failed (configure phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_configure
 *   environment, line 3333:  Called multilib-minimal_src_configure
 *   environment, line 1834:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *   environment, line 2048:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 1764:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 1762:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *   environment, line  807:  Called multilib-minimal_abi_src_configure
 *   environment, line 1828:  Called multilib_src_configure
 *   environment, line 2357:  Called meson_src_configure
 *   environment, line 1701:  Called die
 * The specific snippet of code:
 *       tc-env_build "$@" || die


Installed meson version is: dev-util/meson-0.47.1
emerge --info:
Portage 2.3.48 (python 2.7.15-final-0, default/linux/amd64/17.1, gcc-7.3.0, glibc-2.27-r6, 4.18.1-gentoo-r1 x86_64)
=================================================================
System uname: Linux-4.18.1-gentoo-r1-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    16412280 total,  11164040 free
KiB Swap:    8388604 total,   8351996 free
Timestamp of repository gentoo: Fri, 24 Aug 2018 00:45:01 +0000
Head commit of repository gentoo: b16e2bf244f7dca3c69b3462ed859ed258f27b84
sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p1) 2.31.1
app-shells/bash:          4.4_p23::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.6::gentoo
dev-util/cmake:           3.12.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo, 8.2.0-r2::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.17::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.2.22/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: --info=progress2,name0,del0
    sync-rsync-verify-max-age: 24

local
    location: /media/overlays/local
    masters: gentoo
    priority: 0

steam-overlay
    location: /media/overlays/layman/steam-overlay
    masters: gentoo
    priority: 1

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=bdver2 -mprefer-avx128"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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="-O2 -pipe -march=bdver2 -mprefer-avx128"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=8 --load-average 8"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY 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-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--info=progress2,name0,del0"
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="aac acl alsa amd64 berkdb bzip2 cli crypt cxx dbus dri egl elogind evdev exif flac gdbm gpg iconv icu ipv6 jpeg kde ldap libtirpc lzma mad modules mp3 mp4 multilib ncurses nls nptl openal opengl openmp opus otr pam pcre png python qt5 readline sdl seccomp ssl svg tcpd threads tiff truetype udev unicode vaapi vdpau vim-syntax vorbis vpx wayland webp x264 xattr xcb xinerama xml zlib" ABI_X86="64" 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="krita sheets words karbon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" CURL_SSL="gnutls" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev libinput" KERNEL="linux" L10N="en" 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 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="arm x86_64" QEMU_USER_TARGETS="arm x86_64" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi" 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, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Matt Turner gentoo-dev 2018-08-30 17:24:26 UTC
What version of clang do you have installed?

I just successfully built Mesa and clang with

ABI_X86=32 VIDEO_CARDS="radeon amdgpu radeonsi intel i965" USE="gallium llvm opencl" emerge =mesa-18.2.0_rc4 -va1

mesa-18.2.0_rc4 and clang-6.0.1.

qlist clang | grep clangCodeGen shows

/usr/lib/llvm/6/lib32/libclangCodeGen.so.6.0.1
/usr/lib/llvm/6/lib64/libclangCodeGen.so.6
/usr/lib/llvm/6/lib64/libclangCodeGen.so
/usr/lib/llvm/6/lib64/libclangCodeGen.so.6.0.1
/usr/lib/llvm/6/lib32/libclangCodeGen.so.6
/usr/lib/llvm/6/lib32/libclangCodeGen.so

Maybe you have an older version of clang that doesn't have libclangCodeGen? Perhaps we need to raise the clang dependency.
Comment 2 Matt Turner gentoo-dev 2018-08-30 17:33:10 UTC
Well, I see from the build log that you at least have llvm-6. Confirming your clang version would be good. I see in Mesa that clangCodeGen has been needed since at least 2012, so the library isn't new either.

Is clang built with ABI_X86=32? I see that your build failed in the 32-bit stage. Does Mesa configure properly without ABI_X86=32?
Comment 3 Michael Mair-Keimberger (mm1ke) 2018-08-31 15:49:35 UTC
Hi, 

I just recompiled clang-6.0.1 and now i could compile mesa-18.2.0_rc5 too.

I also checked for the libclangCodeGen files. I already had them installed before the rebuild.
qlist clang | grep clangCodeGen
/usr/lib/llvm/6/lib32/libclangCodeGen.so
/usr/lib/llvm/6/lib32/libclangCodeGen.so.6.0.1
/usr/lib/llvm/6/lib64/libclangCodeGen.so
/usr/lib/llvm/6/lib64/libclangCodeGen.so.6.0.1
/usr/lib/llvm/6/lib64/libclangCodeGen.so.6
/usr/lib/llvm/6/lib32/libclangCodeGen.so.6

Anyway, either the rebuild or the new rc solved the problem for me, i'll gonna close this bug.
Comment 4 Alexander Tsoy 2018-08-31 17:14:08 UTC
(In reply to Michael Mair-Keimberger (iamnr3) from comment #3)
> Hi, 
> 
> I just recompiled clang-6.0.1 and now i could compile mesa-18.2.0_rc5 too.
> 
> I also checked for the libclangCodeGen files. I already had them installed
> before the rebuild.
> qlist clang | grep clangCodeGen
> /usr/lib/llvm/6/lib32/libclangCodeGen.so
> /usr/lib/llvm/6/lib32/libclangCodeGen.so.6.0.1
> /usr/lib/llvm/6/lib64/libclangCodeGen.so
> /usr/lib/llvm/6/lib64/libclangCodeGen.so.6.0.1
> /usr/lib/llvm/6/lib64/libclangCodeGen.so.6
> /usr/lib/llvm/6/lib32/libclangCodeGen.so.6
The correct llvm libdir for x86_32 ABI on the 17.1 profiles is as follows:
$ i686-pc-linux-gnu-llvm-config --libdir
/usr/lib/llvm/6/lib

So you probably have rebuilt llvm after migration to 17.1 profile, but forgot about clang.
Comment 5 Michael Mair-Keimberger (mm1ke) 2018-08-31 18:03:47 UTC
(In reply to Alexander Tsoy from comment #4)
> (In reply to Michael Mair-Keimberger (iamnr3) from comment #3)
> > Hi, 
> > 
> > I just recompiled clang-6.0.1 and now i could compile mesa-18.2.0_rc5 too.
> > 
> > I also checked for the libclangCodeGen files. I already had them installed
> > before the rebuild.
> > qlist clang | grep clangCodeGen
> > /usr/lib/llvm/6/lib32/libclangCodeGen.so
> > /usr/lib/llvm/6/lib32/libclangCodeGen.so.6.0.1
> > /usr/lib/llvm/6/lib64/libclangCodeGen.so
> > /usr/lib/llvm/6/lib64/libclangCodeGen.so.6.0.1
> > /usr/lib/llvm/6/lib64/libclangCodeGen.so.6
> > /usr/lib/llvm/6/lib32/libclangCodeGen.so.6
> The correct llvm libdir for x86_32 ABI on the 17.1 profiles is as follows:
> $ i686-pc-linux-gnu-llvm-config --libdir
> /usr/lib/llvm/6/lib
> 
> So you probably have rebuilt llvm after migration to 17.1 profile, but
> forgot about clang.

Hmm, i made the switch to 17.1 on the 27-28.07.18 and genlop tells me both packages were build that day:
     Sat Jul 28 04:03:16 2018 >>> sys-devel/llvm-6.0.1
       merge time: 30 minutes and 43 seconds.
     Sat Jul 28 04:58:43 2018 >>> sys-devel/clang-6.0.1
       merge time: 32 minutes and 8 seconds

Anyway, you're right, the libdir was false and that was probably because of the profile switch. 
Should i reopen this bug open and add a block to bug 506276?
Comment 6 Alexander Tsoy 2018-08-31 20:48:12 UTC
That's odd. clang relies on ${CHOST}-llvm-config to get libdir. If llvm and clang was reemerged in correct order and if you didn't mess with binary packages then everything should have been fine.