Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4673 closed defect (fixed)

Building ffmpeg with --enable-rpath doesn't add rpath to shared libraries

Reported by: Jonathan Owned by:
Priority: normal Component: build system
Version: git-master Keywords: rpath shared
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Building ffmpeg with --enable-rpath only adds the RPATH to ffmpeg, ffprobe, ffplay, ffserver binaries. It would be convenient if this switch would also add RPATH to the shared libraries.

(Tried on git commit 803bdc546942890ce71e6bbcd339b964fb076c79 / June 25 2015)

How to reproduce:

$ ./configure --enable-rpath --prefix=/opt/ffmpeg --enable-libvpx --enable-shared
$ make -j16
$ make install
$ cd /opt/ffmpeg/lib
$ ldd libavcodec.so
        libswresample.so.1 => not found
        libavutil.so.54 => not found
        libvpx.so.2 => not found
$ readelf -a libavcodec.so | grep RPATH
$

Change History (3)

comment:1 by Ganesh Ajjanagadde, 9 years ago

Resolution: fixed
Status: newclosed

comment:2 by Jonathan, 9 years ago

The fix correctly adds rpath pointing to ffmpeg libs to ffmpeg shared libs, although it does not add rpath pointing to dependencies.

In the supplied example, libvpx is an external dependency, and its lib path is not added so when you run "ldd libavcodec.so" you still get "libvpx.so.2 => not found" while libswresample and avutil are found correctly.

comment:3 by Jonathan, 9 years ago

The fix correctly adds rpath pointing to ffmpeg libs to ffmpeg shared libs, although it does not add rpath pointing to dependencies.

In the supplied example, libvpx is an external dependency, and its lib path is not added so when you run "ldd libavcodec.so" you still get "libvpx.so.2 => not found" while libswresample and avutil are found correctly.

Note: See TracTickets for help on using tickets.