Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#4673 closed defect (fixed)

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

Reported by: exophoric 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 Changed 4 years ago by gajjanag

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 4 years ago by exophoric

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 Changed 4 years ago by exophoric

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.