Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554214 - net-libs/gnutls-3.3.15 fail to compile if -std=c++11 is specified due to gl max_align_t detection
Summary: net-libs/gnutls-3.3.15 fail to compile if -std=c++11 is specified due to gl m...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-08 08:18 UTC by Karol Ostrovsky
Modified: 2015-07-12 14:55 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,456.86 KB, text/plain)
2015-07-08 12:51 UTC, Karol Ostrovsky
Details
config.log compressed since it was bigger than 1MB (config.zip,60.29 KB, application/zip)
2015-07-08 13:00 UTC, Karol Ostrovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karol Ostrovsky 2015-07-08 08:18:42 UTC
After a usual sync and update world net-libs/gnutls-3.3.15 fails to build and emerge cannot continue.

Reproducible: Always

Steps to Reproduce:
emerge -1v =net-libs/gnutls-3.3.15

or 

emerge --deep --update --newuse -v world


Actual Results:  
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15/doc/examples -I../..  -I/var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15/lib/includes -I../../lib/includes -I/var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15/extra/includes -I/var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15/src/gl -I../../src/gl -D_GL_NO_LARGE_FILES -DNO_LIBCURL   -march=core2 -O2 -pipe -std=c++11 -c -o ex-cxx.o /var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15/doc/examples/ex-cxx.cpp
In file included from ../../src/gl/time.h:42:0,
                 from /usr/include/pthread.h:24,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h:35,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h:148,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/ext/atomicity.h:35,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/bits/ios_base.h:39,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/ios:42,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/iostream:39,
                 from /var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15/doc/examples/ex-cxx.cpp:2:
../../src/gl/stddef.h:93:3: error: conflicting declaration 'typedef union max_align_t max_align_t'
 } max_align_t;
   ^
In file included from ../../src/gl/stddef.h:55:0,
                 from ../../src/gl/time.h:42,
                 from /usr/include/pthread.h:24,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h:35,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h:148,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/ext/atomicity.h:35,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/bits/ios_base.h:39,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/ios:42,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/g++-v4/iostream:39,
                 from /var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15/doc/examples/ex-cxx.cpp:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/stddef.h:425:3: error: 'max_align_t' has a previous declaration as 'typedef struct max_align_t max_align_t'
 } max_align_t;
   ^
Makefile:1647: recipe for target 'ex-cxx.o' failed
make[4]: *** [ex-cxx.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15-abi_x86_64.amd64/doc/examples'
Makefile:3713: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15-abi_x86_64.amd64/doc'
Makefile:3412: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15-abi_x86_64.amd64/doc'
Makefile:1382: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-libs/gnutls-3.3.15/work/gnutls-3.3.15-abi_x86_64.amd64'
Makefile:1309: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: net-libs/gnutls-3.3.15::gentoo failed (compile phase):
 *   emake failed
 *



Portage 2.2.20 (python 2.7.9-final-0, hardened/linux/amd64/no-multilib, gcc-4.8.4, glibc-2.20-r2, 3.18.9-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.9-hardened-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-gentoo-2.2
KiB Mem:     3973608 total,    231012 free
KiB Swap:    4000180 total,   3903476 free
Timestamp of repository gentoo: Wed, 08 Jul 2015 07:30:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p33-r2::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.3.5-r1::gentoo, 3.4.1::gentoo
dev-util/cmake:           3.2.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.14.1::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.8.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::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-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe -std=c++11"
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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.mdfnet.se/gentoo/ http://ftp.df.lth.se/pub/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
USE="X acl acpi alsa amd64 bzip2 caps cli cracklib crypt cxx dri emacs firefox gdbm gif gnustep gtk hardened iconv javascript jpeg justify lm_sensors maildir mmx mmxext modules ncurses nls nptl nsplugin objc objc-gc openmp pam pax_kernel pcre pie png posix readline samba session spell sse sse2 sse3 ssl ssp ssse3 tcpd threads tiff truetype type1 unicode urandom usb xattr xml xtpax 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" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" 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" 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="en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Rafał Mużyło 2015-07-08 12:09:28 UTC
Attach full build log and config.log.
Comment 2 Karol Ostrovsky 2015-07-08 12:51:02 UTC
Created attachment 406360 [details]
build.log
Comment 3 Karol Ostrovsky 2015-07-08 13:00:09 UTC
Created attachment 406364 [details]
config.log compressed since it was bigger than 1MB
Comment 4 Karol Ostrovsky 2015-07-08 13:01:05 UTC
# emerge -pqv '=net-libs/gnutls-3.3.15::gentoo'

[ebuild  N    ] net-libs/gnutls-3.3.15  USE="crywrap cxx nls openssl zlib -dane -doc -examples -guile -pkcs11 -static-libs {-test}" LINGUAS="-cs -de -en -fi -fr -it -ms -nl -pl -sv -uk -vi -zh_CN"
Comment 5 Rafał Mużyło 2015-07-08 16:24:10 UTC
OK, should have expected this - self harm.

CXXFLAGS="-march=core2 -O2 -pipe -std=c++11"

max_align_t is C11 or C++11, under gcc 4.8 it's still gnu90.
So, test runs with gcc, the file gets compiled with g++.

An obvious conflict.

Yet, I wonder how this affects gcc 5.1, where c11 is the default...
Comment 6 Rafał Mużyło 2015-07-08 16:28:35 UTC
...also, a little pet peeve of mine (one of quite a few) - don't use zip, despite its ubiquity, it's a really poor choice.
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2015-07-12 13:22:15 UTC
gl detects max_align_t using C while in C++ max_align_t is already defined if -std=c++11
Comment 8 Alon Bar-Lev (RETIRED) gentoo-dev 2015-07-12 14:55:48 UTC
if you manually add CXXFLAGS="-std=c++11" you should also manually add CFLAGS="-std=c11"