x264: Could not find x264_encoder_open_144 in /usr/lib/x86_64-linux-gnu/libx264

Started by Jan Gruuthuse, January 21, 2015, 08:31:29 AM

Previous topic - Next topic

Jan Gruuthuse

FIXED
Quote-- Found x264.h
--   core version: 144
-- Found x264.h
-- Found x264 library
-- Could not find x264_encoder_open_144 in /usr/lib/x86_64-linux-gnu/libx264.so
-- Change Dir: /home/jan/avidemux2/buildPluginsCommon/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec2563135615/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2563135615.dir/build.make CMakeFiles/cmTryCompileExec2563135615.dir/build
make[1]: Entering directory `/home/jan/avidemux2/buildPluginsCommon/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/jan/avidemux2/buildPluginsCommon/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec2563135615.dir/CheckFunctionExists.c.o
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=x264_encoder_open_144 -fmessage-length=0 -fmessage-length=0    -o CMakeFiles/cmTryCompileExec2563135615.dir/CheckFunctionExists.c.o   -c /home/jan/avidemux2/cmake_compile_check/CheckFunctionExists.c
Linking C executable cmTryCompileExec2563135615
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2563135615.dir/link.txt --verbose=1
/usr/bin/cc   -fmessage-length=0 -fmessage-length=0     CMakeFiles/cmTryCompileExec2563135615.dir/CheckFunctionExists.c.o  -o cmTryCompileExec2563135615 -rdynamic -lx264
CMakeFiles/cmTryCompileExec2563135615.dir/CheckFunctionExists.c.o: In function `main':
CheckFunctionExists.c:(.text+0x15): undefined reference to `x264_encoder_open_144'
collect2: error: ld returned 1 exit status
make[1]: Leaving directory `/home/jan/avidemux2/buildPluginsCommon/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec2563135615] Error 1
make: *** [cmTryCompileExec2563135615/fast] Error 2

Could not find x264

-- x264 disabled.
Any ideas why/what is happening?

x264 --version
x264 0.144.2525 40bb568
built on Jan 21 2015, gcc: 4.8.2
configuration: --bit-depth=8 --chroma-format=all
x264 license: GPL version 2 or later
jan@jan-MS-7680:~$


