Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612560 - sys-libs/compiler-rt-4.0.0[clang] - CMake Error at CMakeLists.txt:12 (project): The CMAKE_C_COMPILER: x86_64-pc-linux-gnu-clang is not a full path and was not found i
Summary: sys-libs/compiler-rt-4.0.0[clang] - CMake Error at CMakeLists.txt:12 (project...
Status: RESOLVED FIXED
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: 2017-03-13 22:59 UTC by Dennis Schridde
Modified: 2017-09-11 21:47 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,4.57 KB, text/x-log)
2017-03-13 22:59 UTC, Dennis Schridde
Details
CMakeOutput.log (CMakeOutput.log,46 bytes, text/x-log)
2017-03-13 23:01 UTC, Dennis Schridde
Details
CMakeError.log (CMakeError.log,2.19 KB, text/x-log)
2017-03-13 23:01 UTC, Dennis Schridde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2017-03-13 22:59:16 UTC
Created attachment 466980 [details]
build.log

When building sys-libs/compiler-rt-4.0.0:
```
-- The C compiler identification is unknown                                                                                                                                                                                                                                                                                                                                 
-- The CXX compiler identification is unknown                                                                                                                                                                                                                                                                                                                               
-- The ASM compiler identification is unknown                                                                                                                                                                                                                                                                                                                               
-- Found assembler: x86_64-pc-linux-gnu-clang                                                                                                                                                                                                                                                                                                                               
CMake Error at CMakeLists.txt:12 (project):                                                                                                                                                                                                                                                                                                                                 
  The CMAKE_C_COMPILER:              
                                   
    x86_64-pc-linux-gnu-clang
                                     
  is not a full path and was not found in the PATH.
```

