Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 326549 - net-misc/curl-7.21.0 doesn't build if I have media-video/rtmpdump-2.2e-r3 installed
Summary: net-misc/curl-7.21.0 doesn't build if I have media-video/rtmpdump-2.2e-r3 ins...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Daniel Black (RETIRED)
Depends on:
Reported: 2010-07-02 05:43 UTC by Zeev Tarantov
Modified: 2010-07-18 09:34 UTC (History)
2 users (show)

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

config.log (config.log.bz2,48.05 KB, application/octet-stream)
2010-07-02 05:44 UTC, Zeev Tarantov
build.log (build.log.bz2,10.65 KB, application/octet-stream)
2010-07-02 05:44 UTC, Zeev Tarantov
rtmpdump-2.3.ebuild (rtmpdump-2.3.ebuild,1.89 KB, text/plain)
2010-07-04 11:31 UTC, Adrian Bassett

Note You need to log in before you can comment on or make changes to this bug.
Description Zeev Tarantov 2010-07-02 05:43:31 UTC
configure for libcurl finds librtmp/rtmp.h installed by media-video/rtmpdump and decides to use that, but it doesn't link to the library, 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

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/ -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/ -lz -pthread
../lib/.libs/ undefined reference to `RTMP_Init'
../lib/.libs/ undefined reference to `RTMP_SetBufferMS'
../lib/.libs/ undefined reference to `RTMP_ConnectStream'
../lib/.libs/ undefined reference to `RTMP_Alloc'
../lib/.libs/ undefined reference to `RTMP_Read'
../lib/.libs/ undefined reference to `RTMP_SetupURL'
../lib/.libs/ undefined reference to `RTMP_Free'
../lib/.libs/ undefined reference to `RTMP_Write'
../lib/.libs/ undefined reference to `RTMP_Close'
../lib/.libs/ 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 (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"
CFLAGS="-g -O2 -pipe -march=core2 -momit-leaf-frame-pointer -fexcess-precision=fast -Wno-unused-result"
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"
FEATURES="assume-digests distlocks fixpackages installsources news parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
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"
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" 
Comment 1 Zeev Tarantov 2010-07-02 05:44:26 UTC
Created attachment 237207 [details]
Comment 2 Zeev Tarantov 2010-07-02 05:44:46 UTC
Created attachment 237209 [details]
Comment 3 Mikael Magnusson 2010-07-02 10:25:16 UTC
Even if it works, it is still an automagic dependency. I get the same error though.
Comment 4 Adrian Bassett 2010-07-04 11:30:01 UTC
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/ ->
-rwxr-xr-x 1 root root 104056 Jul  2 14:20 /usr/lib/

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.

Comment 5 Adrian Bassett 2010-07-04 11:31:39 UTC
Created attachment 237439 [details]
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2010-07-07 22:23:36 UTC
rtmpdump is on tree now. However this bug will remain open until this automagic dependency gets fixed

Thanks for your ebuild
Comment 7 Daniel Black (RETIRED) gentoo-dev 2010-07-18 09:34:17 UTC
fix autodependency. May add proper use flag later. Thanks for the bug report Zeev.