Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547788 - sys-devel/gcc-5.1: new default ABI: cxx11 incompatible with GCC-4.9
Summary: sys-devel/gcc-5.1: new default ABI: cxx11 incompatible with GCC-4.9
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
: 541470 547954 548728 548730 551392 553700 553702 556100 560846 (view as bug list)
Depends on: 550432
Blocks:
  Show dependency tree
 
Reported: 2015-04-26 10:31 UTC by LE GARREC Vincent
Modified: 2015-09-23 02:27 UTC (History)
8 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 LE GARREC Vincent 2015-04-26 10:31:06 UTC
From forum t1015870:

I just install the new version of GCC 5.1 and now I have some errors "undefined reference to". After reading https://gcc.gnu.org/gcc-5/changes.html I saw that "The C++ runtime library (libstdc++) uses a new ABI by default"

Here a kind of error message I have :
/home/legarrec/info/portage/dev-cpp/gtkmm-3.16.0/work/gtkmm-3.16.0/tools/extra_defs_gen/generate_defs_gdk.cc:49: undefined reference to `get_defs[abi:cxx11](unsigned long, bool (*)(unsigned long))'	

so it's write that the problem is "[abi:cxx11]"

An other example :

../lib/.libs/libeurocodes.so: undefined reference to `Gtk::Builder::create_from_resource(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/../../../../lib64/libgtkmm-3.0.so: undefined reference to `Glib::ustring::ustring(std::string const&)'	

Here, there is no reference to the new ABI for Glib::ustring::ustring but for create_from_resource there's "std::__cxx11". My program compiles fine with GCC 4.9 but not with GCC 5.1.

The problem disappears by emerging glibmm then gtkmm with GCC 5.1. But then, with GCC 4.9, I have in my program :

../lib/.libs/libeurocodes.so: undefined reference to `Gtk::Builder::create_from_resource(std::string const&)'
../lib/.libs/libeurocodes.so: undefined reference to `Glib::ustring::ustring(std::string const&)'	


According to https://wiki.gentoo.org/wiki/Upgrading_GCC, running "emerge -eav system" and "emerge -eav world" is old school. But do you think that with this new change of the default ABI, I should emerge the whole world ? Actually, I didn't do it but I can easily. But my main problem is that GCC 5.1 is not compatible with GCC 4.9.

Reproducible: Always




Portage 2.2.18 (python 3.3.5-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.2, glibc-2.20-r2, 3.18.11-gentoo x86_64)
=================================================================
System uname: Linux-3.18.11-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:     8130568 total,    870656 free
KiB Swap:    9767516 total,   9766316 free
Timestamp of repository gentoo: Sat, 25 Apr 2015 17:00:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r2::gentoo, 3.3.5-r1::gentoo
dev-util/cmake:           3.2.1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.6.4::gentoo, 4.7.4::gentoo, 4.8.4::gentoo, 4.9.2::gentoo, 5.1.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-overlay
    location: /home/legarrec/info/overlay
    masters: gentoo
    priority: 0

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/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="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -frecord-gcc-switches"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j9 --load-average=9"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news noclean parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O0"
MAKEOPTS="-j9"
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="/home/legarrec/info"
USE="X a52 aac accessibility acpi aes alsa amd64 avx berkdb branding bzip2 cairo cdda cdr cjk cli colord cracklib crypt cuda cups cxx dbus declarative dhcpcd djvu doc dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fontconfig fortran gdbm gif gl glamor gnome gnome-keyring gnome-online-accounts gnuplot gpm gstreamer gtk gtk3 gudev iconv introspection ipv6 jabber jpeg jpeg2k kde kdrive kipi lapack lcms ldap libav libnotify libsecret lm_sensors mad mmx mmxext mng modules mp3 mp4 mpeg mpi multilib natspec nautilus ncurses nls nptl ogg opencl opengl openmp pam pango pcre pdf perl phonon plasma png policykit popcnt postscript ppds pulseaudio python qt3support qt4 readline sdl semantic-desktop session socialweb spell sqlite sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd threads tiff truetype udev udisks unicode upower usb vorbis webkit wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" 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 ublox ubx" 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" LINGUAS="fr en ja" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20 ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia" 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
Comment 1 Tolga Dalman 2015-04-26 19:12:16 UTC
Hi Vincent,

(In reply to LE GARREC Vincent from comment #0)
> According to https://wiki.gentoo.org/wiki/Upgrading_GCC, running "emerge
> -eav system" and "emerge -eav world" is old school. But do you think that
> with this new change of the default ABI, I should emerge the whole world ?

There are some critical bugs that will most likely prevent you from doing that. For instance, neither Xorg, nor Python 3 are properly working at the moment.

> Actually, I didn't do it but I can easily. But my main problem is that GCC
> 5.1 is not compatible with GCC 4.9.

Have you tried to use -std=gnu++98 ?

You can either selectively upgrade your packages, or wait until everything has stabilized with GCC 5.1.
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2015-04-27 01:53:03 UTC
Yes you need to rebuild world, this is a major version bump.  No you should not be using gcc-5.1 at this point unless you know what you're doing.
Comment 3 SpanKY gentoo-dev 2015-08-21 21:24:37 UTC
revdep-rebuild support to try and automate is tracked by bug 550432
Comment 4 SpanKY gentoo-dev 2015-08-21 21:32:19 UTC
*** Bug 547954 has been marked as a duplicate of this bug. ***
Comment 5 SpanKY gentoo-dev 2015-08-21 21:34:28 UTC
*** Bug 556100 has been marked as a duplicate of this bug. ***
Comment 6 SpanKY gentoo-dev 2015-08-21 21:34:29 UTC
*** Bug 553702 has been marked as a duplicate of this bug. ***
Comment 7 SpanKY gentoo-dev 2015-08-21 21:34:31 UTC
*** Bug 553700 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2015-08-21 21:34:33 UTC
*** Bug 551392 has been marked as a duplicate of this bug. ***
Comment 9 SpanKY gentoo-dev 2015-08-21 21:34:35 UTC
*** Bug 548730 has been marked as a duplicate of this bug. ***
Comment 10 SpanKY gentoo-dev 2015-08-21 21:34:39 UTC
*** Bug 548728 has been marked as a duplicate of this bug. ***
Comment 11 SpanKY gentoo-dev 2015-08-21 21:34:41 UTC
*** Bug 541470 has been marked as a duplicate of this bug. ***
Comment 12 SpanKY gentoo-dev 2015-09-23 02:27:53 UTC
*** Bug 560846 has been marked as a duplicate of this bug. ***