Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 589944 - dev-libs/libtasn1-4.9; -Winline prevents optimization for space (-Os)
Summary: dev-libs/libtasn1-4.9; -Winline prevents optimization for space (-Os)
Status: RESOLVED DUPLICATE of bug 589868
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Other Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-28 21:57 UTC by John Bowler
Modified: 2016-07-29 16:08 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,134.75 KB, text/x-log)
2016-07-28 22:17 UTC, John Bowler
Details
environment (environment,58.54 KB, text/plain)
2016-07-28 22:18 UTC, John Bowler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Bowler 2016-07-28 21:57:50 UTC
Build with CFLAGS="-Os", build fails.  Build with CFLAGS="-Os -Wno-inline" build succeeds.  This is partly also because '-Werror' is in there too (see the related bug which corresponds to a different -W).

Happens on ARM and x86, probably any platform with GCC.  Probably GCC version specific.

Reproducible: Always

Steps to Reproduce:
1. Edit make.conf CFLAGS=-Os
2. Emerge --oneshot =dev-libs/libtasn1-4.9
3.
Actual Results:  
Build fails when the compiler quiet reasonably does not inline stuff in structure.c

Expected Results:  
I expect the build to work with any reasonable set of compiler optimization options (well, not -O0, known to be broken in GCC). 

 Either -Werror shouldn't be there or the person who put it there needs to go through every reasonable combo of GCC version and compilation option and work out what -W options don't produce any warnings.  (Hint: if you test enough GCC versions you end up with *no* -W options, including -Wextra.)

I fixed it by adding -Wno-inline to CFLAGS in a package.env
Comment 1 John Bowler 2016-07-28 22:08:30 UTC
emerge --info '=dev-libs/libtasn1-4.9::gentoo' (NOTE: this is after a successful build then a revert, so this is for the installed project not the build that failed):

Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-5.4.0, glibc-2.23-r2, 4.6.4-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.6.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16412124 total,   5372408 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Thu, 28 Jul 2016 10:00:01 +0000
sh bash 4.3_p46
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.3_p46::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.6.1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2-r1::gentoo
sys-apps/openrc:          0.21.2::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            4.8.5::gentoo, 4.9.3::gentoo, 5.3.0::gentoo, 5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

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

hippopopus-jbowler-com
    location: /home/gentoo/overlay
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
ACCEPT_LICENSE="* -@EULA @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Os -g -march=native -pipe -fexceptions"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
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="-Os -g -march=native -pipe"
DISTDIR="/home/gentoo/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://lug.mtu.edu/gentoo/ ftp://lug.mtu.edu/gentoo/ ftp://gentoo.llarian.net/pub/gentoo http://gentoo.llarian.net/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="--jobs=8 --load-average=5.5"
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 --exclude=/.git"
PORTAGE_TMPDIR="/home/gentoo/build"
USE="X a52 aac acl acpi aes alsa amd64 avx berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jack jpeg kde kipi lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit popcnt ppds pulseaudio qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xinerama xml 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" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 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" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="en-us" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

dev-libs/libtasn1-4.9::gentoo was built with the following:
USE="-doc -static-libs" ABI_X86="64 -32 -x32"
CFLAGS="-Os -g -march=native -pipe -fexceptions -Wno-inline"
Comment 2 John Bowler 2016-07-28 22:09:38 UTC
hippopopus 589944 # emerge -pqv '=dev-libs/libtasn1-4.9::gentoo'
[ebuild   R   ] dev-libs/libtasn1-4.9  USE="-doc -static-libs" ABI_X86="(64) -32 (-x32)"
Comment 3 John Bowler 2016-07-28 22:13:30 UTC
589868 is also caused by -Werror, however in this case the problem is -Wmaybe-uninitialized.  That warning is also optimization level dependent.
Comment 4 John Bowler 2016-07-28 22:17:44 UTC
Created attachment 441838 [details]
build.log
Comment 5 John Bowler 2016-07-28 22:18:20 UTC
Created attachment 441840 [details]
environment
Comment 6 Tom 2016-07-29 08:29:08 UTC
I have this same problem 
Subscribe
Comment 7 John Bowler 2016-07-29 16:08:41 UTC
The fix for https://bugs.gentoo.org/show_bug.cgi?id=589868 will fix this too.  Marking it as a duplicate.

*** This bug has been marked as a duplicate of bug 589868 ***