Hi, rtmpdump-2.4_p20131018 fails to compile with -O0. Remove the inline in rtmpdump.c does the trick. A patch like : sed -i 's/^inline //g' rtmpdump.c || die in src_prepare solves the problem. No problem with -O2. Reproducible: Always build.log * Package: media-video/rtmpdump-2.4_p20131018 * Repository: gentoo * Maintainer: hwoarang@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc kernel_linux ssl userland_GNU * FEATURES: compressdebug preserve-libs sandbox splitdebug userpriv usersandbox >>> Unpacking source... >>> Unpacking rtmpdump-2.4_p20131018.tar.gz to /home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018 >>> Source unpacked in /home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work >>> Preparing source in /home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018 ... * Will copy sources from /home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018 * abi_x86_64.amd64: copying to /home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018-abi_x86_64.amd64 >>> Source prepared. >>> Configuring source in /home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018 ... * abi_x86_64.amd64: running multilib-minimal_abi_src_configure >>> Source configured. >>> Compiling source in /home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018 ... * abi_x86_64.amd64: running multilib-minimal_abi_src_compile make -j9 CC=x86_64-pc-linux-gnu-gcc LD=x86_64-pc-linux-gnu-ld 'OPT=-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer' 'XLDFLAGS=-Wl,--as-needed -Wl,-O0' CRYPTO=OPENSSL SYS=posix x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o rtmpdump.o rtmpdump.c x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o rtmpgw.o rtmpgw.c x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o thread.o thread.c x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o rtmpsrv.o rtmpsrv.c x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o rtmpsuck.o rtmpsuck.c make[1]: Entering directory '/home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018-abi_x86_64.amd64/librtmp' x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -fPIC -O2 -fPIC -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o rtmp.o rtmp.c x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -fPIC -O2 -fPIC -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o log.o log.c x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -fPIC -O2 -fPIC -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o amf.o amf.c x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -fPIC -O2 -fPIC -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o hashswf.o hashswf.c x86_64-pc-linux-gnu-gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -fPIC -O2 -fPIC -march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer -c -o parseurl.o parseurl.c rtmpsrv.c: In function ‘dumpAMF’: rtmpsrv.c:407:10: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] int i, len, ac = *argc; ^ rtmp.c: In function ‘RTMP_ReadPacket’: rtmp.c:3575:7: warning: variable ‘didAlloc’ set but not used [-Wunused-but-set-variable] int didAlloc = FALSE; ^ ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o x86_64-pc-linux-gnu-gcc -shared -Wl,-soname,librtmp.so.1 -Wl,--as-needed -Wl,-O0 -o librtmp.so.1 rtmp.o log.o amf.o hashswf.o parseurl.o -lssl -lcrypto -lz ar: creating librtmp.a ln -sf librtmp.so.1 librtmp.so make[1]: Leaving directory '/home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018-abi_x86_64.amd64/librtmp' x86_64-pc-linux-gnu-gcc -Wall -Wl,--as-needed -Wl,-O0 -o rtmpdump rtmpdump.o -Llibrtmp -lrtmp -lssl -lcrypto -lz x86_64-pc-linux-gnu-gcc -Wall -Wl,--as-needed -Wl,-O0 -o rtmpgw rtmpgw.o thread.o -lpthread -Llibrtmp -lrtmp -lssl -lcrypto -lz x86_64-pc-linux-gnu-gcc -Wall -Wl,--as-needed -Wl,-O0 -o rtmpsrv rtmpsrv.o thread.o -lpthread -Llibrtmp -lrtmp -lssl -lcrypto -lz x86_64-pc-linux-gnu-gcc -Wall -Wl,--as-needed -Wl,-O0 -o rtmpsuck rtmpsuck.o thread.o -lpthread -Llibrtmp -lrtmp -lssl -lcrypto -lz rtmpdump.o: In function `main': /home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018-abi_x86_64.amd64/rtmpdump.c:1410: undefined reference to `CleanupSockets' collect2: error: ld returned 1 exit status Makefile:79: recipe for target 'rtmpdump' failed make: *** [rtmpdump] Error 1 * ERROR: media-video/rtmpdump-2.4_p20131018::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=media-video/rtmpdump-2.4_p20131018::gentoo'`, * the complete build log and the output of `emerge -pqv '=media-video/rtmpdump-2.4_p20131018::gentoo'`. * The complete build log is located at '/home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/temp/build.log'. * The ebuild environment file is located at '/home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/temp/environment'. * Working directory: '/home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018-abi_x86_64.amd64' * S: '/home/legarrec/info/portage/media-video/rtmpdump-2.4_p20131018/work/rtmpdump-2.4_p20131018' Reproducible: Always 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, 1155924 free KiB Swap: 9767516 total, 8986768 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 ================================================================= media-video/rtmpdump-2.4_p20131018::gentoo was built with the following: USE="ssl -gnutls (-polarssl)" ABI_X86="64 -32 -x32"
According to https://bugs.gentoo.org/show_bug.cgi?id=571106 adding -std=gnu89 in OPT="... after CFLAGS in multilib_src_compile solves the problem.
https://github.com/gentoo/gentoo/pull/1635
commit c8b9bb96e2635f97d4d0063fd39b4ee794e3104c Author: Craig Andrews <candrews@integralblue.com> AuthorDate: Thu Jun 9 19:37:22 2016 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: Sat Jun 11 10:12:29 2016 media-video/rtmpdump: add -std=gnu89 to CFLAGS to restore pre-GCC5 semantics Bug: https://bugs.gentoo.org/571106 Pull-Request: https://github.com/gentoo/gentoo/pull/1644 Package-Manager: portage-2.3.0_rc1