Discussion:
[FFmpeg-user] Ffmpeg build on Ubuntu
Thomas Hehl
2015-12-03 19:31:07 UTC
Permalink
I'm trying to build ffmpeg on my Ubuntu 15.10 box. I am following these
instructions:

https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

Following the directions the first build I'm having to do is for libx265. I
have followed the directions up until:

***@thomas-linux-box:~/ffmpeg_sources/x265/build/linux$ make install
[ 23%] Built target encoder
[ 87%] Built target common
[ 87%] Built target x265-static
[100%] Built target cli
Install the project...
-- Install configuration: "Release"
-- Installing: /home/thomas/ffmpeg_build/lib/libx265.a
-- Installing: /home/thomas/ffmpeg_build/include/x265.h
-- Installing: /home/thomas/ffmpeg_build/include/x265_config.h
-- Installing: /home/thomas/ffmpeg_build/lib/pkgconfig/x265.pc
-- Installing: /home/thomas/ffmpeg_build/bin/x265
***@thomas-linux-box:~/ffmpeg_sources/x265/build/linux$ make distclean
make: *** No rule to make target 'distclean'. Stop.

I am unsure how to proceed.

Thanks!
Moritz Barsnick
2015-12-03 21:09:35 UTC
Permalink
Post by Thomas Hehl
Following the directions the first build I'm having to do is for libx265. I
[...]
Post by Thomas Hehl
make: *** No rule to make target 'distclean'. Stop.
I am unsure how to proceed.
At this stage, it doesn't matter, it is just supposed to clean up your
source tree after install. Go ahead with the other instructions, "make
install" had gone fine.

Perhaps make distlean isn't supported anymore.

Moritz
Thomas Hehl
2015-12-04 12:43:02 UTC
Permalink
So I continued with the build and when I did the really long path command
inside of ffpmpeg, I got the following:

***@thomas-linux-box:~/ffmpeg_sources/ffmpeg$ PATH="$HOME/bin:$PATH"
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-nonfree
ERROR: x265 not found using pkg-config

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-***@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

So it's looking for the 265 libraries.

Please help!
Post by Thomas Hehl
Following the directions the first build I'm having to do is for
libx265. I
[...]
distclean
Post by Thomas Hehl
make: *** No rule to make target 'distclean'. Stop.
I am unsure how to proceed.
At this stage, it doesn't matter, it is just supposed to clean up your
source tree after install. Go ahead with the other instructions, "make
install" had gone fine.
Perhaps make distlean isn't supported anymore.
Moritz
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Moritz Barsnick
2015-12-04 13:49:08 UTC
Permalink
Post by Thomas Hehl
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-nonfree
ERROR: x265 not found using pkg-config
That's peculiar, because your first email showed that it installed
this:
/home/thomas/ffmpeg_build/lib/pkgconfig/x265.pc

So, please try execute for us and show us the output:
$ ls -l /home/thomas/ffmpeg_build/lib/pkgconfig/x265.pc
$ pkg-config --libs x265
$ (export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --libs x265)
$ (export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --cflags x265)
$ (export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --libs --static x265)
$ (export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --cflags --static x265)

Thanks,
Moritz
Thomas Hehl
2015-12-04 14:24:12 UTC
Permalink
***@thomas-linux-box:~/ffmpeg_build$ ls -l
/home/thomas/ffmpeg_build/lib/pkgconfig/x265.pc
-rw-r--r-- 1 thomas thomas 259 Dec 3 14:06
/home/thomas/ffmpeg_build/lib/pkgconfig/x265.pc
***@thomas-linux-box:~/ffmpeg_build$ pkg-config --libs 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
***@thomas-linux-box:~/ffmpeg_build$ (export
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --libs x265)
-L/home/thomas/ffmpeg_build/lib -lx265
***@thomas-linux-box:~/ffmpeg_build$ (export
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --cflags
x265)
-I/home/thomas/ffmpeg_build/include
***@thomas-linux-box:~/ffmpeg_build$ (export
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --libs
--static x265)
-L/home/thomas/ffmpeg_build/lib -lx265 -lstdc++ -lm -lrt -ldl
***@thomas-linux-box:~/ffmpeg_build$ (export
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --cflags
--static x265)
-I/home/thomas/ffmpeg_build/include
Post by Moritz Barsnick
Post by Thomas Hehl
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-nonfree
ERROR: x265 not found using pkg-config
That's peculiar, because your first email showed that it installed
/home/thomas/ffmpeg_build/lib/pkgconfig/x265.pc
$ ls -l /home/thomas/ffmpeg_build/lib/pkgconfig/x265.pc
$ pkg-config --libs x265
$ (export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --libs x265)
$ (export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --cflags x265)
$ (export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config
--libs --static x265)
$ (export PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config
--cflags --static x265)
Thanks,
Moritz
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Nicolas George
2015-12-04 14:21:37 UTC
Permalink
Post by Thomas Hehl
ERROR: x265 not found using pkg-config
If this is a snapshot of the latest hg tree, then it is probably because the
"bool" bug. Add "#include <stdbool.h>" somewhere in the beginning of x265.h
and it should work.

