ffmpeg-build-script
ffmpeg-build-script copied to clipboard
Debian 11 failure
Here's a gist of config.log: https://gist.github.com/hut8/93f226bede0c18e30863549767ca1c49
./build-ffmpeg --build --enable-gpl-and-non-free --latest --full-static
gives:
ERROR: x265 not found using pkg-config
In the above log file, towards the end, this seems like the problem:
gcc -L/home/daniel/ffmpeg-build-script/workspace/lib -Wl,--as-needed -Wl,-z,noexecstack -static -L/usr/lib/x86_64-linux-gnu -o /tmp/ffconf.NXhVHFiW/test /tmp/ffconf.NXhVHFiW/test.o -lx265 -lstdc++ -lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl -lnuma -ldl -lpthread -lm -lz
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: /home/daniel/ffmpeg-build-script/workspace/lib/libx265.a(api.cpp.o): in function `x265_12bit::x265_api_get_199(int)':
api.cpp:(.text+0x1fa3): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
ERROR: x265 not found using pkg-config
I don't believe this is a duplicate of #154 or #134 although it may be related. #134 mentions numa; I have libnuma installed. It's weird that -lgcc_s can't be found. Here's some ldconfig stuff:
/sbin/ldconfig -p|grep libgcc_s
libgcc_s.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libgcc_s.so.1
libgcc_s.so.1 (libc6) => /lib32/libgcc_s.so.1
Note that /lib is symlinked to /usr/lib so I don't know why it can't find libgcc_s.
I feel like the error about pkg-config not being found is a red herring.
require_pkg_config libx265 x265 x265.h x265_api_get
check_pkg_config libx265 x265 x265.h x265_api_get
test_pkg_config libx265 x265 x265.h x265_api_get
pkg-config --exists --print-errors x265
check_func_headers x265.h x265_api_get -L/usr/lib/x86_64-linux-gnu -lx265 -lstdc++ -lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl -lnuma
test_ld cc -L/usr/lib/x86_64-linux-gnu -lx265 -lstdc++ -lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl -lnuma
test_cc -L/usr/lib/x86_64-linux-gnu
BEGIN /tmp/ffconf.NXhVHFiW/test.c
1 #include <x265.h>
2 #include <stdint.h>
3 long check_x265_api_get(void) { return (long) x265_api_get; }
4 int main(void) { int ret = 0;
5 ret |= ((intptr_t)check_x265_api_get) & 0xFFFF;
6 return ret; }
END /tmp/ffconf.NXhVHFiW/test.c
pkg-config --exists --print-errors x265 succeeds, right? Then it can't link because of the libgcc_s stuff. I'm confused at this point -- any ideas?
do yourself a favor and try using docker. pkg-config is an absolute hellhole. The version compiled with these script is just dirt old, but even if you replace it with a much newer version, it will refuse to find most packages even if they are obviously there. This goes so far that even when you install a new enough version with apt it refuses to work. I literally asked it with pkg-config --modversion rav1e what version was available. It said 0.5.1, but still threw an error when compiling that ther is no rav1e >= 0.5.0...