# emerge --info clang llvm compiler-rt
Portage 2.3.4 (python 2.7.12-final-42, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-5.4.0, glibc-2.24-r1, 4.10.1-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.10.1-gentoo-x86_64-AMD_A10-7800_Radeon_R7,_12_Compute_Cores_4C+8G-with-gentoo-2.3
KiB Mem:    14345620 total,   2846220 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 13 Mar 2017 20:45:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13-r100::sage-on-gentoo, 3.4.6::gentoo, 3.5.3::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r1::gentoo
Repositories:

gentoo
    location: /var/cache/portage/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000

flatpak-overlay
    location: /var/lib/layman/flatpak-overlay
    sync-type: laymansync
    sync-uri: git://github.com/fosero/flatpak-overlay.git
    masters: gentoo
    priority: 50

kde
    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo
    priority: 50

sage-on-gentoo
    location: /var/lib/layman/sage-on-gentoo
    sync-type: laymansync
    sync-uri: git://github.com/cschwan/sage-on-gentoo.git
    masters: gentoo science
    priority: 50

science
    location: /var/lib/layman/science
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/sci.git
    masters: gentoo
    priority: 50

local
    location: /var/cache/portage/local
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=bdver3"
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.1/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/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="-pipe -O2 -march=bdver3"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --nospinner --verbose-conflicts"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildsyspkg cgroup compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch parallel-install 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://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j3"
PKGDIR="/var/cache/portage/packages"
PORTAGE_COMPRESS="xz"
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 aacs acl acpi alsa amd64 appindicator appstream archive audit avahi bash-completion bdplus berkdb bluetooth bluray branding bs2b bzip2 cairo caps cdda cddb cdio cdr celt chromaprint cjk clang cli colord colorio conntrack cracklib crypt cups cxx d3d9 dbus declarative dirac dri dts dvb dvd dvdr egl emboss encode exif fam fax ffmpeg fftw firefox fits flac fontconfig fortran fribidi gdbm geoclue geolocation gif git glamor gles gmp googledrive gpm gstreamer gtk gtk3 harfbuzz ibus iconv icu idn inotify ipv6 jemalloc jpeg jpeg2k kde kipi kwallet ladspa latex lcms ldap libinput libnotify libproxy libsecret libsoxr lua_target_lua5-2 lv2 lz4 lzma lzo mad mercurial metis mjpeg mng modemmanager modplug modules mp3 mp4 mpeg mplayer mtp multilib mysql ncurses netlink networkmanager nls nptl ogg openal opencl opencv openexr opengl openmax openmp opus pam pango pcap pch pcre pcre2 pdf phonon plasma png policykit postscript ppds prison pulseaudio qml qt3support qt4 qt5 raw readline rtmp samba scanner schroedinger sctp sdl seccomp semantic-desktop session sparse speech speex spell ssl startup-notification svg systemd tbb tcpd telepathy theora threads tiff timezone truetype tslib udev udisks unicode unwind upnp upnp-av upower usb v4l v4l2 vaapi vdpau vorbis vpx vulkan wavpack wayland webp widgets x264 x265 xattr xcb xcomposite xinerama xml xmp xrandr xscreensaver xv xvid xz zeroconf zlib" ABI_X86="64" 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" CALLIGRA_EXPERIMENTAL_FEATURES="stage" CALLIGRA_FEATURES="words sheets karbon plan" CAMERAS="ptp2" 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 ssse3xop" ELIBC="glibc" ENLIGHTENMENT_MODULES="*" 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="coreboot efi-64 pc" INPUT_DEVICES="joystick libinput" KERNEL="linux" L10N="de en en-GB ar fa tr ja ko zh zh-CN zh-TW" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en en_GB ar fa tr" LIRC_DEVICES="devinput" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 python3_5 pypy pypy3" RUBY_TARGETS="ruby21" 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_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sys-devel/llvm-4.0.0::gentoo was built with the following:
USE="doc gold libffi ncurses -debug -libedit -test" ABI_X86="32 64 -x32" LLVM_TARGETS="AMDGPU BPF NVPTX X86 -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -XCore"
Comment 1 Dennis Schridde 2017-03-13 23:01:18 UTC
Created attachment 466982 [details]
CMakeOutput.log
Comment 2 Dennis Schridde 2017-03-13 23:01:41 UTC
Created attachment 466984 [details]
CMakeError.log
Comment 3 Dennis Schridde 2017-03-13 23:03:48 UTC
Please note that there are lots of libraries preserved from a previous installation of llvm:0 / clang:0, but no clang binaries.
Comment 4 Dennis Schridde 2017-03-13 23:40:10 UTC
Having a look at metadata.xml, the cause of this issue becomes obvious: "Force building using installed clang (rather than the default CC/CXX)".
compiler-rt has IUSE="+clang", but omits clang in DEPEND.
Comment 5 Holger Hoffstätte 2017-03-14 16:19:12 UTC
This is a chicken-and-egg issue; I had the same problem last night.
Making compiler-rt depend on clang is probably not the best way to solve this, since clang in turn depoends on compiler-rt. AFAIK there is no problem building compiler-rt with -clang; I had to do that in order to get clang built since I unmerged all existing llvm/clang packages before building 4.0.
Whether a completely self-hosted llvm+clang toolchain is desirable is a different problem, but IMHO it should still be possible to install the whole thing without existing llvm/clang. Think of the bootstrap.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-03-14 16:41:36 UTC
I'm sorry, I must've accidentally missed 4.0.0. The clang dep is present correctly in -9999.

commit 9fd9dd4b2d37e38bf65eacdd3ad7cab15f211821
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Tue Mar 14 17:37:55 2017
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Tue Mar 14 17:40:15 2017

    sys-libs/compiler-rt: Backport missing clang dep to 4.0.0, #612560
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-03-14 16:44:45 UTC
(In reply to Holger Hoffstätte from comment #5)
> This is a chicken-and-egg issue; I had the same problem last night.
> Making compiler-rt depend on clang is probably not the best way to solve
> this, since clang in turn depoends on compiler-rt.

clang PDEPs on compiler-rt, so compiler-rt can be installed after clang. And the ebuild accounts for being built with incomplete clang.

> AFAIK there is no problem
> building compiler-rt with -clang; I had to do that in order to get clang
> built since I unmerged all existing llvm/clang packages before building 4.0.

The atomics support is not built correctly when building with gcc. That's the reason for adding IUSE=+clang.
Comment 8 Holger Hoffstätte 2017-03-14 16:52:01 UTC
(In reply to Michał Górny from comment #7)
> (In reply to Holger Hoffstätte from comment #5)
> > This is a chicken-and-egg issue; I had the same problem last night.
> > Making compiler-rt depend on clang is probably not the best way to solve
> > this, since clang in turn depoends on compiler-rt.
> 
> clang PDEPs on compiler-rt, so compiler-rt can be installed after clang. And
> the ebuild accounts for being built with incomplete clang.

That wasn't entirely clear, thanks. I've just updated and now portage wants to correctly build clang -> compiler-rt -> clang-runtime. That fixes the bootstrap problem.

> The atomics support is not built correctly when building with gcc. That's
> the reason for adding IUSE=+clang.

Fair enough and good to know!