How to compile FFmpeg on Ubuntu 20.04


Step 1:

apt install autoconf automake bzip2 cmake libfreetype-dev libgcc1 git libtool make mercurial python3-pkgconfig zlib1g-dev

result:

root@tutorialspots:~# apt install autoconf automake bzip2 cmake libfreetype-dev libgcc1 git libtool make mercurial python3-pkgconfig zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
autoconf is already the newest version (2.69-11.1).
automake is already the newest version (1:1.16.1-4ubuntu6).
bzip2 is already the newest version (1.0.8-2).
libtool is already the newest version (2.4.6-14).
make is already the newest version (4.2.1-1.2).
cmake is already the newest version (3.16.3-1ubuntu1.20.04.1).
git is already the newest version (1:2.25.1-1ubuntu3.11).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu1.5).
The following packages were automatically installed and are no longer required:
  i965-va-driver intel-media-va-driver libaacs0 libaom0 libass9 libasyncns0
  libavc1394-0 libavcodec58 libavdevice58 libavfilter7 libavformat58
  libavresample4 libavutil56 libbdplus0 libbluray2 libbs2b0 libcaca0
  libcairo-gobject2 libcdio-cdda2 libcdio-paranoia2 libcdio18 libchromaprint1
  libcodec2-0.9 libdc1394-22 libflac8 libflite1 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgme0 libgsm1 libiec61883-0
  libigdgmm11 libjack-jackd2-0 liblilv-0-0 libmp3lame0 libmpg123-0 libmysofa1
  libnorm1 libopenal-data libopenal1 libopenmpt0 libopus0 libpgm-5.2-0
  libpostproc55 libpulse0 libraw1394-11 librsvg2-2 librsvg2-common
  librubberband2 libsamplerate0 libsdl2-2.0-0 libserd-0-0 libshine3
  libsnappy1v5 libsndfile1 libsndio7.0 libsord-0-0 libsoxr0 libspeex1
  libsratom-0-0 libssh-gcrypt-4 libswresample3 libswscale5 libtheora0
  libtwolame0 libva-drm2 libva-x11-2 libva2 libvdpau1 libvidstab1.1
  libvorbisenc2 libvpx6 libwavpack1 libwayland-cursor0 libwayland-egl1
  libx264-155 libx265-179 libxcb-shape0 libxcursor1 libxinerama1 libxkbcommon0
  libxrandr2 libxss1 libxv1 libxvidcore4 libzmq5 libzvbi-common libzvbi0
  mesa-va-drivers mesa-vdpau-drivers ocl-icd-libopencl1 va-driver-all
  vdpau-driver-all x11-common
Unpacking libgcc1 (1:10.5.0-1ubuntu1~20.04) ...
Selecting previously unselected package libfreetype-dev:amd64.
Preparing to unpack .../libfreetype-dev_2.10.1-2ubuntu0.3_amd64.deb ...
Unpacking libfreetype-dev:amd64 (2.10.1-2ubuntu0.3) ...
Selecting previously unselected package mercurial-common.
Preparing to unpack .../mercurial-common_5.3.1-1ubuntu1_all.deb ...
Unpacking mercurial-common (5.3.1-1ubuntu1) ...
Selecting previously unselected package mercurial.
Preparing to unpack .../mercurial_5.3.1-1ubuntu1_amd64.deb ...
Unpacking mercurial (5.3.1-1ubuntu1) ...
Selecting previously unselected package python3-pkgconfig.
Preparing to unpack .../python3-pkgconfig_1.5.1-3_all.deb ...
Unpacking python3-pkgconfig (1.5.1-3) ...
Setting up mercurial-common (5.3.1-1ubuntu1) ...
Setting up libgcc1 (1:10.5.0-1ubuntu1~20.04) ...
Setting up libfreetype-dev:amd64 (2.10.1-2ubuntu0.3) ...
Setting up python3-pkgconfig (1.5.1-3) ...
Setting up mercurial (5.3.1-1ubuntu1) ...

Creating config file /etc/mercurial/hgrc.d/hgext.rc with new version
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.14) ...

Step 2:

mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources

step 3: apt install yasm

result:

