[GH-ISSUE #19] Error compiling on Ubuntu 16.04 #13

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

Originally created by @jedrekdomanski on GitHub (Jan 13, 2018).
Original GitHub issue: https://github.com/lutris/ffmpeg-nvenc/issues/19

The script fails on Ubuntu 16.04. Output log below.

In file included from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/FDK_audio.h:98:0,
from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/aacdecoder_lib.h:347,
from libavcodec/libfdk-aacdec.c:20:
/home/jedrek/Dokumenty/Nvenc/include/fdk-aac/genericStds.h:402:5: warning: ‘IS_LITTLE_ENDIAN’ defined but not used [-Wunused-function]
int IS_LITTLE_ENDIAN(void) {
^
CC libavcodec/libmp3lame.o
In file included from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/FDK_audio.h:98:0,
from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/aacenc_lib.h:706,
from libavcodec/libfdk-aacenc.c:20:
/home/jedrek/Dokumenty/Nvenc/include/fdk-aac/genericStds.h:402:5: warning: ‘IS_LITTLE_ENDIAN’ defined but not used [-Wunused-function]
int IS_LITTLE_ENDIAN(void) {
^
CC libavcodec/libopus.o
CC libavcodec/libopusdec.o
CC libavcodec/libopusenc.o
CC libavcodec/libtheoraenc.o
CC libavcodec/libvorbisdec.o
CC libavcodec/libvorbisenc.o
CC libavcodec/libvpx.o
CC libavcodec/libvpxdec.o
CC libavcodec/libvpxenc.o
CC libavcodec/libx264.o
CC libavcodec/ljpegenc.o
libavcodec/libx264.c: In function ‘X264_frame’:
libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
if (x264_bit_depth > 8)
^
libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libx264.c: In function ‘X264_init_static’:
libavcodec/libx264.c:892:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
if (x264_bit_depth == 8)
^
common.mak:60: polecenia dla obiektu 'libavcodec/libx264.o' failed
make: *** [libavcodec/libx264.o] Exit code 1
make: *** Waiting to terminate the task....

Originally created by @jedrekdomanski on GitHub (Jan 13, 2018). Original GitHub issue: https://github.com/lutris/ffmpeg-nvenc/issues/19 The script fails on Ubuntu 16.04. Output log below. In file included from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/FDK_audio.h:98:0, from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/aacdecoder_lib.h:347, from libavcodec/libfdk-aacdec.c:20: /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/genericStds.h:402:5: warning: ‘IS_LITTLE_ENDIAN’ defined but not used [-Wunused-function] int IS_LITTLE_ENDIAN(void) { ^ CC libavcodec/libmp3lame.o In file included from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/FDK_audio.h:98:0, from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/aacenc_lib.h:706, from libavcodec/libfdk-aacenc.c:20: /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/genericStds.h:402:5: warning: ‘IS_LITTLE_ENDIAN’ defined but not used [-Wunused-function] int IS_LITTLE_ENDIAN(void) { ^ CC libavcodec/libopus.o CC libavcodec/libopusdec.o CC libavcodec/libopusenc.o CC libavcodec/libtheoraenc.o CC libavcodec/libvorbisdec.o CC libavcodec/libvorbisenc.o CC libavcodec/libvpx.o CC libavcodec/libvpxdec.o CC libavcodec/libvpxenc.o CC libavcodec/libx264.o CC libavcodec/ljpegenc.o libavcodec/libx264.c: In function ‘X264_frame’: libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function) if (x264_bit_depth > 8) ^ libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in libavcodec/libx264.c: In function ‘X264_init_static’: libavcodec/libx264.c:892:9: error: ‘x264_bit_depth’ undeclared (first use in this function) if (x264_bit_depth == 8) ^ common.mak:60: polecenia dla obiektu 'libavcodec/libx264.o' failed make: *** [libavcodec/libx264.o] Exit code 1 make: *** Waiting to terminate the task....
Author
Owner

@kingprimex commented on GitHub (Jan 14, 2018):

It is a bug in ffmpeg version. It still is in 3.4.

<!-- gh-comment-id:357503319 --> @kingprimex commented on GitHub (Jan 14, 2018): It is a bug in ffmpeg version. It still is in 3.4.
Author
Owner

@bnku commented on GitHub (Jan 22, 2018):

Use the actual snapshot of ffmpeg from https://ffmpeg.org/releases/ffmpeg-snapshot-git.tar.bz2

<!-- gh-comment-id:359446273 --> @bnku commented on GitHub (Jan 22, 2018): Use the actual snapshot of ffmpeg from https://ffmpeg.org/releases/ffmpeg-snapshot-git.tar.bz2
Author
Owner

@jedrekdomanski commented on GitHub (Jan 22, 2018):

@bnku
I've taken a look at the bash script and I see that the script uses version 3.1, here's the code.

ffmpeg_version="3.1"
if [ ! -f  ffmpeg-${ffmpeg_version}.tar.bz2 ]; then
  wget -4 http://ffmpeg.org/releases/ffmpeg-${ffmpeg_version}.tar.bz
fi

So I changed the script to use ffmpeg-snapshot-git.tar.bz2 version - as you suggest - but it errors out during configurations at line 201 --enable-x11grab.

Unknown option "--enable-x11grab".
See ./configure --help for available options.

Correct me if I am wrong.

<!-- gh-comment-id:359544268 --> @jedrekdomanski commented on GitHub (Jan 22, 2018): @bnku I've taken a look at the bash script and I see that the script uses version 3.1, here's the code. ``` ffmpeg_version="3.1" if [ ! -f ffmpeg-${ffmpeg_version}.tar.bz2 ]; then wget -4 http://ffmpeg.org/releases/ffmpeg-${ffmpeg_version}.tar.bz fi ``` So I changed the script to use ffmpeg-snapshot-git.tar.bz2 version - as you suggest - but it errors out during configurations at line 201 `--enable-x11grab`. ``` Unknown option "--enable-x11grab". See ./configure --help for available options. ``` Correct me if I am wrong.
Author
Owner

@bnku commented on GitHub (Jan 22, 2018):

use the --enable-libxcb instead

<!-- gh-comment-id:359545051 --> @bnku commented on GitHub (Jan 22, 2018): use the `--enable-libxcb` instead
Author
Owner

@jedrekdomanski commented on GitHub (Jan 22, 2018):

After applying certain modifications to the script, it compiles everything fine. Here is the the modified parts of the script and a screen shot confirming it all works fine.

BuildFFmpeg() {
    echo "Compiling ffmpeg"
    cd $source_dir
    ffmpeg_version="snapshot-git"
    if [ ! -f  ffmpeg-${ffmpeg_version}.tar.bz2 ]; then
        wget -4 http://ffmpeg.org/releases/ffmpeg-${ffmpeg_version}.tar.bz2
    fi
    tar xjf ffmpeg-${ffmpeg_version}.tar.bz2
    cd ffmpeg
    PKG_CONFIG_PATH="${build_dir}/lib/pkgconfig" ./configure \
        --prefix="$build_dir" \
        --extra-cflags="-fPIC -m64 -I${inc_dir}" \
        --extra-ldflags="-L${build_dir}/lib" \
        --bindir="$bin_dir" \
        --enable-gpl \
        --enable-libass \
        --enable-libfdk-aac \
        --enable-libfreetype \
        --enable-libmp3lame \
        --enable-libopus \
        --enable-libtheora \
        --enable-libvorbis \
        --enable-libvpx \
        --enable-libx264 \
        --enable-nonfree \
        --enable-nvenc \
        --enable-pic \
        --enable-libxcb \
        --extra-ldexeflags=-pie \
        --enable-shared
    make -j${cpus}
    make install
}

I also removed my previous installation of OBS and now the new installation has NVENC.H264 encoder.
obs

<!-- gh-comment-id:359553208 --> @jedrekdomanski commented on GitHub (Jan 22, 2018): After applying certain modifications to the script, it compiles everything fine. Here is the the modified parts of the script and a screen shot confirming it all works fine. ``` BuildFFmpeg() { echo "Compiling ffmpeg" cd $source_dir ffmpeg_version="snapshot-git" if [ ! -f ffmpeg-${ffmpeg_version}.tar.bz2 ]; then wget -4 http://ffmpeg.org/releases/ffmpeg-${ffmpeg_version}.tar.bz2 fi tar xjf ffmpeg-${ffmpeg_version}.tar.bz2 cd ffmpeg PKG_CONFIG_PATH="${build_dir}/lib/pkgconfig" ./configure \ --prefix="$build_dir" \ --extra-cflags="-fPIC -m64 -I${inc_dir}" \ --extra-ldflags="-L${build_dir}/lib" \ --bindir="$bin_dir" \ --enable-gpl \ --enable-libass \ --enable-libfdk-aac \ --enable-libfreetype \ --enable-libmp3lame \ --enable-libopus \ --enable-libtheora \ --enable-libvorbis \ --enable-libvpx \ --enable-libx264 \ --enable-nonfree \ --enable-nvenc \ --enable-pic \ --enable-libxcb \ --extra-ldexeflags=-pie \ --enable-shared make -j${cpus} make install } ``` I also removed my previous installation of OBS and now the new installation has NVENC.H264 encoder. ![obs](https://user-images.githubusercontent.com/5911945/35242664-8627eea6-ffba-11e7-9fa9-40eb40c82380.png)
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#13
No description provided.