Hi, recode-3.6_p20-r1 fails to compile with -O0. Remove the inline in libiconv/aliases.h does the trick. A patch like : sed -i 's/^__inline$//g' libiconv/aliases.h || die in src_prepare solves the problem. No problem with -O2. Reproducible: Always build.log ……………………………………… libtool: compile: x86_64-pc-linux-gnu-gcc -DLIBDIR=\"/usr/lib64\" -DHAVE_CONFIG_H -I. -I/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/work/recode-3.6/src -I.. -I.. -I/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/work/recode-3.6/src -I/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/work/recode-3.6/lib -I/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/work/recode-3.6/libiconv -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c /home/legarrec/info/portage/app-text/recode-3.6_p20-r1/work/recode-3.6/src/quoted.c -fPIC -DPIC -o .libs/quoted.o /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -version-info 0:0:0 -Wl,--as-needed -Wl,-O0 -o librecode.la -rpath /usr/lib64 argmatch.lo charname.lo combine.lo fr-charname.lo hash.lo iconv.lo libiconv.lo localcharset.lo merged.lo names.lo outer.lo quotearg.lo recode.lo request.lo strip-pool.lo task.lo xmalloc.lo african.lo afrtran.lo applemac.lo atarist.lo bangbang.lo cdcnos.lo ebcdic.lo ibmpc.lo iconqnx.lo lat1asci.lo mule.lo strip-data.lo testdump.lo ucs.lo utf16.lo utf7.lo utf8.lo varia.lo vn.lo flat.lo html.lo lat1ltex.lo lat1txte.lo rfc1345.lo texinfo.lo base64.lo dump.lo endline.lo permut.lo quoted.lo libtool: link: x86_64-pc-linux-gnu-gcc -shared -fPIC -DPIC .libs/argmatch.o .libs/charname.o .libs/combine.o .libs/fr-charname.o .libs/hash.o .libs/iconv.o .libs/libiconv.o .libs/localcharset.o .libs/merged.o .libs/names.o .libs/outer.o .libs/quotearg.o .libs/recode.o .libs/request.o .libs/strip-pool.o .libs/task.o .libs/xmalloc.o .libs/african.o .libs/afrtran.o .libs/applemac.o .libs/atarist.o .libs/bangbang.o .libs/cdcnos.o .libs/ebcdic.o .libs/ibmpc.o .libs/iconqnx.o .libs/lat1asci.o .libs/mule.o .libs/strip-data.o .libs/testdump.o .libs/ucs.o .libs/utf16.o .libs/utf7.o .libs/utf8.o .libs/varia.o .libs/vn.o .libs/flat.o .libs/html.o .libs/lat1ltex.o .libs/lat1txte.o .libs/rfc1345.o .libs/texinfo.o .libs/base64.o .libs/dump.o .libs/endline.o .libs/permut.o .libs/quoted.o -Wl,--as-needed -march=native -O0 -ggdb2 -g2 -Wl,-O0 -Wl,-soname -Wl,librecode.so.0 -o .libs/librecode.so.0.0.0 libtool: link: (cd ".libs" && rm -f "librecode.so.0" && ln -s "librecode.so.0.0.0" "librecode.so.0") libtool: link: (cd ".libs" && rm -f "librecode.so" && ln -s "librecode.so.0.0.0" "librecode.so") libtool: link: ( cd ".libs" && rm -f "librecode.la" && ln -s "../librecode.la" "librecode.la" ) /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -Wl,--as-needed -Wl,-O0 -o recode main.o freeze.o mixed.o librecode.la ../lib/libreco.a libtool: link: x86_64-pc-linux-gnu-gcc -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -Wl,-O0 -o .libs/recode main.o freeze.o mixed.o -Wl,--as-needed ./.libs/librecode.so ../lib/libreco.a ./.libs/librecode.so: undefined reference to `aliases_lookup' collect2: error: ld returned 1 exit status Makefile:471: recipe for target 'recode' failed make[2]: *** [recode] Error 1 make[2]: Leaving directory '/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/work/recode-3.6-abi_x86_64.amd64/src' Makefile:362: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/work/recode-3.6-abi_x86_64.amd64' Makefile:293: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: app-text/recode-3.6_p20-r1::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-text/recode-3.6_p20-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-text/recode-3.6_p20-r1::gentoo'`. * The complete build log is located at '/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/temp/build.log'. * The ebuild environment file is located at '/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/temp/environment'. * Working directory: '/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/work/recode-3.6-abi_x86_64.amd64' * S: '/home/legarrec/info/portage/app-text/recode-3.6_p20-r1/work/recode-3.6' Portage 2.2.26 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.3.0, glibc-2.22-r1, 4.3.3-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.3.3-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2 KiB Mem: 8129268 total, 699448 free KiB Swap: 9767516 total, 8994976 free Timestamp of repository gentoo: Sun, 03 Jan 2016 19:30:01 +0000 sh bash 4.3_p42 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 app-shells/bash: 4.3_p42::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.22.1::gentoo dev-lang/python: 2.7.11-r1::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo dev-util/cmake: 3.4.1::gentoo dev-util/pkgconfig: 0.29::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.19.1::gentoo sys-apps/sandbox: 2.10-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.6.4::gentoo, 4.7.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 5.3.0::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.22-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 crossdev location: /home/legarrec/info/overlay masters: gentoo priority: 0 gentoo-zh location: /var/lib/layman/gentoo-zh masters: gentoo priority: 50 kde location: /var/lib/layman/kde masters: gentoo priority: 50 science location: /var/lib/layman/science masters: gentoo priority: 50 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" 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-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/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" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="-j9 --load-average=9" FCFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer" 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 xattr" FFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="fr_FR.UTF-8" LDFLAGS="-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 acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cuda cups cxx dbus declarative dhcpcd doc dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 iconv introspection ipv6 jpeg kde kipi lcms ldap libav libnotify libsecret mad mmx mmxext mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opencl opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qml qt3support qt4 qt5 readline sdl seccomp semantic-desktop session spell sse sse2 ssl startup-notification svg systemd tcpd tiff tracker 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 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="nlpsolver" LINGUAS="fr en ja" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ================================================================= Package Settings ================================================================= app-text/recode-3.6_p20-r1::gentoo was built with the following: USE="nls -static-libs" ABI_X86="64 -32 -x32"
(In reply to LE GARREC Vincent from comment #0) > Hi, > > recode-3.6_p20-r1 fails to compile with -O0. > Remove the inline in libiconv/aliases.h does the trick. > A patch like : > sed -i 's/^__inline$//g' libiconv/aliases.h || die > in src_prepare solves the problem. > > No problem with -O2. So why are you trying to compile it with -O0? Any good reason for that?
It's a computer I use to develop and debug application. So when an application randomly crashed, using -O0 with auto dump makes my life easier. I never try -Og but -01 is too much optimization according to gdb. recode doesn't crash but I'm used to compile everything with -O0. Sometimes, that's find weird bug (https://bugs.gentoo.org/show_bug.cgi?id=556690) It no big deal but patch is simple I think.
Please have a look once the changes trickle down, this was actually a GCC5 bug in disguise. Author: David Seifert <soap@gentoo.org> Date: Wed Jan 13 18:33:58 2016 +0100 app-text/recode: add -std=gnu89 to CFLAGS to restore pre-GCC5 semantics Gentoo-Bug: 571106