Regards,
--
Nicolas George
Thomas Hehl
2015-12-04 15:05:52 UTC
Permalink
Made change to the header as requested and re-ran the build. Doesn't look
like much has changed:

***@thomas-linux-box:~/ffmpeg_sources/x265/build/linux$ make install
Scanning dependencies of target common
[ 1%] Building CXX object
common/CMakeFiles/common.dir/x86/asm-primitives.cpp.o
[ 25%] Building CXX object common/CMakeFiles/common.dir/yuv.cpp.o
[ 44%] Building CXX object common/CMakeFiles/common.dir/deblock.cpp.o
[ 63%] Built target common
Scanning dependencies of target encoder
[ 87%] Building CXX object
encoder/CMakeFiles/encoder.dir/weightPrediction.cpp.o
[ 87%] Built target encoder
Linking CXX static library libx265.a
[ 87%] Built target x265-static
Scanning dependencies of target cli
[ 98%] Building CXX object CMakeFiles/cli.dir/x265.cpp.o
[100%] Building CXX object CMakeFiles/cli.dir/x265-extras.cpp.o
Linking CXX executable x265
[100%] Built target cli
Install the project...
-- Install configuration: "Release"
-- Installing: /home/thomas/ffmpeg_build/lib/libx265.a
-- Installing: /home/thomas/ffmpeg_build/include/x265.h
-- Up-to-date: /home/thomas/ffmpeg_build/include/x265_config.h
-- Up-to-date: /home/thomas/ffmpeg_build/lib/pkgconfig/x265.pc
-- Installing: /home/thomas/ffmpeg_build/bin/x265
***@thomas-linux-box:~/ffmpeg_sources/x265/build/linux$ make distclean
make: *** No rule to make target 'distclean'. Stop.
***@thomas-linux-box:~/ffmpeg_sources/x265/build/linux$ cd
~/ffmpeg_build/
***@thomas-linux-box:~/ffmpeg_build$ pkg-config --libs 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
***@thomas-linux-box:~/ffmpeg_build$ (export
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --libs x265)
-L/home/thomas/ffmpeg_build/lib -lx265
***@thomas-linux-box:~/ffmpeg_build$ (export
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --cflags
x265)
-I/home/thomas/ffmpeg_build/include
***@thomas-linux-box:~/ffmpeg_build$ (export
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --libs
--static x265)
-L/home/thomas/ffmpeg_build/lib -lx265 -lstdc++ -lm -lrt -ldl
***@thomas-linux-box:~/ffmpeg_build$ (export
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"; pkg-config --cflags
--static x265)
-I/home/thomas/ffmpeg_build/include
Post by Nicolas George
Post by Thomas Hehl
ERROR: x265 not found using pkg-config
If this is a snapshot of the latest hg tree, then it is probably because the
"bool" bug. Add "#include <stdbool.h>" somewhere in the beginning of x265.h
and it should work.
Regards,
--
Nicolas George
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Moritz Barsnick
2015-12-04 15:52:17 UTC
Permalink
Post by Nicolas George
If this is a snapshot of the latest hg tree, then it is probably because the
"bool" bug. Add "#include <stdbool.h>" somewhere in the beginning of x265.h
and it should work.
From what I can tell, that was fixed here:
http://hg.videolan.org/x265/rev/86b915fdd88a

But it's worth a try.

Otherwise, we need Thomas's config.log, or at least the end of it.
@Thomas, can you check the end of config.log for messages regarding
x265?

Moritz
Thomas Hehl
2015-12-04 17:33:47 UTC
Permalink
Hmmm....

