chrisballinger/FFmpeg-iOS

ERROR: librtmp not found

Closed this issue · 5 comments

first of all thank you for these build scripted.

my goal was to compile a custom version of ffmpeg with your build scripts but im running into a small problem when compiling with the default settings which i dont quiet understand and was hoping you had a bit feedback or knowhow about this issue:

  • i cloned this repository and installed the latest version of gas-preprocessor.pl
  • i ran ./build-libssl.sh and ./build-librtmp.sh with success and am seeing libcrypto.a, librtmp.a and libssl.a in dependencies/lib and their corresponding header files in dependencies/include
  • then executing ./build-ffmpeg.sh results in the following output:
Downloading ffmpeg-2.2.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6860k  100 6860k    0     0  2518k      0  0:00:02  0:00:02 --:--:-- 2519k
Building without ccache
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
ERROR: librtmp not found

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

i can figure out why librtmp isn't found because it exists in dependencies/lib and the linker flags seem to be correct --extra-ldflags="... -L${OUTPUTDIR}/lib"

Turned out that

  1. my brew installation was broken
  2. one needs to install rtmpdump which is not even stated in the official compilation guide.

You shouldn't need to install rtmpdump with homebrew, because librtmp is just a part of rtmpdump. What is the output of console.log?

I think that this is the relevant part of the config.log file:

clang: warning: argument unused during compilation: '-pthread'
check_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
pkg-config --exists --print-errors librtmp
Package librtmp was not found in the pkg-config search path.
Perhaps you should add the directory containing `librtmp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'librtmp' found
ERROR: librtmp not found

the librtmp.pc file which pkg-config is relying on cannot be found. Maybe one can patch and copy that file from INTERDIR over to dependencies/lib and export an appropriatePKG_CONFIG_PATH in build-ffmpeg.sh?

i would guess that the same problem arises when openssl is not preinstalled via brew?

Ah that makes sense. The build script should copy over the .pc files (just once) and then export the new PKG_CONFIG_PATH as you said.

I would like to use FFmpeg for video comressing video file but I dont know how to configure to xcode project and how to apply code for video compressing