Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491880 - sys-devel/llvm-9999 USE=clang - projects/compiler-rt/lib/int_lib.h:36:10: fatal error: 'stdint.h' file not found
Summary: sys-devel/llvm-9999 USE=clang - projects/compiler-rt/lib/int_lib.h:36:10: fat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-21 16:41 UTC by Johannes Hirte
Modified: 2013-11-28 17:36 UTC (History)
3 users (show)

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


Attachments
llvm-clang-build.log.xz (llvm-clang-build.log.xz,97.96 KB, application/x-xz)
2013-11-21 16:43 UTC, Johannes Hirte
Details
Fixed ebuild (llvm-9999.ebuild,10.52 KB, text/plain)
2013-11-27 00:26 UTC, Mike Lothian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Hirte 2013-11-21 16:41:13 UTC
When building sys-devel/llvm-9999 with useflag CLANG enabled, the build fails with:

kdir -p /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools/clang/runtime/compiler-rt/clang_linux/ubsan_cxx-i386 > /dev/null
  COMPILE:   clang_linux/full-i386/i386: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/absvdi2.c
echo 'Created.' > /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools/clang/runtime/compiler-rt/clang_linux/ubsan_cxx-i386/.dir
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/Release/bin/clang -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m32 --sysroot=/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/SDKs/linux -c -o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvdi2.o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/absvdi2.c
  COMPILE:   clang_linux/full-i386/i386: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/absvsi2.c
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/Release/bin/clang -fPIC -Wall -Werror -O3 -fomit-frame-pointer -m32 --sysroot=/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/SDKs/linux -c -o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvsi2.o /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/absvsi2.c
In file included from /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/absvsi2.c:15:
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/int_lib.h:36:10: fatal error: 'stdint.h' file not found
#include <stdint.h>
         ^
1 error generated.
In file included from make[5]: *** [/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvsi2.o] Error 1
make[5]: *** Waiting for unfinished jobs....
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/absvdi2.c:15:
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/int_lib.h:36:10: fatal error: 'stdint.h' file not found
#include <stdint.h>
         ^
1 error generated.
make[5]: *** [/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvdi2.o] Error 1
make[5]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt'
make[4]: *** [BuildRuntimeLibraries] Error 2
rm /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/Release/lib/clang/3.5/lib/linux/.dir
make[4]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools/clang/runtime/compiler-rt'
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools/clang/runtime'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86/tools'
make: *** [all] Error 1
 * ERROR: sys-devel/llvm-9999::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/llvm-9999::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/llvm-9999::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/llvm-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/llvm-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999-x86'
 * S: '/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999'

Without clang it builds correctly.

Reproducible: Always




 emerge --info
