[GH-ISSUE #3] libx264 not found on some systems #3

Open
opened 2026-10-30 22:07:11 +00:00 by bsakaguchi · 3 comments
Owner

Originally created by @strycore on GitHub (Jul 29, 2016).
Original GitHub issue: https://github.com/lutris/ffmpeg-nvenc/issues/3

I've received two reports that the script fails to build on some system with ffmpeg being unable to find libx264. Here is a detailed report of the errors below:

The error I get appears to be during the configure for ffmpeg:

2016-07-27 13:53:19 (1.72 MB/s) - ‘ffmpeg-3.1.tar.bz2’ saved [9329359/9329359]
ERROR: libx264 not found

I've looked at source/ffmpeg-3.1/config.log and determined that the x264 headers were not in place:

/tmp/ffconf.J7WYN2Vg.c:1:18: fatal error: x264.h: No such file or directory

compilation terminated.

I was able to correct this by adding "make install-lib-dev" to the x264 install after "make install" but I still have an issue finding libx264:

/usr/bin/ld: cannot find -lx264

The only file I could find that I think might match is libx264.a which does not get installed by x264's makefile. I think this might be a bug on x264's end. I added a simple cp after the "make install-lib-dev" added above and the build gets further:

cp libx264.a $build_dir/lib/

Now I get the following when building:

/usr/bin/ld: /home/redkrieg/nvenc/ffmpeg-nvenc/lib/libx264.a(common.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/home/redkrieg/nvenc/ffmpeg-nvenc/lib/libx264.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
library.mak:99: recipe for target 'libavcodec/libavcodec.so.57' failed
make: *** [libavcodec/libavcodec.so.57] Error 1
make: *** Waiting for unfinished jobs....

Originally created by @strycore on GitHub (Jul 29, 2016). Original GitHub issue: https://github.com/lutris/ffmpeg-nvenc/issues/3 I've received two reports that the script fails to build on some system with ffmpeg being unable to find libx264. Here is a detailed report of the errors below: > The error I get appears to be during the configure for ffmpeg: > > ``` > 2016-07-27 13:53:19 (1.72 MB/s) - ‘ffmpeg-3.1.tar.bz2’ saved [9329359/9329359] > ERROR: libx264 not found > ``` > > I've looked at source/ffmpeg-3.1/config.log and determined that the x264 headers were not in place: > > ``` > /tmp/ffconf.J7WYN2Vg.c:1:18: fatal error: x264.h: No such file or directory > ``` > > compilation terminated. > > I was able to correct this by adding "make install-lib-dev" to the x264 install after "make install" but I still have an issue finding libx264: > > ``` > /usr/bin/ld: cannot find -lx264 > ``` > > The only file I could find that I think might match is libx264.a which does not get installed by x264's makefile. I think this might be a bug on x264's end. I added a simple cp after the "make install-lib-dev" added above and the build gets further: > > ``` > cp libx264.a $build_dir/lib/ > ``` > > Now I get the following when building: > > /usr/bin/ld: /home/redkrieg/nvenc/ffmpeg-nvenc/lib/libx264.a(common.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC > /home/redkrieg/nvenc/ffmpeg-nvenc/lib/libx264.a: error adding symbols: Bad value > collect2: error: ld returned 1 exit status > library.mak:99: recipe for target 'libavcodec/libavcodec.so.57' failed > make: **\* [libavcodec/libavcodec.so.57] Error 1 > make: **\* Waiting for unfinished jobs....
Author
Owner

@strycore commented on GitHub (Jul 29, 2016):

Installing the libx264-dev package is a workaround but it shouldn't be needed, we already provide it from our script

<!-- gh-comment-id:236279595 --> @strycore commented on GitHub (Jul 29, 2016): Installing the libx264-dev package is a workaround but it shouldn't be needed, we already provide it from our script
Author
Owner

@tenten8401 commented on GitHub (Aug 18, 2016):

I am experiencing this issue as well. Installing libx264-dev did fix it. Also, didn't video sdk 7.0 come out?

<!-- gh-comment-id:240745537 --> @tenten8401 commented on GitHub (Aug 18, 2016): I am experiencing this issue as well. Installing libx264-dev did fix it. Also, didn't video sdk 7.0 come out?
Author
Owner

@strycore commented on GitHub (Aug 22, 2016):

I added the libx264-dev package as a dependency for the time being.

For the Nvidia SDK 7, I haven't managed to get a direct downloadable link to it without having to enroll to the Nvidia developer program and log in to their website.

<!-- gh-comment-id:241558909 --> @strycore commented on GitHub (Aug 22, 2016): I added the libx264-dev package as a dependency for the time being. For the Nvidia SDK 7, I haven't managed to get a direct downloadable link to it without having to enroll to the Nvidia developer program and log in to their website.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lutris/ffmpeg-nvenc#3
No description provided.