Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 475106 - sys-devel/clang-3.3 USE=debug - collect2: error: ld returned 1 exit status
Summary: sys-devel/clang-3.3 USE=debug - collect2: error: ld returned 1 exit status
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
Depends on:
Reported: 2013-06-28 14:27 UTC by Bruce Guenter
Modified: 2014-01-31 21:14 UTC (History)
2 users (show)

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

sys-devel:clang-3.3:20130703-214449.log.gz (sys-devel:clang-3.3:20130703-214449.log.gz,92.61 KB, application/x-gzip)
2013-07-03 22:20 UTC, Bruce Guenter

Note You need to log in before you can comment on or make changes to this bug.
Description Bruce Guenter 2013-06-28 14:27:58 UTC
sys-devel/clang-3.3 does not compile when the "debug" USE flag is enabled. Without that USE flag, compilation succeeds.

The last messages from the build log:

llvm[3]: Linking Debug+Asserts+Checks executable clang-format
x86_64-pc-linux-gnu-g++ -I/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/include -I/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/tools/clang/tools/clang-format  -D_DEBUG -D_GLIBCXX_DEBUG -DXDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/tools/clang/tools/clang-format/../../include -I/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/tools/clang/tools/clang-format/../../include -g -fvisibility-inlines-hidden -fno-exceptions -fPIC -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -O3 -pipe -mtune=athlon64 -fno-prefetch-loop-arrays -O3 -pipe -mtune=athlon64 -fno-prefetch-loop-arrays -O3 -pipe -mtune=athlon64 -fno-prefetch-loop-arrays -O3 -pipe -mtune=athlon64 -fno-prefetch-loop-arrays -O3 -pipe -mtune=athlon64 -fno-prefetch-loop-arrays -O3 -pipe -mtune=athlon64 -fno-prefetch-loop-arrays -O3 -pipe -mtune=athlon64 -fno-prefetch-loop-arrays -g -Wl,-R -Wl,'$ORIGIN/../lib' -Wl,-R -Wl,/usr/lib64/llvm  -L/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/Debug+Asserts+Checks/lib -L/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/Debug+Asserts+Checks/lib -Wl,--version-script=/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/autoconf/ -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed   -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings    -Wno-maybe-uninitialized -Wno-missing-field-initializers  -o /tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/Debug+Asserts+Checks/bin/clang-format  /tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/tools/clang/tools/clang-format/Debug+Asserts+Checks/ClangFormat.o -lclangFormat -lclangTooling -lclangFrontend -lclangSerialization -lclangDriver -lclangParse -lclangSema -lclangAnalysis -lclangRewriteFrontend -lclangRewriteCore -lclangEdit -lclangAST -lclangLex -lclangBasic \
-lLLVM-3.3   -lz -lpthread -lrt -ldl -lm 
collect2: error: ld returned 1 exit status
make[3]: *** [/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/Debug+Asserts+Checks/bin/clang-format] Error 1
make[3]: Leaving directory `/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/tools/clang/tools/clang-format'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/tools/clang/tools'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/tmp/portage/sys-devel/clang-3.3/work/llvm-3.3.src/tools/clang'
make: *** [all] Error 1

Reproducible: Always

Steps to Reproduce:
1. USE=debug emerge =sys-devel/clang-3.3

Portage (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.15-r3, 3.10.0-rc7 x86_64)
System uname: Linux-3.10.0-rc7-x86_64-AMD_Phenom-tm-_II_X4_905e_Processor-with-gentoo-2.2
KiB Mem:    16409304 total,   9187624 free
KiB Swap:    2097148 total,   2096760 free
Timestamp of tree: Fri, 28 Jun 2013 11:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.4.6, 2.5.4-r5, 2.6.8-r1, 2.7.3-r3, 3.2.3-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.4_p6-r1, 1.9.6-r2, 1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.2.4-r1, 4.3.6-r1, 4.4.7, 4.5.4, 4.6.3, 4.7.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo hardened-dev x11 maekke multimedia sunrise bg fq
ACCEPT_LICENSE="* -@EULA AdobeFlash-11.x AdobeFlash-10.3 AdobeFlash-10.1 AdobeFlash-10 skype-eula google-chrome Oracle-BCLA-JavaSE skype-"
CFLAGS="-O3 -pipe -mtune=athlon64 -fno-prefetch-loop-arrays"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O3 -pipe -mtune=athlon64 -fno-prefetch-loop-arrays"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news notitles parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/portage/local/layman/hardened-development /usr/portage/local/layman/x11 /usr/portage/local/layman/maekke /usr/portage/local/layman/multimedia /usr/portage/local/layman/sunrise /home/bruce/portage /home/bruce/FutureQuest/portage"
USE="16bit 64bit 7zip X a52 aac aacplus abiword acl acpi adns agg aiglx alsa amd64 apng applet archive asf ass audio autoipd automount avahi avi bash-completion bitmap-fonts blksha1 bonobo bookmarks boost bracketcompletion brasero btrfs bzip2 c++ cairo cdda cdparanoia cdr classic cleartype clutter collab consolekit contrast corefonts cpdflib crypt cscope css ctype cups curl curlwrappers custom-optimization cvs cxx d dbus demosaic device-mapper dhcpcd dia dillo divx4linux djbfft djvu dri dvd dvdr dvdread dvi edl egl emacs enblend encode epiphany ethereal evo examples exceptions exif extensions extrafilters extras faac faad fam fame fat ffmpeg filepicker fits flac fluidsynth font-server fontconfig foomaticdb fts3 g3dvl gallium gbm gcj gdbm gdu gecko geoloc gif gimp gimpprint git glade gles gles1 gles2 glib glitz gmp gnome gnome-keyring gnuplot go gold gpg gpl gpu grammar graphite gstreamer gtk gtk2 gtk3 gudev gui guile gusb hdri hotpixels hpcups hpijs hunspell hwdb iconv icu imap imlib imlib2 inherit-graph inkjar innodb interlaced introspection ipv6 jack jadetex java java6 javascript jbig jikes jit joinlines jpeg jpeg2k justify kdrive kerberos keymap kpathsea kqemu ladcca ladspa lcms lensfun libev libffi libkms libnotify llvm lm_sensors lto lua lyx lzma mad maildir math matroska mbox mdnsresponder-compat megaupload melt memlimit menubar midi mikmod mime minizip mjpeg mmx mmxext mng mod modplug modules moznoirc moznomail mozp3p mozsvg mozxmlterm mp3 mp4 mpeg mplayer mudflap multilib musepack mysql nautilus ncurses nettle networking nfs nfsv3 nfsv4 nls nptl nptlonly nsplugin ntfs ntfsprogs ocaml ocamlopt ogg ogg123 oggvorbis openexr opengl openmp openrc opensync openvg openxml osmesa ots pam pango pcf pcre pda pdf pdflib perl plotutils plugins png policykit posix postgres postgresql postproc ppds pulseaudio python qmail qt-static qt3support qt4 quicktime raptor rar raw readline regex rpc scanner schroedinger sdl seamonkey seed sendfile sensord session sftp shared shared-dricore shared-glapi sharedmem sift slang smartspaces smime smp soap sockets sourceview sox speex spell sqlite sqlite3 sse sse2 sse2check sse3 sse4a ssh ssl ssse3 startup-notification static-analyzer stl subversion svg symlink t1lib tabs tcltk tcpd terminal theora thesaurus threads threadsafe tiff tk tls tools truetype truetype-fonts twisted type1 type1-fonts udev unicode usb utf8 utils uudeview v4l v4l2 vaapi vala valgrind vapigen vdpau video view-captcha vim-syntax vorbis vpx vte wad weather webdav-neon webgl webkit webm webstart wma wmf wordperfect x264 xattr xcb xchattext xine xml xml2 xmp xorg xpdf-headers xpm xrandr xscreensaver xv xvid xvmc zip zlib" ABI_X86="64" APACHE2_MODULES="authz_host dir mime" CURL_SSL="gnutls" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LINGUAS="en en_CA en_US" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="radeon r600"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-01 15:01:01 UTC
Please attach the entire build log to this bug report.
Comment 2 Bruce Guenter 2013-07-03 22:20:31 UTC
Created attachment 352558 [details]
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-07 13:44:44 UTC
No actual error message? That's odd.
Comment 4 Bernard Cafarelli gentoo-dev 2014-01-31 10:16:16 UTC
There have been many changes in llvm/clang ebuilds recently, and USE=debug seems to work fine (even if it has some space requirements). Can you try again with llvm-3.3-r3 or llvm-3.4?
Comment 5 Bruce Guenter 2014-01-31 21:14:33 UTC
I no longer use clang on my remaining Gentoo systems, so I cannot easily reproduce the problem.