Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 624034 - dev-libs/libclc-0.2.0_pre20170118: Error executing llvm-config.
Summary: dev-libs/libclc-0.2.0_pre20170118: Error executing llvm-config.
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:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-06 17:07 UTC by Conrad Kostecki
Modified: 2017-08-12 21:22 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2017-07-06 17:07:10 UTC
>>> Emerging (1 of 1) dev-libs/libclc-0.2.0_pre20170118::gentoo
 * libclc-0.2.0_pre20170118.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                     [ ok ]
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/dev-libs/libclc-0.2.0_pre20170118/work
>>> Preparing source in /var/tmp/portage/dev-libs/libclc-0.2.0_pre20170118/work/libclc-0.2.0_pre20170118 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-libs/libclc-0.2.0_pre20170118/work/libclc-0.2.0_pre20170118 ...
Error executing llvm-config.
Please ensure that llvm-config is in your $PATH, or use --with-llvm-config.
 * ERROR: dev-libs/libclc-0.2.0_pre20170118::gentoo failed (configure phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line 115:  Called src_configure
 *   environment, line 1874:  Called die
 * The specific snippet of code:
 *       ./configure.py --with-cxx-compiler="$(tc-getCXX)" --with-llvm-config="${clang_path%/*}/llvm-config" --prefix="${EPREFIX}/usr" || die
 *
 * If you need support, post the output of `emerge --info '=dev-libs/libclc-0.2.0_pre20170118::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/libclc-0.2.0_pre20170118::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/libclc-0.2.0_pre20170118/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libclc-0.2.0_pre20170118/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/libclc-0.2.0_pre20170118/work/libclc-0.2.0_pre20170118'
 * S: '/var/tmp/portage/dev-libs/libclc-0.2.0_pre20170118/work/libclc-0.2.0_pre20170118'

~ # echo $PATH
/usr/x86_64-pc-linux-gnu/gcc-bin/6.3.0:/usr/lib/llvm/4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin

~ # whereis llvm-config
llvm-config: /usr/lib64/llvm/4/bin/llvm-config

~ # llvm-config --version
4.0.1
Comment 1 Conrad Kostecki gentoo-dev 2017-07-06 17:07:38 UTC
Portage 2.3.6 (python 3.6.1-final-0, default/linux/amd64/13.0, gcc-6.3.0, glibc-2.24-r3, 4.12.0-gentoo x86_64)
=================================================================
System uname: Linux-4.12.0-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-26xx_-Sandy_Bridge-with-gentoo-2.4.1
KiB Swap:   34078716 total,  34078716 free
Timestamp of repository gentoo: Thu, 06 Jul 2017 15:15:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.28 p1.2) 2.28
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.5.3::gentoo, 3.6.1-r1::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1::gentoo
sys-apps/openrc:          0.27.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.15.1::gentoo
sys-devel/binutils:       2.28-r2::gentoo
sys-devel/gcc:            6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes

bl4ckb0x
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.halifax.rwth-aachen.de/gentoo/"
INSTALL_MASK="/etc/xinetd.d/* /usr/lib/systemd/system/*"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"
MAKEOPTS="-j9 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
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 acl alsa amd64 berkdb bzip2 cairo caps cjk cracklib crypt cxx dbus fbcon fontconfig gif gmp gnutls gpm iconv icu idn imlib introspection ipv6 jbig jit jpeg libsamplerate lzma lzo maildir mp3 ncurses nls nntp nptl ogg opencl opengl openmp pam pcre png readline sdl slang sndfile spell ssl suid svg symlink threads tiff truetype udev unicode usb vaapi vdpau vim-syntax xattr xcb xface xml zlib zsh-completion" ABI_X86="32 64" COLLECTD_PLUGINS="apcups cgroups conntrack contextswitch cpu cpusleep df disk dns entropy ethstat exec filecount hddtemp hugepages interface ipc ipmi irq load lvm md memory mysql netlink nfs nginx ntpd openvpn ping processes protocols rrdcached sensors serial smart swap syslog tcpconns thermal unixsock uptime users" CPU_FLAGS_X86="aes mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2" CURL_SSL="openssl" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LCD_DEVICES="crystalfontz glcd2usb lcd2usb" LINGUAS="de de_DE" NGINX_MODULES_HTTP="access auth_basic autoindex charset fancyindex fastcgi geo geoip gunzip gzip proxy realip rewrite stub_status upstream_keepalive" NGINX_MODULES_STREAM="access geo geoip realip ssl_preread" PHP_TARGETS="php7-1" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" USERLAND="GNU" VIDEO_CARDS="fbdev"
USE_PYTHON="2.7 3.6"
Unset:  CC, CPPFLAGS, CTARGET, CXX
Comment 2 Conrad Kostecki gentoo-dev 2017-07-12 16:05:53 UTC
When I do remove "--with-llvm-config="${clang_path%/*}/llvm-config"" from the eBuild, I am able to compile.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-08-12 19:46:35 UTC
The ccache path for clang is being used for llvm-config, which is wrong.

[pid 10198] execve("/usr/bin/ccache", ["ccache", "-M", "4G"], 0xe73fd0 /* 290 vars */) = 0
[pid 10302] execve("/usr/bin/ccache", ["ccache", "-M", "4G"], 0x1371090 /* 290 vars */) = 0
[pid 10433] execve("/usr/lib64/ccache/bin/gzip", ["gzip", "-d"], 0x7ffc31da2410 /* 300 vars */) = -1 ENOENT (No such file or directory)
[pid 10532] execve("./configure.py", ["./configure.py", "--with-cxx-compiler=x86_64-pc-linux-gnu-g++", "--with-llvm-config=/usr/lib64/ccache/bin/llvm-config", "--prefix=/usr"], 0x7fd66f6d4010 /* 300 vars */) = 0
[pid 10532] execve("/usr/lib/python-exec/python2.7/python", ["/usr/lib/python-exec/python2.7/python", "./configure.py", "--with-cxx-compiler=x86_64-pc-linux-gnu-g++", "--with-llvm-config=/usr/lib64/ccache/bin/llvm-config", "--prefix=/usr"], 0x7ffe6307b958 /* 300 vars */) = 0
[pid 10533] execve("/usr/lib64/ccache/bin/llvm-config", ["/usr/lib64/ccache/bin/llvm-config", "--version"], 0x7fff41b4fd78 /* 300 vars */) = -1 ENOENT (No such file or directory)
Error executing llvm-config.
Please ensure that llvm-config is in your $PATH, or use --with-llvm-config.
 *       ./configure.py --with-cxx-compiler="$(tc-getCXX)" --with-llvm-config="${clang_path%/*}/llvm-config" --prefix="${EPREFIX}/usr" || die
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-08-12 19:50:03 UTC
Fixed because it broke my system

[master 99a0c54af8f] dev-libs/libclc: fix llvm-config path.
 Date: Sat Aug 12 12:47:06 2017 -0700
 1 file changed, 1 insertion(+), 5 deletions(-)
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-08-12 20:53:14 UTC
Robin, it's very not nice to reintroduce a major regression without even attempting to communicate the plan to do so first (especially that you're pretty much aware that you can usually get a response from me on IRC in <6h). Especially that there was an explicit comment in the code you removed that explained why it *is necessary*.

I understand that the apparent fix for the regression doesn't work for your system which is frustrating but that is no reason to break other people's systems, and trade one broken case for another. While I agree that we need a proper fix, I'm sorry but in my opinion FEATURES=ccache is not a really supported use case at the moment and it does not occur 'naturally' to our users, unlike multiple slots of LLVM which can be installed by Portage due to dependency requirements.

That considered, I have to revert your change. If you have any better ideas that solve the problems without introducing regression, I'd appreciate your help. However, I would really prefer if you tried to communicate with people knowing the package and its problems before committing something.


commit 23c4307a73d0d7fa1d79c0a95125918cf8a38bc6
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Sat Aug 12 22:51:23 2017
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Sat Aug 12 22:51:23 2017

    dev-libs/libclc: Revert "fix llvm-config path."
    
    Revert the non-maintainer commit that reintroduced the cross-slot clang
    mismatch bug.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-08-12 21:22:12 UTC
commit 0dba7297ff8329a32385468d55de263db58aa2fb
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Sat Aug 12 23:17:26 2017
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Sat Aug 12 23:21:31 2017

    dev-libs/libclc: Use llvm.eclass to obtain correct llvm-config path
    
    Use the newly-introduced llvm.eclass API to obtain the correct path
    for the newest LLVM slot including clang, to fix the issue when
    first-level 'clang' on PATH comes from a compiler wrapper such
    as ccache.
    
    Bug: https://bugs.gentoo.org/624034