Portage 2.2.7 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.17, 3.12.0-00048-gbe408cd x86_64)
=================================================================
System uname: Linux-3.12.0-00048-gbe408cd-x86_64-AMD_Athlon-tm-_II_P320_Dual-Core_Processor-with-gentoo-2.2
KiB Mem:     4047216 total,   1081764 free
KiB Swap:    4194300 total,   3713820 free
Timestamp of tree: Thu, 21 Nov 2013 10:00:01 +0000
ld GNU gold (GNU Binutils 2.23.2) 1.11
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r4, 3.2.5-r3, 3.3.2-r2
dev-util/cmake:           2.8.12.1-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.6.4, 4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.11 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo x11 kde gamerlay local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-11.x AdobeFlash-10.1 AdobeFlash-10.3 ETQW google-chrome googleearth Google-TOS Intel-SDP Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=amdfam10 -fpredictive-commoning -fgcse-after-reload -ftree-partial-pre -ftree-vectorize -ftracer -fvect-cost-model -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.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=amdfam10 -fpredictive-commoning -fgcse-after-reload -ftree-partial-pre -ftree-vectorize -ftracer -fvect-cost-model -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs 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="C"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,-z,combreloc -O2 -march=amdfam10 -fpredictive-commoning -fgcse-after-reload -ftree-partial-pre -ftree-vectorize -ftracer -fvect-cost-model -pipe"
MAKEOPTS="-j2"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/x11 /usr/local/portage/layman/kde /usr/local/portage/layman/gamerlay /usr/local/portage"
USE="X a52 aac aacs acl acoustid addressbook aften aio alsa amd64 amr apng assistant attica audiofile autotools berkdb bluetooth bluray bzip2 c++0x cairo calendar canberra caps caps-ng cdda cddb chm cli cmake consolekit corefonts cracklib crypt cups cvs cxx dbus declarative desktopglobe device-mapper dirac djvu dri dts dv dvd ebook eigen embedded emf encode epub exif expoblending faac faad fam ffmpeg fftw fits flac flash fontconfig fortran fpx ftdi gbm gd gdbm gif git gles1 gles2 glew gmp gold google gphoto2 gpm graphicsmagick graphviz gs gsl hdri highlight iconv icu id3tag image-cache inotify ipv6 jbootstrap jemalloc jpeg jpeg2k json kate kde kdepim kipi kpathsea lame lapack latex lcms lensfun libffi libkms liblockfile libnotify libsamplerate live lm_sensors lzma lzo mad marble matroska midi minizip mjpeg mmap mmx mmx2 mmxext mng modules mongodb mp3 mp4 mpeg mtp mudflap multilib musicbrainz mysql ncurses netlink networkmanager nfsidmap nfsv3 nls nptl ogg okteta openal opencv openexr opengl openmp opus oscar otr pam panorama pcre pdf pdfimport perl plasma png policykit postscript pyqt4 python python3 qt3support qt4 qthelp quicktime raw readline redeyes reviewboard rle romio samba scanner schroedinger semantic-desktop session sift sip smi sndfile soundtouch spell sqlite sqlite3 sse sse2 sse3 ssl subversion svg system-sqlite taglib tcmalloc tcpd theora threads thumbnail tiff tremor truetype twolame udev udisks udisks2 unicode usb v4l v8 valgrind vamp vdpau vhosts vlc vorbis vpx wav webkit webp wmf x264 xattr xcb xcomposite xetex xml xmp xscreensaver xv xvid yaz zip zlib" ABI_X86="64 32" 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="braindump flow karbon kexi kpresenter krita plan sheets stage tables words" CAMERAS="canon directory" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20" SANE_BACKENDS="net snapscan" USERLAND="GNU" VIDEO_CARDS="r600 radeon" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Johannes Hirte 2013-11-21 16:43:29 UTC
Created attachment 363732 [details]
llvm-clang-build.log.xz
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-25 13:23:55 UTC
This may have something to do with gcc-4.8.2...
Comment 3 Johannes Hirte 2013-11-25 18:42:23 UTC
(In reply to Michał Górny from comment #2)
> This may have something to do with gcc-4.8.2...

Downgraded to gcc-4.8.1-r1 and still getting the same error.
Comment 4 Mike Lothian 2013-11-26 11:40:13 UTC
Has anyone tried using ld.bfd rather than gold?
Comment 5 Johannes Hirte 2013-11-26 18:29:14 UTC
(In reply to Mike Lothian from comment #4)
> Has anyone tried using ld.bfd rather than gold?

I don't see how this could be related to includes not found, but I've tested this too. Same error as with ld.gold. Also building with clang itself doesn't work. I've rebuild llvm-3.3-r1 with clang and than tried llvm-9999 with CC=clang, CXX=clang++. Again the

In file included from In file included from /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/absvdi2.c:15:
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/projects/compiler-rt/lib/int_lib.h:36:10: fatal error: 'stdint.h' file not found
#include <stdint.h>
Comment 6 Mike Lothian 2013-11-27 00:26:57 UTC
Created attachment 364046 [details]
Fixed ebuild

Silly fix

Just needed --with-clang-resource-dir=../lib/clang/3.5 rather than 3.4
Comment 7 Johannes Hirte 2013-11-28 10:40:38 UTC
confirmed that it's fixed
Comment 8 Bernard Cafarelli gentoo-dev 2013-11-28 13:33:19 UTC
Thanks for fix and confirmation, marking fixed then :)
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-11-28 17:36:41 UTC
(In reply to Mike Lothian from comment #6)
> Just needed --with-clang-resource-dir=../lib/clang/3.5 rather than 3.4

By the way, if anyone sees a nice way to avoid hardcoding the version there, that'd be quite helpful.