[FFmpeg-user] Problems Compiling on CentOS 7
Moritz Barsnick
barsnick at gmx.net
Sat Dec 29 00:25:55 EET 2018
On Fri, Dec 28, 2018 at 09:42:47 -0800, Larry Apolonio wrote:
> but I get an error when I add x265.
>
> ERROR: x265 not found using pkg-config
> Here is the tail end of the config.log file (pastebin if you want
> everything https://pastebin.com/Vq8GFaui)
>
> BEGIN /tmp/ffconf.3qUgZlye/test.c
> 1 #include <x264.h>
> 2 #if !(X264_MPEG2)
> 3 #error "unsatisfied condition: X264_MPEG2"
> 4 #endif
> END /tmp/ffconf.3qUgZlye/test.c
> /usr/bin/gcc44 -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC
> -std=c99 -fomit-frame-pointer -fPIC -pthread -I/usr/include/p11-kit-1
> -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2
> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
> -I/usr/include/uuid -I/usr/include/libpng15 -I/usr/include/freetype2
> -I/usr/include/libpng15 -I/usr/include/openjpeg-2.3 -D_REENTRANT -E -o
> /tmp/ffconf.3qUgZlye/test.o /tmp/ffconf.3qUgZlye/test.c
> In file included from /tmp/ffconf.3qUgZlye/test.c:1:
> /usr/local/include/x264.h:40:4: warning: #warning You must include
> stdint.h or inttypes.h before x264.h
> /tmp/ffconf.3qUgZlye/test.c:3:2: error: #error "unsatisfied condition:
> X264_MPEG2"
> 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
> Package x265 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `x265.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'x265' found
> ERROR: x265 not found using pkg-config
This is extremely misleading! Your pastebin shows something totally
different:
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 -I/usr/local/include -L/usr/local/lib -lx265
test_ld cc -I/usr/local/include -L/usr/local/lib -lx265
test_cc -I/usr/local/include -L/usr/local/lib
BEGIN /tmp/ffconf.IEW25UfN/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.IEW25UfN/test.c
/usr/bin/gcc44 -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c99 -fomit-frame-pointer -fPIC -pthread -I/usr/include/p11-kit-1 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/uuid -I/usr/include/libpng15 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/openjpeg-2.3 -D_REENTRANT -I/usr/local/include -I/usr/local/include -L/usr/local/lib -c -o /tmp/ffconf.IEW25UfN/test.o /tmp/ffconf.IEW25UfN/test.c
In file included from /tmp/ffconf.IEW25UfN/test.c:1:
/usr/local/include/x265.h:672: error: expected specifier-qualifier-list before 'x265_param'
ERROR: x265 not found using pkg-config
Which indicates that, unlike what you quoted, pkgconfig does work, but
ffmpeg's test code has an issue with 265.h. Incidentally with a line
which was changed/introduced 15 days ago.
Two days ago, someone else noticed and filed an issue:
https://bitbucket.org/multicoreware/x265/issues/458/commit-56a73c8-added-invalid-c-to-x265h
This hasn't been fixed in upstream x265. You can do that suggested
change to x265.h yourself (line 672, add the "struct " before "x265_param*
zoneParam").
Please try that and tell us whether that works.
(For once, "latest git" is not always best. Just saying.)
Cheers,
Moritz
More information about the ffmpeg-user
mailing list