/tmp/ffconf.Ydk6LmVB.c:3:2: error: #error "unsatisfied condition:
X264_MPEG2"
#error "unsatisfied condition: X264_MPEG2"
^
check_pkg_config x265 x265.h x265_api_get
pkg-config --exists --print-errors x265
check_func_headers x265.h x265_api_get -I/home/thomas/ffmpeg_build/include
-L/home/thomas/ffmpeg_build/lib -lx265 -lstdc++ -lm -lrt -ldl
check_ld cc -I/home/thomas/ffmpeg_build/include
-L/home/thomas/ffmpeg_build/lib -lx265 -lstdc++ -lm -lrt -ldl
check_cc -I/home/thomas/ffmpeg_build/include -L/home/thomas/ffmpeg_build/lib
BEGIN /tmp/ffconf.Ydk6LmVB.c
1 #include <x265.h>
2 long check_x265_api_get(void) { return (long) x265_api_get; }
3 int main(void) { return 0; }
END /tmp/ffconf.Ydk6LmVB.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
-I/home/thomas/ffmpeg_build/include -std=c99 -fomit-frame-pointer -pthread
-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/fribidi
-I/usr/include/freetype2 -I/home/thomas/ffmpeg_build/include
-I/usr/include/freetype2 -I/usr/include/opus
-I/home/thomas/ffmpeg_build/include -I/home/thomas/ffmpeg_build/include
-I/home/thomas/ffmpeg_build/include -I/home/thomas/ffmpeg_build/include
-I/home/thomas/ffmpeg_build/include -L/home/thomas/ffmpeg_build/lib -c -o
/tmp/ffconf.CdxUfdFo.o /tmp/ffconf.Ydk6LmVB.c
In file included from /tmp/ffconf.Ydk6LmVB.c:1:0:
/home/thomas/ffmpeg_build/include/x265.h:103:5: error: unknown type name
'bool'
bool bScenecut;
^
ERROR: x265 not found using pkg-config

But if that's it, why didn't changing the header make it better?
Post by Thomas Hehl
Post by Nicolas George
If this is a snapshot of the latest hg tree, then it is probably because
the
Post by Nicolas George
"bool" bug. Add "#include <stdbool.h>" somewhere in the beginning of
x265.h
Post by Nicolas George
and it should work.
http://hg.videolan.org/x265/rev/86b915fdd88a
But it's worth a try.
Otherwise, we need Thomas's config.log, or at least the end of it.
@Thomas, can you check the end of config.log for messages regarding
x265?
Moritz
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
David Witten
2015-12-04 17:59:29 UTC
Permalink
Though I am not the OP fro the build problem in question, I can report that
this failure occurred for me in the FFmpeg build process Wednesday, Dec 2.
Everything was checked out fresh at that time.

I was following the instructions for Linux 14.04 described on the FFmpeg
build page. It did not appear to me that there was a problem in the x265
build itself.

It seemed as though the FFmpeg build process was not finding it. This even
though it was located exactly where it claimed it should be. Therefore I
tried to report it as a problem with the FFmpeg configure process.

My report was not posted because I was not yet a 'member' of the list.

Dave
Post by Thomas Hehl
Post by Nicolas George
If this is a snapshot of the latest hg tree, then it is probably because
the
Post by Nicolas George
"bool" bug. Add "#include <stdbool.h>" somewhere in the beginning of
x265.h
Post by Nicolas George
and it should work.
http://hg.videolan.org/x265/rev/86b915fdd88a
But it's worth a try.
Otherwise, we need Thomas's config.log, or at least the end of it.
@Thomas, can you check the end of config.log for messages regarding
x265?
Moritz
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Nicolas George
2015-12-04 18:15:44 UTC
Permalink
Post by Moritz Barsnick
http://hg.videolan.org/x265/rev/86b915fdd88a
But it's worth a try.
I was using a clone from:
https://bitbucket.org/multicoreware/x265
It seems to be the one officially recommended, and it does not have this
commit.

Regards,
--
Nicolas George
Thomas Hehl
2015-12-04 19:56:58 UTC
Permalink
Tried using that clone and still had the same build issue.
Post by Nicolas George
Post by Moritz Barsnick
http://hg.videolan.org/x265/rev/86b915fdd88a
But it's worth a try.
https://bitbucket.org/multicoreware/x265
It seems to be the one officially recommended, and it does not have this
commit.
Regards,
--
Nicolas George
_______________________________________________
ffmpeg-user mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Loading...