Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489708 - sys-devel/llvm-3.3-r1 with sys-devel/gcc-4.8.1 - formatted_raw_ostream_test.cpp:(.text+0x237): undefined reference to `llvm::formatted_raw_ostream::current_pos() const'
Summary: sys-devel/llvm-3.3-r1 with sys-devel/gcc-4.8.1 - formatted_raw_ostream_test.c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-29 06:19 UTC by Steve Warren
Modified: 2015-09-08 14:37 UTC (History)
3 users (show)

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


Attachments
build log (build.log.zip,62.97 KB, application/zip)
2013-10-29 06:22 UTC, Steve Warren
Details
build envionment (environment,161.03 KB, text/plain)
2013-10-29 06:23 UTC, Steve Warren
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Warren 2013-10-29 06:19:03 UTC
llvm-3.3-r1 does not build with gcc-4.8.1 with:

/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/unittests/Support/Release/formatted_raw_ostream_test.o: In function `(anonymous namespace)::formatted_raw_ostreamTest_Test_Tell_Test::TestBody()':
formatted_raw_ostream_test.cpp:(.text+0x237): undefined reference to `llvm::formatted_raw_ostream::current_pos() const'
collect2: error: ld returned 1 exit status
make[2]: *** [Release/SupportTests] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/unittests/Support'
make[1]: *** [Support/.makeall] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/llvm-3.3-r1/work/llvm-3.3.src-amd64/unittests'
make: *** [all] Error 1



Portage 2.2.7 (default/linux/amd64/13.0/desktop/kde, gcc-4.8.1, glibc-2.17, 3.11.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.11.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-3632QM_CPU_@_2.20GHz-with-gentoo-2.2
KiB Mem:     8043656 total,   2358232 free
KiB Swap:    8191996 total,   7475512 free
Timestamp of tree: Sun, 27 Oct 2013 17:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
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
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.3
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.8.1-r1
sys-devel/gcc-config:     1.7.3
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 x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx-i -Os -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
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="-march=core-avx-i -Os -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12"
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"
SYNC="git://github.com/fiordland/portage.git"
USE="X a52 aac aalib acpi alsa amd64 apng berkdb bluetooth branding bzip2 cairo cdda cddb cdr cli cracklib crypt cups cxx dbus declarative dlz dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif git gnome gpm gstreamer gtk gudev hwdb iconv introspection ipv6 java jpeg kde kipi lcms ldap libkms libnotify mad matroska minizip mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qt3support qt4 readline resolvconf script sdl semantic-desktop session spell sse sse2 sse3 sse4 ssl ssse3 startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis winbind wma-fixd wxwidgets x264 xcb xcomposite xinerama xml xorg xscreensaver xv xvid 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" 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="efi-64" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel i915 i965" 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, USE_PYTHON

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

sys-devel/llvm-3.3-r1 was built with the following:
USE="libffi static-analyzer -clang -debug -doc -gold -multitarget -ocaml -python -test -udis86" ABI_X86="64 -32 -x32" PYTHON_TARGETS="python2_7 -pypy2_0 -python2_6" VIDEO_CARDS="-radeon"
CFLAGS="-march=corei7 -Os -pipe"
CXXFLAGS="-march=corei7 -Os -pipe"

[ebuild   R   ] sys-devel/llvm-3.3-r1  USE="libffi static-analyzer -clang -debug -doc -gold -multitarget -ocaml -python {-test} -udis86" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python2_7 -pypy2_0 -python2_6" VIDEO_CARDS="-radeon"
Comment 1 Steve Warren 2013-10-29 06:22:01 UTC
Created attachment 362186 [details]
build log
Comment 2 Steve Warren 2013-10-29 06:23:00 UTC
Created attachment 362188 [details]
build envionment
Comment 3 Milos Popovic 2013-10-31 16:54:26 UTC
I can confirm this with llvm 3.3-r1 and gcc 4.8.1 on 32 bit system.
Comment 4 Michael Wilcox 2013-11-24 00:32:26 UTC
llvm-3.3-r1 successfully emerges with when compiled with gcc-4.6.3 or gcc-4.7.3 on ppc.

 + + static-analyzer          : Install the Clang static analyzer (requires
                                USE=clang)

The clang USE flag is not required for successful emerging with those versions.

Disabling libffi and static-analyzer does not prevent the error under gcc-4.8.1.
Comment 5 Viktar Patotski 2013-11-29 11:02:17 UTC
I can confirm that this bug still reproducible while building sys-devel/llvm-3.3-r1 on:
Portage 2.2.7 (default/linux/amd64/13.0/desktop, gcc-4.8.2, glibc-2.17, 3.5.4-gentoo x86_64).
Comment 6 Denis Kaganovich 2013-12-17 13:22:07 UTC
This is result of functions inlining - usual problems, escalating from GCC 4.6 to 4.7 to 4.8. In this case there are "-finline-functions-called-once" (by -Os). Workarounds (amd64):

is-flag -Os && append-flags -fno-inline-functions-called-once
or
is-flag -Os && append-flags -finline-small-functions
or upgrade inlining from -Os to -O2 (IMHO best):
is-flag -Os && append-flags -finline-small-functions -findirect-inlining

Or, common way - to find affected (bad inlined) function and make them "noinline".

PS My own 4.8 global stabilization flags addon (to -Os/-O2/-O3/-Ofast):
-finline-small-functions -findirect-inlining -fno-graphite-identity -fno-inline-functions
and optional: -fno-ipa-cp-clone (may be omitted with special care about few packets)
Comment 7 Bernard Cafarelli gentoo-dev 2015-09-08 14:37:10 UTC
Cleaning old llvm/clang bugs. Newer versions (tested with 3.7.0 but I think 3.6.0 was ok too) compile fine with -Os and gcc-4.8, so marking this one as fixed!