avidemux 2.6.8 did build:
QuotePreparing packages
** debs directory ready **
total 9672
-rw-rw-r-- 1 jan jan 1570966 jan 21 09:25 avidemux3-cli-2.6.8-150121-Linux.deb
-rw-rw-r-- 1 jan jan 3357460 jan 21 09:25 avidemux3-core-2.6.8-150121-Linux.deb
-rw-rw-r-- 1 jan jan   57514 jan 21 09:25 avidemux3-plugins-CLI-2.6.8-150121-Linux.deb
-rw-rw-r-- 1 jan jan 2245218 jan 21 09:25 avidemux3-plugins-COMMON-2.6.8-150121-Linux.deb
-rw-rw-r-- 1 jan jan  233092 jan 21 09:25 avidemux3-plugins-QT4-2.6.8-150121-Linux.deb
-rw-rw-r-- 1 jan jan   58728 jan 21 09:25 avidemux3-plugins-SETTINGS-2.6.8-150121-Linux.deb
-rw-rw-r-- 1 jan jan 2366272 jan 21 09:25 avidemux3-qt4-2.6.8-150121-Linux.deb
** ALL DONE **
** The installable packages are in the debs folder **
_____________________________________________
Avidemux v2.6.8 (#d73b1a8)
_____________________________________________
Compiler: GCC 4.8.2
cmake: 2.8.12.2
Build Target: Linux (x86-64)
User Interface: Qt (4.8.6)
_____________________________________________
Kernel: Linux 3.13.0-44-generic (x86_64) (linux-image-3.13.0-35-generic 3.13.0-35.62)
Distribution: Linux Ubuntu 14.04.1 LTS (Trusty)

Intel Core i7-3770K @ 3.50GHz (4 Cores/8 Threads) with 16 GB ram

Desktop: Unity 7.2.3
Display Server: X Server 1.15.1
Display Driver: nouveau  1.0.11
OpenGL: 2.1.2

OpenGL Vendor: NVIDIA Corporation
OpenGL Renderer: GeForce GT 520/PCIe/SSE2 1024MB (810/535MHz)
OpenGL: 4.2.0 NVIDIA 304.125
Compiler: GCC 4.8 + CUDA 5.5

vdpauinfo:
---------
API version: 1
NVIDIA VDPAU Driver Shared Library  304.125
_____________________________________________

ajschult

try

nm -D /usr/lib/x86_64-linux-gnu/libx264.so | grep x264_encoder_open


I have v138 instead of 144.  I get


nm -D /usr/lib64/libx264.so.138 | grep x264_encoder_open
000000000008e5e0 T x264_encoder_open_138


If you lib doesn't have the symbol, then I'd say the lib is broken.  If it does, you might check to see what library the linker is trying to actually use.  You'll need to invoke two of the commands manually


/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=x264_encoder_open_144 -fmessage-length=0 -fmessage-length=0    -o CMakeFiles/cmTryCompileExec2563135615.dir/CheckFunctionExists.c.o   -c /home/jan/avidemux2/cmake_compile_check

and then

/usr/bin/cc   -fmessage-length=0 -fmessage-length=0     CMakeFiles/cmTryCompileExec2563135615.dir/CheckFunctionExists.c.o  -o cmTryCompileExec2563135615 -rdynamic -lx264

You can change the path for the CheckFunctionExists.c.o to some temporary location if needed.

If you can reproduce the problem, the try adding "-Wl,--verbose" to the second commandline.  It prints a lot, but look for bits about libx264

Jan Gruuthuse

nm -D /usr/lib/x86_64-linux-gnu/libx264.so | grep x264_encoder_open
Quote00000000000a6820 T x264_encoder_open_142
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=x264_encoder_open_142 -fmessage-length=0 -fmessage-length=0    -o CMakeFiles/cmTryCompileExec2563135615.dir/CheckFunctionExists.c.o   -c /home/jan/avidemux2/cmake_compile_check
Quotecc: warning: /home/jan/avidemux2/cmake_compile_check: linker input file unused because linking not done
/usr/bin/cc   -fmessage-length=0 -fmessage-length=0     CMakeFiles/cmTryCompileExec2563135615.dir/CheckFunctionExists.c.o  -o cmTryCompileExec2563135615 -rdynamic -lx264
Quotecc: error: CMakeFiles/cmTryCompileExec2563135615.dir/CheckFunctionExists.c.o: No such file or directory

Jan Gruuthuse

#3
Warning: careful on production computer: plenty of stuff could get broken in video department! Uninstall packages and so on!
If issues try avconv, if problems you need probably to reinstall libx264-dev avconv

________________________________________
Probably need to un-install previously installed x264.

Get x264: git clone git://git.videolan.org/x264.git
Update x264: cd ~/x264
git pull

Build x264: cd ~/x264
./configure  --prefix="/usr" --bindir="/usr/local/bin" --libdir="/usr/lib/x86_64-linux-gnu/" --enable-static --enable-shared
make -j4
sudo make install

test:
nm -D /usr/lib/x86_64-linux-gnu/libx264.so | grep x264_encoder_open
00000000000a86c0 T x264_encoder_open_144

Is this about what is needed? :
install -d /usr/local/bin
install x264 /usr/local/bin
install -d /usr/include
install -d /usr/lib/x86_64-linux-gnu/
install -d /usr/lib/x86_64-linux-gnu//pkgconfig
install -m 644 ./x264.h /usr/include
install -m 644 x264_config.h /usr/include
install -m 644 x264.pc /usr/lib/x86_64-linux-gnu//pkgconfig