root@tutorialspots:~/ffmpeg_sources# apt install yasm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  i965-va-driver intel-media-va-driver libaacs0 libaom0 libass9 libasyncns0
  libavc1394-0 libavcodec58 libavdevice58 libavfilter7 libavformat58
  libavresample4 libavutil56 libbdplus0 libbluray2 libbs2b0 libcaca0
  libcairo-gobject2 libcdio-cdda2 libcdio-paranoia2 libcdio18 libchromaprint1
  libsratom-0-0 libssh-gcrypt-4 libswresample3 libswscale5 libtheora0
  libtwolame0 libva-drm2 libva-x11-2 libva2 libvdpau1 libvidstab1.1
  libvorbisenc2 libvpx6 libwavpack1 libwayland-cursor0 libwayland-egl1
  libx264-155 libx265-179 libxcb-shape0 libxcursor1 libxinerama1 libxkbcommon0
  libxrandr2 libxss1 libxv1 libxvidcore4 libzmq5 libzvbi-common libzvbi0
  mesa-va-drivers mesa-vdpau-drivers ocl-icd-libopencl1 va-driver-all
  vdpau-driver-all x11-common
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  yasm
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 408 kB of archives.
After this operation, 2180 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 yasm amd64 1.3.0-2ubuntu1 [408 kB]
Fetched 408 kB in 3s (156 kB/s)
Selecting previously unselected package yasm.
(Reading database ... 131749 files and directories currently installed.)
Preparing to unpack .../yasm_1.3.0-2ubuntu1_amd64.deb ...
Unpacking yasm (1.3.0-2ubuntu1) ...
Setting up yasm (1.3.0-2ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...

Step 4: install nasm

apt install nasm

result:

root@tutorialspots:~/ffmpeg_sources# apt install nasm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  i965-va-driver intel-media-va-driver libaacs0 libaom0 libass9 libasyncns0
  libavc1394-0 libavcodec58 libavdevice58 libavfilter7 libavformat58
  libavresample4 libavutil56 libbdplus0 libbluray2 libbs2b0 libcaca0
  libcairo-gobject2 libcdio-cdda2 libcdio-paranoia2 libcdio18 libchromaprint1
  libsratom-0-0 libssh-gcrypt-4 libswresample3 libswscale5 libtheora0
  libtwolame0 libva-drm2 libva-x11-2 libva2 libvdpau1 libvidstab1.1
  libvorbisenc2 libvpx6 libwavpack1 libwayland-cursor0 libwayland-egl1
  libx264-155 libx265-179 libxcb-shape0 libxcursor1 libxinerama1 libxkbcommon0
  libxrandr2 libxss1 libxv1 libxvidcore4 libzmq5 libzvbi-common libzvbi0
  mesa-va-drivers mesa-vdpau-drivers ocl-icd-libopencl1 va-driver-all
  vdpau-driver-all x11-common
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  nasm
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 362 kB of archives.
After this operation, 3374 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 nasm amd64 2.14.02-1 [362 kB]
Fetched 362 kB in 2s (161 kB/s)
Selecting previously unselected package nasm.
(Reading database ... 131793 files and directories currently installed.)
Preparing to unpack .../nasm_2.14.02-1_amd64.deb ...
Unpacking nasm (2.14.02-1) ...
Setting up nasm (2.14.02-1) ...
Processing triggers for man-db (2.9.1-1) ...

Step 5: install libx264

5.1: Choose your version of libx264 here: ftp://ftp.videolan.org/pub/videolan/x264/snapshots/

Example web choose this file: ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20191217-2245-stable.tar.bz2

5.2: download this file: wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20191217-2245-stable.tar.bz2

root@tutorialspots:~/ffmpeg_sources# wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20191217-2245-stable.tar.bz2
--2024-02-24 21:20:36--  ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20191217-2245-stable.tar.bz2
           => ‘x264-snapshot-20191217-2245-stable.tar.bz2’
Resolving ftp.videolan.org (ftp.videolan.org)... 2a01:e0d:1:3:58bf:fa02:c0de:20, 213.36.253.2
Connecting to ftp.videolan.org (ftp.videolan.org)|2a01:e0d:1:3:58bf:fa02:c0de:20|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/videolan/x264/snapshots ... done.
==> SIZE x264-snapshot-20191217-2245-stable.tar.bz2 ... 770169
==> EPSV ... done.    ==> RETR x264-snapshot-20191217-2245-stable.tar.bz2 ... done.
Length: 770169 (752K) (unauthoritative)

x264-snapshot-20191 100%[===================>] 752.12K   544KB/s    in 1.4s

2024-02-24 21:20:41 (544 KB/s) - ‘x264-snapshot-20191217-2245-stable.tar.bz2’ saved [770169]

5.3: extract file: tar vxf x264-snapshot-20191217-2245-stable.tar.bz2

5.4: create folder x264 and copy all files from x264-snapshot-20191217-2245-stable to x264

mkdir x264
mv -f x264-snapshot-*/* x264/

5.5: install libx264:

cd x264
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static --enable-shared
make
make install
cd ..

result:

..
root@tutorialspots:~/ffmpeg_sources/x264# make install
install -d /root/bin
install x264 /root/bin
install -d /root/ffmpeg_build/include /root/ffmpeg_build/lib/pkgconfig
install -m 644 ./x264.h x264_config.h /root/ffmpeg_build/include
install -m 644 x264.pc /root/ffmpeg_build/lib/pkgconfig
install -d /root/ffmpeg_build/lib
ln -f -s libx264.so.157 /root/ffmpeg_build/lib/libx264.so
install -m 755 libx264.so.157 /root/ffmpeg_build/lib
install -d /root/ffmpeg_build/lib
install -m 644 libx264.a /root/ffmpeg_build/lib
gcc-ranlib /root/ffmpeg_build/lib/libx264.a
root@tutorialspots:~/ffmpeg_sources/x264# cd ..

5.6: make symbolic link

ln -s /root/ffmpeg_build/lib/libx264.so /usr/lib/libx264.so.157

Step 6: install libx265

git clone https://github.com/videolan/x265
cd ~/ffmpeg_sources/x265/build/linux
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make
make install

result:

root@tutorialspots:~/ffmpeg_sources# git clone https://github.com/videolan/x265
Cloning into 'x265'...
remote: Enumerating objects: 88647, done.
remote: Counting objects: 100% (88647/88647), done.
remote: Compressing objects: 100% (72641/72641), done.
remote: Total 88647 (delta 20542), reused 83464 (delta 15967), pack-reused 0
Receiving objects: 100% (88647/88647), 200.56 MiB | 15.30 MiB/s, done.
Resolving deltas: 100% (20542/20542), done.
root@tutorialspots:~/ffmpeg_sources# cd ~/ffmpeg_sources/x265/build/linux
root@tutorialspots:~/ffmpeg_sources/x265/build/linux# cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
-- cmake version 3.16.3
CMake Deprecation Warning at CMakeLists.txt:10 (cmake_policy):
  The OLD behavior for policy CMP0025 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Deprecation Warning at CMakeLists.txt:16 (cmake_policy):
  The OLD behavior for policy CMP0054 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detected x86_64 target processor
-- Found NUMA: /usr
-- Looking for numa_node_of_cpu
-- Looking for numa_node_of_cpu - found
-- libnuma found, building with support for NUMA nodes
CMake Warning (dev) at /usr/share/cmake-3.16/Modules/CheckIncludeFiles.cmake:120 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    numa

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  CMakeLists.txt:175 (check_include_files)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW - Success
-- Performing Test CC_HAS_NO_NARROWING
-- Performing Test CC_HAS_NO_NARROWING - Success
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS - Success
-- Performing Test CC_HAS_FAST_MATH
-- Performing Test CC_HAS_FAST_MATH - Success
-- Performing Test CC_HAS_STACK_REALIGN
-- Performing Test CC_HAS_STACK_REALIGN - Success
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG - Success
-- Found nasm: /usr/bin/nasm (found version "2.14.02")
-- Found Nasm 2.14.02 to build assembly primitives
-- GIT_EXECUTABLE /usr/bin/git
-- x265 RELEASE VERSION 3.4+28-419182243
-- The ASM_NASM compiler identification is NASM
-- Found assembler: /usr/bin/nasm
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for include file getopt.h
-- Looking for include file getopt.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /root/ffmpeg_sources/x265/build/linux
root@tutorialspots:~/ffmpeg_sources/x265/build/linux# make
Scanning dependencies of target common
[  1%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/pixel-a.asm.o
[  2%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/const-a.asm.o
[  3%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/cpu-a.asm.o
[  4%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/ssd-a.asm.o
[  5%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/mc-a.asm.o
[  7%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/mc-a2.asm.o
[  8%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/pixel-util8.asm.o
[  9%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/blockcopy8.asm.o
[ 10%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/pixeladd8.asm.o
[ 11%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/dct8.asm.o
[ 12%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/seaintegral.asm.o
[ 14%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/sad-a.asm.o
[ 15%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/intrapred8.asm.o
[ 16%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/intrapred8_allangs.asm.o
[ 17%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/v4-ipfilter8.asm.o
[ 18%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/h-ipfilter8.asm.o
[ 20%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/ipfilter8.asm.o
[ 21%] Building ASM_NASM object common/CMakeFiles/common.dir/x86/loopfilter.asm.o
[ 22%] Building CXX object common/CMakeFiles/common.dir/x86/asm-primitives.cpp.o
[ 23%] Building CXX object common/CMakeFiles/common.dir/vec/vec-primitives.cpp.o
[ 24%] Building CXX object common/CMakeFiles/common.dir/vec/dct-sse3.cpp.o
[ 25%] Building CXX object common/CMakeFiles/common.dir/vec/dct-ssse3.cpp.o
[ 27%] Building CXX object common/CMakeFiles/common.dir/vec/dct-sse41.cpp.o
[ 28%] Building CXX object common/CMakeFiles/common.dir/primitives.cpp.o
[ 29%] Building CXX object common/CMakeFiles/common.dir/pixel.cpp.o
[ 30%] Building CXX object common/CMakeFiles/common.dir/dct.cpp.o
[ 31%] Building CXX object common/CMakeFiles/common.dir/lowpassdct.cpp.o
[ 32%] Building CXX object common/CMakeFiles/common.dir/ipfilter.cpp.o
[ 34%] Building CXX object common/CMakeFiles/common.dir/intrapred.cpp.o
[ 35%] Building CXX object common/CMakeFiles/common.dir/loopfilter.cpp.o
[ 36%] Building CXX object common/CMakeFiles/common.dir/constants.cpp.o
[ 37%] Building CXX object common/CMakeFiles/common.dir/cpu.cpp.o
[ 38%] Building CXX object common/CMakeFiles/common.dir/version.cpp.o
[ 40%] Building CXX object common/CMakeFiles/common.dir/threading.cpp.o
[ 41%] Building CXX object common/CMakeFiles/common.dir/threadpool.cpp.o
[ 42%] Building CXX object common/CMakeFiles/common.dir/wavefront.cpp.o
[ 43%] Building CXX object common/CMakeFiles/common.dir/md5.cpp.o
[ 44%] Building CXX object common/CMakeFiles/common.dir/bitstream.cpp.o
[ 45%] Building CXX object common/CMakeFiles/common.dir/yuv.cpp.o
[ 47%] Building CXX object common/CMakeFiles/common.dir/shortyuv.cpp.o
[ 48%] Building CXX object common/CMakeFiles/common.dir/picyuv.cpp.o
[ 49%] Building CXX object common/CMakeFiles/common.dir/common.cpp.o
[ 50%] Building CXX object common/CMakeFiles/common.dir/param.cpp.o
[ 51%] Building CXX object common/CMakeFiles/common.dir/frame.cpp.o
[ 52%] Building CXX object common/CMakeFiles/common.dir/framedata.cpp.o
[ 54%] Building CXX object common/CMakeFiles/common.dir/cudata.cpp.o
[ 55%] Building CXX object common/CMakeFiles/common.dir/slice.cpp.o
[ 56%] Building CXX object common/CMakeFiles/common.dir/lowres.cpp.o
[ 57%] Building CXX object common/CMakeFiles/common.dir/piclist.cpp.o
[ 58%] Building CXX object common/CMakeFiles/common.dir/predict.cpp.o
[ 60%] Building CXX object common/CMakeFiles/common.dir/scalinglist.cpp.o
[ 61%] Building CXX object common/CMakeFiles/common.dir/quant.cpp.o
[ 62%] Building CXX object common/CMakeFiles/common.dir/deblock.cpp.o
[ 63%] Building CXX object common/CMakeFiles/common.dir/scaler.cpp.o
[ 63%] Built target common
Scanning dependencies of target encoder
[ 64%] Building CXX object encoder/CMakeFiles/encoder.dir/analysis.cpp.o
[ 65%] Building CXX object encoder/CMakeFiles/encoder.dir/search.cpp.o
[ 67%] Building CXX object encoder/CMakeFiles/encoder.dir/bitcost.cpp.o
[ 68%] Building CXX object encoder/CMakeFiles/encoder.dir/motion.cpp.o
[ 69%] Building CXX object encoder/CMakeFiles/encoder.dir/slicetype.cpp.o
[ 70%] Building CXX object encoder/CMakeFiles/encoder.dir/frameencoder.cpp.o
[ 71%] Building CXX object encoder/CMakeFiles/encoder.dir/framefilter.cpp.o
[ 72%] Building CXX object encoder/CMakeFiles/encoder.dir/level.cpp.o
[ 74%] Building CXX object encoder/CMakeFiles/encoder.dir/nal.cpp.o
[ 75%] Building CXX object encoder/CMakeFiles/encoder.dir/sei.cpp.o
[ 76%] Building CXX object encoder/CMakeFiles/encoder.dir/sao.cpp.o
[ 77%] Building CXX object encoder/CMakeFiles/encoder.dir/entropy.cpp.o
[ 78%] Building CXX object encoder/CMakeFiles/encoder.dir/dpb.cpp.o
[ 80%] Building CXX object encoder/CMakeFiles/encoder.dir/ratecontrol.cpp.o
/root/ffmpeg_sources/x265/source/encoder/ratecontrol.cpp: In member function ‘int x265::RateControl::writeRateControlFrameStats(x265::Frame*, x265::RateControlEntry*)’:
/root/ffmpeg_sources/x265/source/encoder/ratecontrol.cpp:3010:21: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
 3010 |             sprintf(deltaPOC, "%s%d~", deltaPOC, rpsWriter->deltaPOC[i]);
      |                     ^~~~~~~~           ~~~~~~~~
/root/ffmpeg_sources/x265/source/encoder/ratecontrol.cpp:3011:21: warning: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Wrestrict]
 3011 |             sprintf(bUsed, "%s%d~", bUsed, rpsWriter->bUsed[i]);
      |                     ^~~~~           ~~~~~
/root/ffmpeg_sources/x265/source/encoder/ratecontrol.cpp:3010:36: warning: ‘~’ directive writing 1 byte into a region of size between 0 and 127 [-Wformat-overflow=]
 3010 |             sprintf(deltaPOC, "%s%d~", deltaPOC, rpsWriter->deltaPOC[i]);
      |                                    ^
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /root/ffmpeg_sources/x265/source/common/common.h:33,
                 from /root/ffmpeg_sources/x265/source/encoder/ratecontrol.cpp:30:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 3 and 140 bytes into a destination of size 128
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/ffmpeg_sources/x265/source/encoder/ratecontrol.cpp:3011:33: warning: ‘~’ directive writing 1 byte into a region of size between 0 and 39 [-Wformat-overflow=]
 3011 |             sprintf(bUsed, "%s%d~", bUsed, rpsWriter->bUsed[i]);
      |                                 ^
In file included from /usr/include/stdio.h:867,
                 from /usr/include/c++/9/cstdio:42,
                 from /root/ffmpeg_sources/x265/source/common/common.h:33,
                 from /root/ffmpeg_sources/x265/source/encoder/ratecontrol.cpp:30:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 3 and 42 bytes into a destination of size 40
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 81%] Building CXX object encoder/CMakeFiles/encoder.dir/reference.cpp.o
[ 82%] Building CXX object encoder/CMakeFiles/encoder.dir/encoder.cpp.o
[ 83%] Building CXX object encoder/CMakeFiles/encoder.dir/api.cpp.o
[ 84%] Building CXX object encoder/CMakeFiles/encoder.dir/weightPrediction.cpp.o
[ 84%] Built target encoder
Scanning dependencies of target x265-static
[ 85%] Linking CXX static library libx265.a
[ 85%] Built target x265-static
Scanning dependencies of target cli
[ 87%] Building CXX object CMakeFiles/cli.dir/input/input.cpp.o
[ 88%] Building CXX object CMakeFiles/cli.dir/input/y4m.cpp.o
[ 89%] Building CXX object CMakeFiles/cli.dir/input/yuv.cpp.o
[ 90%] Building CXX object CMakeFiles/cli.dir/output/output.cpp.o
[ 91%] Building CXX object CMakeFiles/cli.dir/output/raw.cpp.o
[ 92%] Building CXX object CMakeFiles/cli.dir/output/reconplay.cpp.o
[ 94%] Building CXX object CMakeFiles/cli.dir/output/y4m.cpp.o
[ 95%] Building CXX object CMakeFiles/cli.dir/output/yuv.cpp.o
[ 96%] Building CXX object CMakeFiles/cli.dir/x265.cpp.o
/root/ffmpeg_sources/x265/source/x265.cpp: In function ‘bool parseAbrConfig(FILE*, x265::CLIOptions*, uint8_t)’:
/root/ffmpeg_sources/x265/source/x265.cpp:157:14: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
  157 |         fgets(line, sizeof(line), abrConfig);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 97%] Building CXX object CMakeFiles/cli.dir/x265cli.cpp.o
[ 98%] Building CXX object CMakeFiles/cli.dir/abrEncApp.cpp.o
[100%] Linking CXX executable x265
[100%] Built target cli
root@tutorialspots:~/ffmpeg_sources/x265/build/linux# make install
[ 63%] Built target common
[ 84%] Built target encoder
[ 85%] Built target x265-static
[100%] Built target cli
Install the project...
-- Install configuration: "Release"
-- Installing: /root/ffmpeg_build/lib/libx265.a
-- Installing: /root/ffmpeg_build/include/x265.h
-- Installing: /root/ffmpeg_build/include/x265_config.h
-- Installing: /root/ffmpeg_build/lib/pkgconfig/x265.pc
-- Installing: /root/ffmpeg_build/bin/x265
root@tutorialspots:~/ffmpeg_sources/x265/build/linux#

Or you can use package libx265-dev

apt install libx265-dev

Step 7: install libfdk_aac

cd ~/ffmpeg_sources
git clone --depth 1 https://github.com/mstorsjo/fdk-aac
cd fdk-aac
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install

result:

root@tutorialspots:~/ffmpeg_sources/x265/build/linux# cd ~/ffmpeg_sources
root@tutorialspots:~/ffmpeg_sources# git clone --depth 1 https://github.com/mstorsjo/fdk-aac
Cloning into 'fdk-aac'...
remote: Enumerating objects: 494, done.
remote: Counting objects: 100% (494/494), done.
remote: Compressing objects: 100% (382/382), done.
remote: Total 494 (delta 219), reused 222 (delta 96), pack-reused 0
Receiving objects: 100% (494/494), 2.71 MiB | 20.41 MiB/s, done.
Resolving deltas: 100% (219/219), done.
root@tutorialspots:~/ffmpeg_sources# cd fdk-aac
root@tutorialspots:~/ffmpeg_sources/fdk-aac# autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:20: installing './compile'
configure.ac:22: installing './config.guess'
configure.ac:22: installing './config.sub'
configure.ac:7: installing './install-sh'
configure.ac:7: installing './missing'
Makefile.am: installing './depcomp'
autoreconf: Leaving directory `.'
root@tutorialspots:~/ffmpeg_sources/fdk-aac# ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for library containing sin... -lm
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating fdk-aac.pc
config.status: executing depfiles commands
config.status: executing libtool commands
root@tutorialspots:~/ffmpeg_sources/fdk-aac# make
  CXX      libAACdec/src/FDK_delay.lo
  CXX      libAACdec/src/aac_ram.lo
  CXX      libAACdec/src/aac_rom.lo
  CXX      libAACdec/src/aacdec_drc.lo
  CXX      libAACdec/src/aacdec_hcr.lo
  CXX      libAACdec/src/aacdec_hcr_bit.lo
  CXX      libAACdec/src/aacdec_hcrs.lo
  CXX      libAACdec/src/aacdec_pns.lo
  CXX      libAACdec/src/aacdec_tns.lo
  CXX      libAACdec/src/aacdecoder.lo
  CXX      libAACdec/src/aacdecoder_lib.lo
  CXX      libAACdec/src/block.lo
  CXX      libAACdec/src/channel.lo
  CXX      libAACdec/src/channelinfo.lo
  CXX      libAACdec/src/conceal.lo
  CXX      libAACdec/src/ldfiltbank.lo
  CXX      libAACdec/src/pulsedata.lo
  CXX      libAACdec/src/rvlc.lo
  CXX      libAACdec/src/rvlcbit.lo
  CXX      libAACdec/src/rvlcconceal.lo
  CXX      libAACdec/src/stereo.lo
  CXX      libAACdec/src/usacdec_ace_d4t64.lo
  CXX      libAACdec/src/usacdec_ace_ltp.lo
  CXX      libAACdec/src/usacdec_acelp.lo
  CXX      libAACdec/src/usacdec_fac.lo
  CXX      libAACdec/src/usacdec_lpc.lo
  CXX      libAACdec/src/usacdec_lpd.lo
  CXX      libAACdec/src/usacdec_rom.lo
  CXX      libAACenc/src/aacEnc_ram.lo
  CXX      libAACenc/src/aacEnc_rom.lo
  CXX      libAACenc/src/aacenc.lo
  CXX      libAACenc/src/aacenc_lib.lo
  CXX      libAACenc/src/aacenc_pns.lo
  CXX      libAACenc/src/aacenc_tns.lo
  CXX      libAACenc/src/adj_thr.lo
  CXX      libAACenc/src/band_nrg.lo
  CXX      libAACenc/src/bandwidth.lo
  CXX      libAACenc/src/bit_cnt.lo
  CXX      libAACenc/src/bitenc.lo
  CXX      libAACenc/src/block_switch.lo
  CXX      libAACenc/src/channel_map.lo
  CXX      libAACenc/src/chaosmeasure.lo
  CXX      libAACenc/src/dyn_bits.lo
  CXX      libAACenc/src/grp_data.lo
  CXX      libAACenc/src/intensity.lo
  CXX      libAACenc/src/line_pe.lo
  CXX      libAACenc/src/metadata_compressor.lo
  CXX      libAACenc/src/metadata_main.lo
  CXX      libAACenc/src/mps_main.lo
  CXX      libAACenc/src/ms_stereo.lo
  CXX      libAACenc/src/noisedet.lo
  CXX      libAACenc/src/pnsparam.lo
  CXX      libAACenc/src/pre_echo_control.lo
  CXX      libAACenc/src/psy_configuration.lo
  CXX      libAACenc/src/psy_main.lo
  CXX      libAACenc/src/qc_main.lo
  CXX      libAACenc/src/quantize.lo
  CXX      libAACenc/src/sf_estim.lo
  CXX      libAACenc/src/spreading.lo
  CXX      libAACenc/src/tonality.lo
  CXX      libAACenc/src/transform.lo
  CXX      libArithCoding/src/ac_arith_coder.lo
  CXX      libDRCdec/src/FDK_drcDecLib.lo
  CXX      libDRCdec/src/drcDec_gainDecoder.lo
  CXX      libDRCdec/src/drcDec_reader.lo
  CXX      libDRCdec/src/drcDec_rom.lo
  CXX      libDRCdec/src/drcDec_selectionProcess.lo
  CXX      libDRCdec/src/drcDec_tools.lo
  CXX      libDRCdec/src/drcGainDec_init.lo
  CXX      libDRCdec/src/drcGainDec_preprocess.lo
  CXX      libDRCdec/src/drcGainDec_process.lo
  CXX      libMpegTPDec/src/tpdec_adif.lo
  CXX      libMpegTPDec/src/tpdec_adts.lo
  CXX      libMpegTPDec/src/tpdec_asc.lo
  CXX      libMpegTPDec/src/tpdec_drm.lo
  CXX      libMpegTPDec/src/tpdec_latm.lo
  CXX      libMpegTPDec/src/tpdec_lib.lo
  CXX      libMpegTPEnc/src/tpenc_adif.lo
  CXX      libMpegTPEnc/src/tpenc_adts.lo
  CXX      libMpegTPEnc/src/tpenc_asc.lo
  CXX      libMpegTPEnc/src/tpenc_latm.lo
  CXX      libMpegTPEnc/src/tpenc_lib.lo
  CXX      libSACdec/src/sac_bitdec.lo
  CXX      libSACdec/src/sac_calcM1andM2.lo
  CXX      libSACdec/src/sac_dec.lo
  CXX      libSACdec/src/sac_dec_conceal.lo
  CXX      libSACdec/src/sac_dec_lib.lo
  CXX      libSACdec/src/sac_process.lo
  CXX      libSACdec/src/sac_qmf.lo
  CXX      libSACdec/src/sac_reshapeBBEnv.lo
  CXX      libSACdec/src/sac_rom.lo
  CXX      libSACdec/src/sac_smoothing.lo
  CXX      libSACdec/src/sac_stp.lo
  CXX      libSACdec/src/sac_tsd.lo
  CXX      libSACenc/src/sacenc_bitstream.lo
  CXX      libSACenc/src/sacenc_delay.lo
  CXX      libSACenc/src/sacenc_dmx_tdom_enh.lo
  CXX      libSACenc/src/sacenc_filter.lo
  CXX      libSACenc/src/sacenc_framewindowing.lo
  CXX      libSACenc/src/sacenc_huff_tab.lo
  CXX      libSACenc/src/sacenc_lib.lo
  CXX      libSACenc/src/sacenc_nlc_enc.lo
  CXX      libSACenc/src/sacenc_onsetdetect.lo
  CXX      libSACenc/src/sacenc_paramextract.lo
  CXX      libSACenc/src/sacenc_staticgain.lo
  CXX      libSACenc/src/sacenc_tree.lo
  CXX      libSACenc/src/sacenc_vectorfunctions.lo
  CXX      libSBRdec/src/HFgen_preFlat.lo
  CXX      libSBRdec/src/env_calc.lo
  CXX      libSBRdec/src/env_dec.lo
  CXX      libSBRdec/src/env_extr.lo
  CXX      libSBRdec/src/hbe.lo
  CXX      libSBRdec/src/huff_dec.lo
  CXX      libSBRdec/src/lpp_tran.lo
  CXX      libSBRdec/src/psbitdec.lo
  CXX      libSBRdec/src/psdec.lo
  CXX      libSBRdec/src/psdec_drm.lo
  CXX      libSBRdec/src/psdecrom_drm.lo
  CXX      libSBRdec/src/pvc_dec.lo
  CXX      libSBRdec/src/sbr_deb.lo
  CXX      libSBRdec/src/sbr_dec.lo
  CXX      libSBRdec/src/sbr_ram.lo
  CXX      libSBRdec/src/sbr_rom.lo
  CXX      libSBRdec/src/sbrdec_drc.lo
  CXX      libSBRdec/src/sbrdec_freq_sca.lo
  CXX      libSBRdec/src/sbrdecoder.lo
  CXX      libSBRenc/src/bit_sbr.lo
  CXX      libSBRenc/src/code_env.lo
  CXX      libSBRenc/src/env_bit.lo
  CXX      libSBRenc/src/env_est.lo
  CXX      libSBRenc/src/fram_gen.lo
  CXX      libSBRenc/src/invf_est.lo
  CXX      libSBRenc/src/mh_det.lo
  CXX      libSBRenc/src/nf_est.lo
  CXX      libSBRenc/src/ps_bitenc.lo
  CXX      libSBRenc/src/ps_encode.lo
  CXX      libSBRenc/src/ps_main.lo
  CXX      libSBRenc/src/resampler.lo
  CXX      libSBRenc/src/sbr_encoder.lo
  CXX      libSBRenc/src/sbr_misc.lo
  CXX      libSBRenc/src/sbrenc_freq_sca.lo
  CXX      libSBRenc/src/sbrenc_ram.lo
  CXX      libSBRenc/src/sbrenc_rom.lo
  CXX      libSBRenc/src/ton_corr.lo
  CXX      libSBRenc/src/tran_det.lo
  CXX      libPCMutils/src/limiter.lo
  CXX      libPCMutils/src/pcm_utils.lo
  CXX      libPCMutils/src/pcmdmx_lib.lo
  CXX      libFDK/src/FDK_bitbuffer.lo
  CXX      libFDK/src/FDK_core.lo
  CXX      libFDK/src/FDK_crc.lo
  CXX      libFDK/src/FDK_decorrelate.lo
  CXX      libFDK/src/FDK_hybrid.lo
  CXX      libFDK/src/FDK_lpc.lo
  CXX      libFDK/src/FDK_matrixCalloc.lo
  CXX      libFDK/src/FDK_qmf_domain.lo
  CXX      libFDK/src/FDK_tools_rom.lo
  CXX      libFDK/src/FDK_trigFcts.lo
  CXX      libFDK/src/autocorr2nd.lo
  CXX      libFDK/src/dct.lo
  CXX      libFDK/src/fft.lo
  CXX      libFDK/src/fft_rad2.lo
  CXX      libFDK/src/fixpoint_math.lo
  CXX      libFDK/src/huff_nodes.lo
  CXX      libFDK/src/mdct.lo
  CXX      libFDK/src/nlc_dec.lo
  CXX      libFDK/src/qmf.lo
  CXX      libFDK/src/scale.lo
  CXX      libSYS/src/genericStds.lo
  CXX      libSYS/src/syslib_channelMapDescr.lo
  GEN      libfdk-aac.la
root@tutorialspots:~/ffmpeg_sources/fdk-aac# make install
make[1]: Entering directory '/root/ffmpeg_sources/fdk-aac'
 /usr/bin/mkdir -p '/root/ffmpeg_build/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   libfdk-aac.la '/root/ffmpeg_build/lib'
libtool: install: /usr/bin/install -c .libs/libfdk-aac.lai /root/ffmpeg_build/lib/libfdk-aac.la
libtool: install: /usr/bin/install -c .libs/libfdk-aac.a /root/ffmpeg_build/lib/libfdk-aac.a
libtool: install: chmod 644 /root/ffmpeg_build/lib/libfdk-aac.a
libtool: install: ranlib /root/ffmpeg_build/lib/libfdk-aac.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /root/ffmpeg_build/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /root/ffmpeg_build/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/root/ffmpeg_build/include/fdk-aac'
 /usr/bin/install -c -m 644 ./libSYS/include/machine_type.h ./libSYS/include/genericStds.h ./libSYS/include/FDK_audio.h ./libSYS/include/syslib_channelMapDescr.h ./libAACenc/include/aacenc_lib.h ./libAACdec/include/aacdecoder_lib.h '/root/ffmpeg_build/include/fdk-aac'
 /usr/bin/mkdir -p '/root/ffmpeg_build/lib/pkgconfig'
 /usr/bin/install -c -m 644 fdk-aac.pc '/root/ffmpeg_build/lib/pkgconfig'
make[1]: Leaving directory '/root/ffmpeg_sources/fdk-aac'
root@tutorialspots:~/ffmpeg_sources/fdk-aac#

Or you can use package libfdk-aac-dev

apt install libfdk-aac-dev

Step 8: install libmp3lame

cd ~/ffmpeg_sources
curl -O -L http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
tar xzvf lame-3.100.tar.gz
cd lame-3.100
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm
make
make install

result:

root@tutorialspots:~/ffmpeg_sources/fdk-aac# cd ~/ffmpeg_sources
root@tutorialspots:~/ffmpeg_sources# curl -O -L http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   335  100   335    0     0    537      0 --:--:-- --:--:-- --:--:--   536
100 1488k  100 1488k    0     0   880k      0  0:00:01  0:00:01 --:--:--  496k
root@tutorialspots:~/ffmpeg_sources# tar xzvf lame-3.100.tar.gz
...
root@tutorialspots:~/ffmpeg_sources# cd lame-3.100
root@tutorialspots:~/ffmpeg_sources/lame-3.100# ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking compiler... gcc
checking version of GCC... unknown compiler version pattern
checking dmalloc.h usability... no
checking dmalloc.h presence... no
checking for dmalloc.h... no
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking linux/soundcard.h usability... yes
checking linux/soundcard.h presence... yes
checking for linux/soundcard.h... yes
checking working SSE intrinsics... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of short... 2
checking size of unsigned short... 2
checking size of int... 4
checking size of unsigned int... 4
checking size of long... 8
checking size of unsigned long... 8
checking size of long long... 8
checking size of unsigned long long... 8
checking size of float... 4
checking size of double... 8
checking for long double with more range or precision than double... yes
checking for uint8_t... yes
checking for int8_t... yes
checking for uint16_t... yes
checking for int16_t... yes
checking for uint32_t... yes
checking for int32_t... yes
checking for uint64_t... yes
checking for int64_t... yes
checking for IEEE854 compliant 80 bit floats... no
checking for ieee754_float64_t... no
checking for ieee754_float32_t... no
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for gettimeofday... yes
checking for strtol... yes
checking for socket... yes
checking termcap.h usability... yes
checking termcap.h presence... yes
checking for termcap.h... yes
checking ncurses/termcap.h usability... no
checking ncurses/termcap.h presence... no
checking for ncurses/termcap.h... no
checking for initscr in -ltermcap... no
checking for initscr in -lcurses... yes
checking for initscr in -lncurses... yes
checking for ld used by gcc... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for cos in -lm... yes
checking for cos in -lffm... no
checking for cos in -lcpml... no
checking for gtk-config... no
checking for GTK - version >= 1.2.0... no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
checking use of ElectricFence malloc debugging... no
checking use of file io... lame
checking use of analyzer hooks... yes
checking use of mpg123 decoder... yes (Layer 1, 2, 3)
checking if the lame frontend should be build... yes
checking if mp3x is requested... no
checking if mp3rtp is requested... no
checking if dynamic linking of the frontends is requested... no
checking for termcap... yes
checking if I have to build the internal vector lib... yes
checking for nasm... /usr/bin/nasm
checking for assembler routines for this processor type... no
checking for additional optimizations... no
checking for debug options... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libmp3lame/Makefile
config.status: creating libmp3lame/i386/Makefile
config.status: creating libmp3lame/vector/Makefile
config.status: creating frontend/Makefile
config.status: creating mpglib/Makefile
config.status: creating doc/Makefile
config.status: creating doc/html/Makefile
config.status: creating doc/man/Makefile
config.status: creating include/Makefile
config.status: creating Dll/Makefile
config.status: creating misc/Makefile
config.status: creating dshow/Makefile
config.status: creating ACM/Makefile
config.status: creating ACM/ADbg/Makefile
config.status: creating ACM/ddk/Makefile
config.status: creating ACM/tinyxml/Makefile
config.status: creating lame.spec
config.status: creating mac/Makefile
config.status: creating macosx/Makefile
config.status: creating macosx/English.lproj/Makefile
config.status: creating macosx/LAME.xcodeproj/Makefile
config.status: creating vc_solution/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
root@tutorialspots:~/ffmpeg_sources/lame-3.100# make
...
root@tutorialspots:~/ffmpeg_sources/lame-3.100# make install
Making install in mpglib
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/mpglib'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/mpglib'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/mpglib'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/mpglib'
Making install in libmp3lame
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/libmp3lame'
Making install in i386
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/libmp3lame/i386'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/libmp3lame/i386'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/libmp3lame/i386'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/libmp3lame/i386'
Making install in vector
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/libmp3lame/vector'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/libmp3lame/vector'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/libmp3lame/vector'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/libmp3lame/vector'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/libmp3lame'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/libmp3lame'
 /usr/bin/mkdir -p '/root/ffmpeg_build/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libmp3lame.la '/root/ffmpeg_build/lib'
libtool: install: /usr/bin/install -c .libs/libmp3lame.lai /root/ffmpeg_build/lib/libmp3lame.la
libtool: install: /usr/bin/install -c .libs/libmp3lame.a /root/ffmpeg_build/lib/libmp3lame.a
libtool: install: chmod 644 /root/ffmpeg_build/lib/libmp3lame.a
libtool: install: ranlib /root/ffmpeg_build/lib/libmp3lame.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /root/ffmpeg_build/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /root/ffmpeg_build/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/libmp3lame'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/libmp3lame'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/libmp3lame'
Making install in frontend
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/frontend'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/frontend'
 /usr/bin/mkdir -p '/root/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c lame '/root/bin'
libtool: install: /usr/bin/install -c lame /root/bin/lame
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/frontend'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/frontend'
Making install in Dll
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/Dll'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/Dll'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/Dll'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/Dll'
Making install in doc
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/doc'
Making install in html
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/doc/html'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/doc/html'
make[3]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/root/ffmpeg_build/share/doc/lame/html'
 /usr/bin/install -c -m 644 about.html abr.html cbr.html contact.html contributors.html detailed.html history.html index.html introduction.html links.html list.html ms_stereo.html usage.html vbr.html '/root/ffmpeg_build/share/doc/lame/html'
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/doc/html'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/doc/html'
Making install in man
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/doc/man'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/doc/man'
make[3]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/root/ffmpeg_build/share/man/man1'
 /usr/bin/install -c -m 644 lame.1 '/root/ffmpeg_build/share/man/man1'
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/doc/man'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/doc/man'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/doc'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/doc'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/doc'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/doc'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/doc'
Making install in include
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/include'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/include'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/root/ffmpeg_build/include/lame'
 /usr/bin/install -c -m 644 lame.h '/root/ffmpeg_build/include/lame'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/include'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/include'
Making install in misc
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/misc'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/misc'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/misc'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/misc'
Making install in dshow
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/dshow'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/dshow'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/dshow'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/dshow'
Making install in ACM
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/ACM'
Making install in ADbg
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/ACM/ADbg'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/ACM/ADbg'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/ACM/ADbg'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/ACM/ADbg'
Making install in ddk
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/ACM/ddk'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/ACM/ddk'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/ACM/ddk'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/ACM/ddk'
Making install in tinyxml
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/ACM/tinyxml'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/ACM/tinyxml'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/ACM/tinyxml'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/ACM/tinyxml'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/ACM'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/ACM'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/ACM'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/ACM'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/ACM'
Making install in mac
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/mac'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/mac'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/mac'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/mac'
Making install in macosx
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/macosx'
Making install in English.lproj
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/macosx/English.lproj'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/macosx/English.lproj'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/macosx/English.lproj'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/macosx/English.lproj'
Making install in LAME.xcodeproj
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/macosx/LAME.xcodeproj'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/macosx/LAME.xcodeproj'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/macosx/LAME.xcodeproj'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/macosx/LAME.xcodeproj'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/macosx'
make[3]: Entering directory '/root/ffmpeg_sources/lame-3.100/macosx'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/lame-3.100/macosx'
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/macosx'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/macosx'
Making install in vc_solution
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100/vc_solution'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100/vc_solution'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100/vc_solution'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100/vc_solution'
make[1]: Entering directory '/root/ffmpeg_sources/lame-3.100'
make[2]: Entering directory '/root/ffmpeg_sources/lame-3.100'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/ffmpeg_sources/lame-3.100'
make[1]: Leaving directory '/root/ffmpeg_sources/lame-3.100'
root@tutorialspots:~/ffmpeg_sources/lame-3.100# 

Or you can use package libmp3lame-dev

apt install libmp3lame-dev

Step 9: install libopus

cd ~/ffmpeg_sources
curl -O -L https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz
tar xzvf opus-1.2.1.tar.gz
cd opus-1.2.1
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install

result:

root@tutorialspots:~/ffmpeg_sources/lame-3.100# cd ~/ffmpeg_sources
root@tutorialspots:~/ffmpeg_sources# curl -O -L https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  987k  100  987k    0     0   686k      0  0:00:01  0:00:01 --:--:--  686k
root@tutorialspots:~/ffmpeg_sources# tar xzvf opus-1.2.1.tar.gz
...
root@tutorialspots:~/ffmpeg_sources# cd opus-1.2.1
root@tutorialspots:~/ffmpeg_sources/opus-1.2.1# ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gcc option to accept ISO C99... none needed
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking dependency style of gcc... gcc3
checking for C/C++ restrict keyword... __restrict
checking for C99 variable-size arrays... yes
checking for cos in -lm... yes
checking if compiler supports SSE intrinsics... yes
checking if compiler supports SSE2 intrinsics... yes
checking if compiler supports SSE4.1 intrinsics... no
checking if compiler supports SSE4.1 intrinsics with -msse4.1... yes
checking if compiler supports AVX intrinsics... no
checking if compiler supports AVX intrinsics with -mavx... yes
checking How to get X86 CPU Info... Inline Assembly
checking for doxygen... no
checking for dot... no
checking if gcc supports -fvisibility=hidden... yes
checking if gcc supports -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes... yes
checking for lrintf... yes
checking for lrint... yes
checking for __malloc_hook... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating opus.pc
config.status: creating opus-uninstalled.pc
config.status: creating celt/arm/armopts.s
config.status: creating doc/Makefile
config.status: creating doc/Doxyfile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure:
------------------------------------------------------------------------
  opus 1.2.1:  Automatic configuration OK.

    Compiler support:

      C99 var arrays: ................ yes
      C99 lrintf: .................... yes
      Use alloca: .................... no (using var arrays)

    General configuration:

      Floating point support: ........ yes
      Fast float approximations: ..... no
      Fixed point debugging: ......... no
      Inline Assembly Optimizations: . No inline ASM for your platform, please send patches
      External Assembly Optimizations:
      Intrinsics Optimizations.......: x86 SSE SSE2 SSE4.1 AVX
      Run-time CPU detection: ........ x86 SSE4.1 AVX
      Custom modes: .................. no
      Assertion checking: ............ no
      Fuzzing: ....................... no
      Check ASM: ..................... no
      Ambisonics support: ............ no

      API documentation: ............. yes
      Extra programs: ................ yes
------------------------------------------------------------------------

 Type "make; make install" to compile and install
 Type "make check" to run the test suite

root@tutorialspots:~/ffmpeg_sources/opus-1.2.1# make
make  all-recursive
make[1]: Entering directory '/root/ffmpeg_sources/opus-1.2.1'
make[2]: Entering directory '/root/ffmpeg_sources/opus-1.2.1'
  CC       celt/bands.lo
  CC       celt/celt.lo
  CC       celt/celt_encoder.lo
  CC       celt/celt_decoder.lo
  CC       celt/cwrs.lo
  CC       celt/entcode.lo
  CC       celt/entdec.lo
  CC       celt/entenc.lo
  CC       celt/kiss_fft.lo
  CC       celt/laplace.lo
  CC       celt/mathops.lo
  CC       celt/mdct.lo
  CC       celt/modes.lo
  CC       celt/pitch.lo
  CC       celt/celt_lpc.lo
  CC       celt/quant_bands.lo
  CC       celt/rate.lo
  CC       celt/vq.lo
  CC       celt/x86/x86cpu.lo
  CC       celt/x86/x86_celt_map.lo
  CC       celt/x86/pitch_sse.lo
  CC       celt/x86/pitch_sse2.lo
  CC       celt/x86/vq_sse2.lo
  CC       celt/x86/celt_lpc_sse.lo
  CC       celt/x86/pitch_sse4_1.lo
  CC       silk/CNG.lo
  CC       silk/code_signs.lo
  CC       silk/init_decoder.lo
  CC       silk/decode_core.lo
  CC       silk/decode_frame.lo
  CC       silk/decode_parameters.lo
  CC       silk/decode_indices.lo
  CC       silk/decode_pulses.lo
  CC       silk/decoder_set_fs.lo
  CC       silk/dec_API.lo
  CC       silk/enc_API.lo
  CC       silk/encode_indices.lo
  CC       silk/encode_pulses.lo
  CC       silk/gain_quant.lo
  CC       silk/interpolate.lo
  CC       silk/LP_variable_cutoff.lo
  CC       silk/NLSF_decode.lo
  CC       silk/NSQ.lo
  CC       silk/NSQ_del_dec.lo
  CC       silk/PLC.lo
  CC       silk/shell_coder.lo
  CC       silk/tables_gain.lo
  CC       silk/tables_LTP.lo
  CC       silk/tables_NLSF_CB_NB_MB.lo
  CC       silk/tables_NLSF_CB_WB.lo
  CC       silk/tables_other.lo
  CC       silk/tables_pitch_lag.lo
  CC       silk/tables_pulses_per_block.lo
  CC       silk/VAD.lo
  CC       silk/control_audio_bandwidth.lo
  CC       silk/quant_LTP_gains.lo
  CC       silk/VQ_WMat_EC.lo
  CC       silk/HP_variable_cutoff.lo
  CC       silk/NLSF_encode.lo
  CC       silk/NLSF_VQ.lo
  CC       silk/NLSF_unpack.lo
  CC       silk/NLSF_del_dec_quant.lo
  CC       silk/process_NLSFs.lo
  CC       silk/stereo_LR_to_MS.lo
  CC       silk/stereo_MS_to_LR.lo
  CC       silk/check_control_input.lo
  CC       silk/control_SNR.lo
  CC       silk/init_encoder.lo
  CC       silk/control_codec.lo
  CC       silk/A2NLSF.lo
  CC       silk/ana_filt_bank_1.lo
  CC       silk/biquad_alt.lo
  CC       silk/bwexpander_32.lo
  CC       silk/bwexpander.lo
  CC       silk/debug.lo
  CC       silk/decode_pitch.lo
  CC       silk/inner_prod_aligned.lo
  CC       silk/lin2log.lo
  CC       silk/log2lin.lo
  CC       silk/LPC_analysis_filter.lo
  CC       silk/LPC_inv_pred_gain.lo
  CC       silk/table_LSF_cos.lo
  CC       silk/NLSF2A.lo
  CC       silk/NLSF_stabilize.lo
  CC       silk/NLSF_VQ_weights_laroia.lo
  CC       silk/pitch_est_tables.lo
  CC       silk/resampler.lo
  CC       silk/resampler_down2_3.lo
  CC       silk/resampler_down2.lo
  CC       silk/resampler_private_AR2.lo
  CC       silk/resampler_private_down_FIR.lo
  CC       silk/resampler_private_IIR_FIR.lo
  CC       silk/resampler_private_up2_HQ.lo
  CC       silk/resampler_rom.lo
  CC       silk/sigm_Q15.lo
  CC       silk/sort.lo
  CC       silk/sum_sqr_shift.lo
  CC       silk/stereo_decode_pred.lo
  CC       silk/stereo_encode_pred.lo
  CC       silk/stereo_find_predictor.lo
  CC       silk/stereo_quant_pred.lo
  CC       silk/LPC_fit.lo
  CC       silk/float/apply_sine_window_FLP.lo
  CC       silk/float/corrMatrix_FLP.lo
  CC       silk/float/encode_frame_FLP.lo
  CC       silk/float/find_LPC_FLP.lo
  CC       silk/float/find_LTP_FLP.lo
  CC       silk/float/find_pitch_lags_FLP.lo
  CC       silk/float/find_pred_coefs_FLP.lo
  CC       silk/float/LPC_analysis_filter_FLP.lo
  CC       silk/float/LTP_analysis_filter_FLP.lo
  CC       silk/float/LTP_scale_ctrl_FLP.lo
  CC       silk/float/noise_shape_analysis_FLP.lo
  CC       silk/float/process_gains_FLP.lo
  CC       silk/float/regularize_correlations_FLP.lo
  CC       silk/float/residual_energy_FLP.lo
  CC       silk/float/warped_autocorrelation_FLP.lo
  CC       silk/float/wrappers_FLP.lo
  CC       silk/float/autocorrelation_FLP.lo
  CC       silk/float/burg_modified_FLP.lo
  CC       silk/float/bwexpander_FLP.lo
  CC       silk/float/energy_FLP.lo
  CC       silk/float/inner_product_FLP.lo
  CC       silk/float/k2a_FLP.lo
  CC       silk/float/LPC_inv_pred_gain_FLP.lo
  CC       silk/float/pitch_analysis_core_FLP.lo
  CC       silk/float/scale_copy_vector_FLP.lo
  CC       silk/float/scale_vector_FLP.lo
  CC       silk/float/schur_FLP.lo
  CC       silk/float/sort_FLP.lo
  CC       silk/x86/NSQ_sse.lo
  CC       silk/x86/NSQ_del_dec_sse.lo
  CC       silk/x86/x86_silk_map.lo
  CC       silk/x86/VAD_sse.lo
  CC       silk/x86/VQ_WMat_EC_sse.lo
  CC       src/opus.lo
  CC       src/opus_decoder.lo
  CC       src/opus_encoder.lo
  CC       src/opus_multistream.lo
  CC       src/opus_multistream_encoder.lo
  CC       src/opus_multistream_decoder.lo
  CC       src/repacketizer.lo
  CC       src/analysis.lo
  CC       src/mlp.lo
  CC       src/mlp_data.lo
  CCLD     libopus.la
ar: `u' modifier ignored since `D' is the default (see `U')
  CC       celt/tests/test_unit_cwrs32.o
  CCLD     celt/tests/test_unit_cwrs32
  CC       celt/tests/test_unit_dft.o
  CCLD     celt/tests/test_unit_dft
  CC       celt/tests/test_unit_entropy.o
  CCLD     celt/tests/test_unit_entropy
  CC       celt/tests/test_unit_laplace.o
  CCLD     celt/tests/test_unit_laplace
  CC       celt/tests/test_unit_mathops.o
  CCLD     celt/tests/test_unit_mathops
  CC       celt/tests/test_unit_mdct.o
  CCLD     celt/tests/test_unit_mdct
  CC       celt/tests/test_unit_rotation.o
  CCLD     celt/tests/test_unit_rotation
  CC       celt/tests/test_unit_types.o
  CCLD     celt/tests/test_unit_types
  CC       src/opus_compare.o
  CCLD     opus_compare
  CC       src/opus_demo.o
  CCLD     opus_demo
  CC       src/repacketizer_demo.o
  CCLD     repacketizer_demo
  CC       silk/tests/test_unit_LPC_inv_pred_gain.o
  CCLD     silk/tests/test_unit_LPC_inv_pred_gain
  CC       tests/test_opus_api.o
  CCLD     tests/test_opus_api
  CC       tests/test_opus_decode.o
  CCLD     tests/test_opus_decode
  CC       tests/test_opus_encode.o
  CC       tests/opus_encode_regressions.o
  CCLD     tests/test_opus_encode
  CC       tests/test_opus_padding.o
  CCLD     tests/test_opus_padding
make[3]: Entering directory '/root/ffmpeg_sources/opus-1.2.1/doc'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/ffmpeg_sources/opus-1.2.1/doc'
make[2]: Leaving directory '/root/ffmpeg_sources/opus-1.2.1'
make[1]: Leaving directory '/root/ffmpeg_sources/opus-1.2.1'
root@tutorialspots:~/ffmpeg_sources/opus-1.2.1# make install
make  install-recursive
make[1]: Entering directory '/root/ffmpeg_sources/opus-1.2.1'
make[2]: Entering directory '/root/ffmpeg_sources/opus-1.2.1'
make[3]: Entering directory '/root/ffmpeg_sources/opus-1.2.1/doc'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/ffmpeg_sources/opus-1.2.1/doc'
make[3]: Entering directory '/root/ffmpeg_sources/opus-1.2.1'
 /usr/bin/mkdir -p '/root/ffmpeg_build/lib'
 /bin/bash ./libtool   --mode=install /usr/bin/install -c   libopus.la '/root/ffmpeg_build/lib'
libtool: install: /usr/bin/install -c .libs/libopus.lai /root/ffmpeg_build/lib/libopus.la
libtool: install: /usr/bin/install -c .libs/libopus.a /root/ffmpeg_build/lib/libopus.a
libtool: install: chmod 644 /root/ffmpeg_build/lib/libopus.a
libtool: install: ranlib /root/ffmpeg_build/lib/libopus.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /root/ffmpeg_build/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /root/ffmpeg_build/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[4]: Entering directory '/root/ffmpeg_sources/opus-1.2.1/doc'
make[5]: Entering directory '/root/ffmpeg_sources/opus-1.2.1/doc'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '/root/ffmpeg_sources/opus-1.2.1/doc'
make[4]: Leaving directory '/root/ffmpeg_sources/opus-1.2.1/doc'
 /usr/bin/mkdir -p '/root/ffmpeg_build/share/aclocal'
 /usr/bin/install -c -m 644 opus.m4 '/root/ffmpeg_build/share/aclocal'
 /usr/bin/mkdir -p '/root/ffmpeg_build/lib/pkgconfig'
 /usr/bin/install -c -m 644 opus.pc '/root/ffmpeg_build/lib/pkgconfig'
 /usr/bin/mkdir -p '/root/ffmpeg_build/include/opus'
 /usr/bin/install -c -m 644 include/opus.h include/opus_multistream.h include/opus_types.h include/opus_defines.h '/root/ffmpeg_build/include/opus'
make[3]: Leaving directory '/root/ffmpeg_sources/opus-1.2.1'
make[2]: Leaving directory '/root/ffmpeg_sources/opus-1.2.1'
make[1]: Leaving directory '/root/ffmpeg_sources/opus-1.2.1'
root@tutorialspots:~/ffmpeg_sources/opus-1.2.1#

Or you can use package libopus-dev

apt install libopus-dev

Step 10: install libogg

cd ~/ffmpeg_sources
curl -O -L http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz
tar xzvf libogg-1.3.3.tar.gz
cd libogg-1.3.3
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install

result:

root@tutorialspots:~/ffmpeg_sources/opus-1.2.1# cd ~/ffmpeg_sources
root@tutorialspots:~/ffmpeg_sources# curl -O -L http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   161  100   161    0     0     45      0  0:00:03  0:00:03 --:--:--    45
100  566k  100  566k    0     0  79726      0  0:00:07  0:00:07 --:--:--  183k
root@tutorialspots:~/ffmpeg_sources# tar xzvf libogg-1.3.3.tar.gz
...
root@ns5008133:~/ffmpeg_sources# cd libogg-1.3.3
root@ns5008133:~/ffmpeg_sources/libogg-1.3.3# ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for ANSI C header files... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking size of int16_t... 2
checking size of uint16_t... 2
checking size of u_int16_t... 2
checking size of int32_t... 4
checking size of uint32_t... 4
checking size of u_int32_t... 4
checking size of int64_t... 8
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking for working memcmp... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating doc/libogg/Makefile
config.status: creating include/Makefile
config.status: creating include/ogg/Makefile
config.status: creating include/ogg/config_types.h
config.status: creating libogg.spec
config.status: creating ogg.pc
config.status: creating ogg-uninstalled.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
root@tutorialspots:~/ffmpeg_sources/libogg-1.3.3# make
make  all-recursive
make[1]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3'
Making all in src
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/src'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../include   -O20 -Wall -ffast-math -fsigned-char -g -O2 -MT framing.lo -MD -MP -MF .deps/framing.Tpo -c -o framing.lo framing.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O20 -Wall -ffast-math -fsigned-char -g -O2 -MT framing.lo -MD -MP -MF .deps/framing.Tpo -c framing.c -o framing.o
mv -f .deps/framing.Tpo .deps/framing.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../include   -O20 -Wall -ffast-math -fsigned-char -g -O2 -MT bitwise.lo -MD -MP -MF .deps/bitwise.Tpo -c -o bitwise.lo bitwise.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -O20 -Wall -ffast-math -fsigned-char -g -O2 -MT bitwise.lo -MD -MP -MF .deps/bitwise.Tpo -c bitwise.c -o bitwise.o
mv -f .deps/bitwise.Tpo .deps/bitwise.Plo
/bin/bash ../libtool  --tag=CC   --mode=link gcc  -O20 -Wall -ffast-math -fsigned-char -g -O2 -no-undefined -version-info 8:3:8  -o libogg.la -rpath /root/ffmpeg_build/lib framing.lo bitwise.lo
libtool: link: ar cru .libs/libogg.a  framing.o bitwise.o
ar: `u' modifier ignored since `D' is the default (see `U')
libtool: link: ranlib .libs/libogg.a
libtool: link: ( cd ".libs" && rm -f "libogg.la" && ln -s "../libogg.la" "libogg.la" )
gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../include  -D_V_SELFTEST -O20 -Wall -ffast-math -fsigned-char -g -O2 -MT test_bitwise-bitwise.o -MD -MP -MF .deps/test_bitwise-bitwise.Tpo -c -o test_bitwise-bitwise.o `test -f 'bitwise.c' || echo './'`bitwise.c
mv -f .deps/test_bitwise-bitwise.Tpo .deps/test_bitwise-bitwise.Po
/bin/bash ../libtool  --tag=CC   --mode=link gcc -D_V_SELFTEST -O20 -Wall -ffast-math -fsigned-char -g -O2   -o test_bitwise test_bitwise-bitwise.o
libtool: link: gcc -D_V_SELFTEST -O20 -Wall -ffast-math -fsigned-char -g -O2 -o test_bitwise test_bitwise-bitwise.o
gcc -DHAVE_CONFIG_H -I. -I..  -I../include -I../include  -D_V_SELFTEST -O20 -Wall -ffast-math -fsigned-char -g -O2 -MT test_framing-framing.o -MD -MP -MF .deps/test_framing-framing.Tpo -c -o test_framing-framing.o `test -f 'framing.c' || echo './'`framing.c
mv -f .deps/test_framing-framing.Tpo .deps/test_framing-framing.Po
/bin/bash ../libtool  --tag=CC   --mode=link gcc -D_V_SELFTEST -O20 -Wall -ffast-math -fsigned-char -g -O2   -o test_framing test_framing-framing.o
libtool: link: gcc -D_V_SELFTEST -O20 -Wall -ffast-math -fsigned-char -g -O2 -o test_framing test_framing-framing.o
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/src'
Making all in include
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/include'
Making all in ogg
make[3]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/include/ogg'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/include/ogg'
make[3]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/include'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/include'
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/include'
Making all in doc
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
Making all in libogg
make[3]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/doc/libogg'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/doc/libogg'
make[3]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3'
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3'
make[1]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3'
root@tutorialspots:~/ffmpeg_sources/libogg-1.3.3# make install
Making install in src
make[1]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/src'
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/src'
 /usr/bin/mkdir -p '/root/ffmpeg_build/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libogg.la '/root/ffmpeg_build/lib'
libtool: install: /usr/bin/install -c .libs/libogg.lai /root/ffmpeg_build/lib/libogg.la
libtool: install: /usr/bin/install -c .libs/libogg.a /root/ffmpeg_build/lib/libogg.a
libtool: install: chmod 644 /root/ffmpeg_build/lib/libogg.a
libtool: install: ranlib /root/ffmpeg_build/lib/libogg.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /root/ffmpeg_build/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /root/ffmpeg_build/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/src'
make[1]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/src'
Making install in include
make[1]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/include'
Making install in ogg
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/include/ogg'
make[3]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/include/ogg'
make[3]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/root/ffmpeg_build/include/ogg'
 /usr/bin/install -c -m 644 config_types.h '/root/ffmpeg_build/include/ogg'
 /usr/bin/mkdir -p '/root/ffmpeg_build/include/ogg'
 /usr/bin/install -c -m 644 ogg.h os_types.h '/root/ffmpeg_build/include/ogg'
make[3]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/include/ogg'
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/include/ogg'
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/include'
make[3]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/include'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/include'
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/include'
make[1]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/include'
Making install in doc
make[1]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
Making install in libogg
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/doc/libogg'
make[3]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/doc/libogg'
make[3]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/root/ffmpeg_build/share/doc/libogg/libogg'
 /usr/bin/install -c -m 644 bitpacking.html datastructures.html decoding.html encoding.html general.html index.html ogg_iovec_t.html ogg_packet.html ogg_packet_clear.html ogg_page.html ogg_page_bos.html ogg_page_checksum_set.html ogg_page_continued.html ogg_page_eos.html ogg_page_granulepos.html ogg_page_packets.html ogg_page_pageno.html ogg_page_serialno.html ogg_page_version.html ogg_stream_check.html ogg_stream_clear.html ogg_stream_destroy.html ogg_stream_eos.html ogg_stream_flush.html ogg_stream_flush_fill.html ogg_stream_init.html ogg_stream_iovecin.html ogg_stream_packetin.html ogg_stream_packetout.html ogg_stream_packetpeek.html ogg_stream_pagein.html ogg_stream_pageout.html ogg_stream_pageout_fill.html ogg_stream_reset.html ogg_stream_reset_serialno.html ogg_stream_state.html ogg_sync_buffer.html ogg_sync_check.html ogg_sync_clear.html ogg_sync_destroy.html '/root/ffmpeg_build/share/doc/libogg/libogg'
 /usr/bin/install -c -m 644 ogg_sync_init.html ogg_sync_pageout.html ogg_sync_pageseek.html ogg_sync_reset.html ogg_sync_state.html ogg_sync_wrote.html oggpack_adv.html oggpack_adv1.html oggpack_bits.html oggpack_buffer.html oggpack_bytes.html oggpack_get_buffer.html oggpack_look.html oggpack_look1.html oggpack_read.html oggpack_read1.html oggpack_readinit.html oggpack_reset.html oggpack_write.html oggpack_writealign.html oggpack_writecheck.html oggpack_writeclear.html oggpack_writecopy.html oggpack_writeinit.html oggpack_writetrunc.html overview.html reference.html style.css '/root/ffmpeg_build/share/doc/libogg/libogg'
make[3]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/doc/libogg'
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/doc/libogg'
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
make[3]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
make[3]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/root/ffmpeg_build/share/doc/libogg'
 /usr/bin/install -c -m 644 framing.html index.html oggstream.html ogg-multiplex.html fish_xiph_org.png multiplex1.png packets.png pages.png stream.png vorbisword2.png white-ogg.png white-xifish.png rfc3533.txt rfc5334.txt skeleton.html '/root/ffmpeg_build/share/doc/libogg'
make[3]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
make[1]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3/doc'
make[1]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3'
make[2]: Entering directory '/root/ffmpeg_sources/libogg-1.3.3'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/root/ffmpeg_build/share/aclocal'
 /usr/bin/install -c -m 644 ogg.m4 '/root/ffmpeg_build/share/aclocal'
 /usr/bin/mkdir -p '/root/ffmpeg_build/lib/pkgconfig'
 /usr/bin/install -c -m 644 ogg.pc '/root/ffmpeg_build/lib/pkgconfig'
make[2]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3'
make[1]: Leaving directory '/root/ffmpeg_sources/libogg-1.3.3'
root@tutorialspots:~/ffmpeg_sources/libogg-1.3.3#

Or you can use package libogg-dev

apt install libogg-dev

Read part 2: How to compile FFmpeg on Ubuntu 20.04 – part 2

Leave a Reply