configure for libcurl finds librtmp/rtmp.h installed by media-video/rtmpdump and decides to use that, but it doesn't link libcurl.so to the library, so libcurl.so has undefined symbols RTMP_*. Building curl fails at linking the executable. I blame curl's configure script: it found out that it can't link with -lrtmp, why set USE_LIBRTMP to 1? I'm using --as-needed so maybe symptoms would be different otherwise. I'm attaching config.log and build.log Reproducible: Always Steps to Reproduce: 1. emerge -1 =media-video/rtmpdump-2.2e-r3 2. emerge -1 =net-misc/curl-7.21.0 3. Actual Results: /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -momit-leaf-frame-pointer -fexcess-precision=fast -Wno-unused-result -g0 -Wno-system-headers -pthread -Wl,-O1 -Wl,--as-needed -o curl main.o hugehelp.o urlglob.o writeout.o writeenv.o getpass.o homedir.o curlutil.o os-specific.o strtoofft.o strdup.o rawstr.o nonblock.o ../lib/libcurl.la -lz libtool: link: x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -momit-leaf-frame-pointer -fexcess-precision=fast -Wno-unused-result -g0 -Wno-system-headers -pthread -Wl,-O1 -o .libs/curl main.o hugehelp.o urlglob.o writeout.o writeenv.o getpass.o homedir.o curlutil.o os-specific.o strtoofft.o strdup.o rawstr.o nonblock.o -Wl,--as-needed ../lib/.libs/libcurl.so -lz -pthread ../lib/.libs/libcurl.so: undefined reference to `RTMP_Init' ../lib/.libs/libcurl.so: undefined reference to `RTMP_SetBufferMS' ../lib/.libs/libcurl.so: undefined reference to `RTMP_ConnectStream' ../lib/.libs/libcurl.so: undefined reference to `RTMP_Alloc' ../lib/.libs/libcurl.so: undefined reference to `RTMP_Read' ../lib/.libs/libcurl.so: undefined reference to `RTMP_SetupURL' ../lib/.libs/libcurl.so: undefined reference to `RTMP_Free' ../lib/.libs/libcurl.so: undefined reference to `RTMP_Write' ../lib/.libs/libcurl.so: undefined reference to `RTMP_Close' ../lib/.libs/libcurl.so: undefined reference to `RTMP_Connect1' collect2: ld returned 1 exit status make[2]: *** [curl] Error 1 make[2]: Leaving directory `/home/system/var_tmp_portage/portage/net-misc/curl-7.21.0/work/curl-7.21.0/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/system/var_tmp_portage/portage/net-misc/curl-7.21.0/work/curl-7.21.0/src' make: *** [all-recursive] Error 1 Expected Results: Expected to either disregard that library if it can't link against it (it's not build with -fPIC), or link against it properly (media-video/rtmpdump only builds a static lib, though, so that needs to change). Workaround: emerge -aC media-video/rtmpdump && emerge net-misc/curl && emerge -1 media-video/rtmpdump Note: media-video/rtmpdump is pulled in by ffmpeg[rtmp] Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.5.1-pre9999, glibc-2.11.2-r0, 2.6.34 x86_64) ================================================================= System uname: Linux-2.6.34-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6550_@_2.33GHz-with-gentoo-2.0.1 Timestamp of tree: Fri, 02 Jul 2010 04:15:01 +0000 app-shells/bash: 4.1_p7 dev-java/java-config: 2.1.11 dev-lang/python: 2.6.5-r2, 3.1.2-r3 dev-util/cmake: 2.8.1-r2 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.1-r1 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.65-r1 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.4-r1, 4.5.0, 4.5.1_pre9999 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 virtual/os-headers: 2.6.34 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* SKYPE-EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-g -O2 -pipe -march=core2 -momit-leaf-frame-pointer -fexcess-precision=fast -Wno-unused-result" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-g -O2 -pipe -march=core2 -momit-leaf-frame-pointer -fexcess-precision=fast" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests distlocks fixpackages installsources news parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://mirror.isoc.org.il/pub/gentoo/ " LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_US" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/home/system/var_tmp_portage" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/gcc-porting /var/lib/layman/mozilla /var/lib/layman/java-overlay /var/lib/layman/toolchain /var/lib/layman/kde /var/lib/layman/voyageur /usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 bash-completion bidi bluetooth branding bzip2 cairo cdr cli cracklib crypt cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac gif gpm gtk hal iconv ipv6 jpeg lcms libnotify lzma mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pango pch pcre pdf perl png ppds pppd python qt3support qt4 readline reflection sdl session spell spl sqlite3 sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis x264 xcb xcomposite xml xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" CAMERAS="stv0680" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" QEMU_SOFTMMU_TARGETS="arm i386 ppc ppc64 sparc x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" SANE_BACKENDS="niash stv680" USERLAND="GNU" VIDEO_CARDS="nv nvidia nouveau" 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, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 237207 [details] config.log
Created attachment 237209 [details] build.log
Even if it works, it is still an automagic dependency. I get the same error though.
Worth noting that rtmpdump 2.3 has been released. This includes a shared lib: $ ls /usr/lib/librtmp* -rw-r--r-- 1 root root 152888 Jul 2 14:20 /usr/lib/librtmp.a lrwxrwxrwx 1 root root 12 Jul 2 14:20 /usr/lib/librtmp.so -> librtmp.so.0 -rwxr-xr-x 1 root root 104056 Jul 2 14:20 /usr/lib/librtmp.so.0 and curl 7.21.0 builds OK against this version (automagic dependency or not). A simple rename of media-video/rtmpdump-2.2e-r3.ebuild to media-video/rtmpdump-2.3.ebuild is enough (apart from a change to SRC_URI to fetch a .tgz rather than a tar.gz source bundle. In case it's of interest I'll attach my 2.3 ebuild (which, when copied to rtmpdump-9999.ebuild, can also be used as a means of building against the SVN trunk) - if anybody can improve the kludge at lines 65-66 that would be useful.
Created attachment 237439 [details] rtmpdump-2.3.ebuild
rtmpdump is on tree now. However this bug will remain open until this automagic dependency gets fixed Thanks for your ebuild
fix autodependency. May add proper use flag later. Thanks for the bug report Zeev.