Search code examples
c++ccmakeraspberry-piamazon-kinesis-video-streams

Challenges with Building Amazon Kinesis Video Streams Producer SDK (C and C++) on Raspberry Pi


Introduction:

I am currently facing challenges in building both the C and C++ versions of the Amazon Kinesis Video Streams Producer SDK on my Raspberry Pi. This problem persists despite my attempts with both 32-bit and 64-bit versions of the Raspberry Pi OS. Below are the specific SDK repositories I have been working with:

Environment:

  • Device: Raspberry Pi 4
  • OS: Raspberry Pi OS (Debian Bookworm), both 32-bit and 64-bit
  • Architecture: ARMv8 (64-bit)
  • CPU: Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
  • SDKs: Amazon Kinesis Video Streams Producer SDK (C and C++)

Steps and Commands Used:

  1. Updated the system with sudo apt-get update and sudo apt-get upgrade.
  2. Installed build tools and libraries (build-essential, autoconf, automake, libtool, etc.).
  3. Executed cmake with various options, including -DBUILD_GSTREAMER_PLUGIN=ON. This process was successfully completed for both SDKs.
  4. Faced errors during the make command, regardless of the SDK (C or C++) and the OS version (32-bit or 64-bit).

Problem:

I am unable to complete the build process during the make command for both C and C++ SDKs on both OS versions, even though the cmake setup finished successfully.

Attempted Solutions:

  • Ensured installation of all necessary dependencies.
  • Attempted building on both 32-bit and 64-bit versions of the OS.
  • Conducted thorough searches for similar issues but did not find any matching scenarios.

Seeking Help For:

  • Advice on how to build and install the C and C++ SDKs on a Raspberry Pi 4.
  • Solutions to address the make command errors encountered with both versions of the SDKs and OS.

Question:

Has anyone successfully built and installed the Amazon Kinesis Video Streams Producer SDK (both C and C++ versions) on a Raspberry Pi 4? I'm looking for insights or guidance, especially considering the challenges faced with both 32-bit and 64-bit versions of Raspberry Pi OS.

Error:

crypto/aes/vpaes-armv8.S:1191: Error: bad instruction `ldp d10,d11,[sp],#16'
crypto/aes/vpaes-armv8.S:1192: Error: bad instruction `ldp d8,d9,[sp],#16'
crypto/aes/vpaes-armv8.S:1193: Error: bad instruction `ldp x29,x30,[sp],#16'
crypto/aes/vpaes-armv8.S:1195: Error: bad instruction `ret'
make[4]: *** [Makefile:833: crypto/aes/vpaes-armv8.o] Error 1
make[3]: *** [Makefile:174: all] Error 2
gmake[2]: *** [CMakeFiles/project_libopenssl.dir/build.make:87: build/src/project_libopenssl-stamp/project_libopenssl-build] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/project_libopenssl.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
CMake Error at CMake/Utilities.cmake:75 (message):
  CMake step for libopenssl failed: 2
Call Stack (most recent call first):
  CMakeLists.txt:142 (build_dependency)

~/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeOutput.log:

The system is: Linux - 6.1.0-rpi4-rpi-v8 - aarch64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc 
Build flags: 
Id flags:  

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/3.25.1/CompilerIdC/a.out"

Detecting C compiler ABI info compiled with the following output:
Change Dir: /home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-nsRQVz

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_fee2c/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_fee2c.dir/build.make CMakeFiles/cmTC_fee2c.dir/build
gmake[1]: Entering directory '/home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-nsRQVz'
Building C object CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o
/usr/bin/cc   -v -o CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.25/Modules/CMakeCCompilerABI.c
Using built-in specs.
COLLECT_GCC=/usr/bin/cc
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 12.2.0-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6+fp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Raspbian 12.2.0-14+rpi1) 
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o' '-c'  '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-mlibarch=armv6+fp' '-march=armv6+fp' '-dumpdir' 'CMakeFiles/cmTC_fee2c.dir/'
 /usr/lib/gcc/arm-linux-gnueabihf/12/cc1 -quiet -v -imultilib . -imultiarch arm-linux-gnueabihf /usr/share/cmake-3.25/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_fee2c.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mfloat-abi=hard -mtls-dialect=gnu -marm -mlibarch=armv6+fp -march=armv6+fp -version -o /tmp/ccApXSO4.s
GNU C17 (Raspbian 12.2.0-14+rpi1) version 12.2.0 (arm-linux-gnueabihf)
    compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version 4.1.1-p1, MPC version 1.3.1, isl version isl-0.25-GMP

warning: MPFR header version 4.1.1-p1 differs from library version 4.2.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/arm-linux-gnueabihf"
ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnueabihf/12/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/arm-linux-gnueabihf/12/include
 /usr/local/include
 /usr/include/arm-linux-gnueabihf
 /usr/include
End of search list.
GNU C17 (Raspbian 12.2.0-14+rpi1) version 12.2.0 (arm-linux-gnueabihf)
    compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version 4.1.1-p1, MPC version 1.3.1, isl version isl-0.25-GMP

warning: MPFR header version 4.1.1-p1 differs from library version 4.2.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: aa6629b5f44fe3420ba005fbae7bc0e6
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o' '-c'  '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-mlibarch=armv6+fp' '-march=armv6+fp' '-dumpdir' 'CMakeFiles/cmTC_fee2c.dir/'
 as -v -march=armv6+fp -mfloat-abi=hard -meabi=5 -o CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o /tmp/ccApXSO4.s
GNU assembler version 2.40 (arm-linux-gnueabihf) using BFD version (GNU Binutils for Raspbian) 2.40
COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/
LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/12/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o' '-c'  '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-mlibarch=armv6+fp' '-march=armv6+fp' '-dumpdir' 'CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.'
Linking C executable cmTC_fee2c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fee2c.dir/link.txt --verbose=1
/usr/bin/cc  -v CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o -o cmTC_fee2c 
Using built-in specs.
COLLECT_GCC=/usr/bin/cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/12/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 12.2.0-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6+fp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Raspbian 12.2.0-14+rpi1) 
COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/
LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/12/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_fee2c'  '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-mlibarch=armv6+fp' '-march=armv6+fp' '-dumpdir' 'cmTC_fee2c.'
 /usr/lib/gcc/arm-linux-gnueabihf/12/collect2 -plugin /usr/lib/gcc/arm-linux-gnueabihf/12/liblto_plugin.so -plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/12/lto-wrapper -plugin-opt=-fresolution=/tmp/ccgqbeWe.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=gnu --as-needed -m armelf_linux_eabi -o cmTC_fee2c /usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/12/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/12 -L/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/12/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/arm-linux-gnueabihf/12/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crtn.o
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_fee2c'  '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-mlibarch=armv6+fp' '-march=armv6+fp' '-dumpdir' 'cmTC_fee2c.'
gmake[1]: Leaving directory '/home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-nsRQVz'



Parsed C implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/usr/lib/gcc/arm-linux-gnueabihf/12/include]
    add: [/usr/local/include]
    add: [/usr/include/arm-linux-gnueabihf]
    add: [/usr/include]
  end of search list found
  collapse include dir [/usr/lib/gcc/arm-linux-gnueabihf/12/include] ==> [/usr/lib/gcc/arm-linux-gnueabihf/12/include]
  collapse include dir [/usr/local/include] ==> [/usr/local/include]
  collapse include dir [/usr/include/arm-linux-gnueabihf] ==> [/usr/include/arm-linux-gnueabihf]
  collapse include dir [/usr/include] ==> [/usr/include]
  implicit include dirs: [/usr/lib/gcc/arm-linux-gnueabihf/12/include;/usr/local/include;/usr/include/arm-linux-gnueabihf;/usr/include]


Parsed C implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-nsRQVz]
  ignore line: []
  ignore line: [Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_fee2c/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_fee2c.dir/build.make CMakeFiles/cmTC_fee2c.dir/build]
  ignore line: [gmake[1]: Entering directory '/home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-nsRQVz']
  ignore line: [Building C object CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o]
  ignore line: [/usr/bin/cc   -v -o CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.25/Modules/CMakeCCompilerABI.c]
  ignore line: [Using built-in specs.]
  ignore line: [COLLECT_GCC=/usr/bin/cc]
  ignore line: [Target: arm-linux-gnueabihf]
  ignore line: [Configured with: ../src/configure -v --with-pkgversion='Raspbian 12.2.0-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c ada c++ go d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6+fp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf]
  ignore line: [Thread model: posix]
  ignore line: [Supported LTO compression algorithms: zlib zstd]
  ignore line: [gcc version 12.2.0 (Raspbian 12.2.0-14+rpi1) ]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o' '-c'  '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-mlibarch=armv6+fp' '-march=armv6+fp' '-dumpdir' 'CMakeFiles/cmTC_fee2c.dir/']
  ignore line: [ /usr/lib/gcc/arm-linux-gnueabihf/12/cc1 -quiet -v -imultilib . -imultiarch arm-linux-gnueabihf /usr/share/cmake-3.25/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_fee2c.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mfloat-abi=hard -mtls-dialect=gnu -marm -mlibarch=armv6+fp -march=armv6+fp -version -o /tmp/ccApXSO4.s]
  ignore line: [GNU C17 (Raspbian 12.2.0-14+rpi1) version 12.2.0 (arm-linux-gnueabihf)]
  ignore line: [    compiled by GNU C version 12.2.0  GMP version 6.2.1  MPFR version 4.1.1-p1  MPC version 1.3.1  isl version isl-0.25-GMP]
  ignore line: []
  ignore line: [warning: MPFR header version 4.1.1-p1 differs from library version 4.2.0.]
  ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
  ignore line: [ignoring nonexistent directory "/usr/local/include/arm-linux-gnueabihf"]
  ignore line: [ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnueabihf/12/include-fixed"]
  ignore line: [ignoring nonexistent directory "/usr/lib/gcc/arm-linux-gnueabihf/12/../../../../arm-linux-gnueabihf/include"]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /usr/lib/gcc/arm-linux-gnueabihf/12/include]
  ignore line: [ /usr/local/include]
  ignore line: [ /usr/include/arm-linux-gnueabihf]
  ignore line: [ /usr/include]
  ignore line: [End of search list.]
  ignore line: [GNU C17 (Raspbian 12.2.0-14+rpi1) version 12.2.0 (arm-linux-gnueabihf)]
  ignore line: [    compiled by GNU C version 12.2.0  GMP version 6.2.1  MPFR version 4.1.1-p1  MPC version 1.3.1  isl version isl-0.25-GMP]
  ignore line: []
  ignore line: [warning: MPFR header version 4.1.1-p1 differs from library version 4.2.0.]
  ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
  ignore line: [Compiler executable checksum: aa6629b5f44fe3420ba005fbae7bc0e6]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o' '-c'  '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-mlibarch=armv6+fp' '-march=armv6+fp' '-dumpdir' 'CMakeFiles/cmTC_fee2c.dir/']
  ignore line: [ as -v -march=armv6+fp -mfloat-abi=hard -meabi=5 -o CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o /tmp/ccApXSO4.s]
  ignore line: [GNU assembler version 2.40 (arm-linux-gnueabihf) using BFD version (GNU Binutils for Raspbian) 2.40]
  ignore line: [COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/]
  ignore line: [LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/12/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o' '-c'  '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-mlibarch=armv6+fp' '-march=armv6+fp' '-dumpdir' 'CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.']
  ignore line: [Linking C executable cmTC_fee2c]
  ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fee2c.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/cc  -v CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o -o cmTC_fee2c ]
  ignore line: [Using built-in specs.]
  ignore line: [COLLECT_GCC=/usr/bin/cc]
  ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/12/lto-wrapper]
  ignore line: [Target: arm-linux-gnueabihf]
  ignore line: [Configured with: ../src/configure -v --with-pkgversion='Raspbian 12.2.0-14+rpi1' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c ada c++ go d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6+fp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf]
  ignore line: [Thread model: posix]
  ignore line: [Supported LTO compression algorithms: zlib zstd]
  ignore line: [gcc version 12.2.0 (Raspbian 12.2.0-14+rpi1) ]
  ignore line: [COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/]
  ignore line: [LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/12/:/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/12/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/]
  ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_fee2c'  '-mfloat-abi=hard' '-mtls-dialect=gnu' '-marm' '-mlibarch=armv6+fp' '-march=armv6+fp' '-dumpdir' 'cmTC_fee2c.']
  link line: [ /usr/lib/gcc/arm-linux-gnueabihf/12/collect2 -plugin /usr/lib/gcc/arm-linux-gnueabihf/12/liblto_plugin.so -plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/12/lto-wrapper -plugin-opt=-fresolution=/tmp/ccgqbeWe.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=gnu --as-needed -m armelf_linux_eabi -o cmTC_fee2c /usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/12/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/12 -L/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/12/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/arm-linux-gnueabihf/12/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crtn.o]
    arg [/usr/lib/gcc/arm-linux-gnueabihf/12/collect2] ==> ignore
    arg [-plugin] ==> ignore
    arg [/usr/lib/gcc/arm-linux-gnueabihf/12/liblto_plugin.so] ==> ignore
    arg [-plugin-opt=/usr/lib/gcc/arm-linux-gnueabihf/12/lto-wrapper] ==> ignore
    arg [-plugin-opt=-fresolution=/tmp/ccgqbeWe.res] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
    arg [-plugin-opt=-pass-through=-lc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
    arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
    arg [--build-id] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/lib/ld-linux-armhf.so.3] ==> ignore
    arg [-X] ==> ignore
    arg [--hash-style=gnu] ==> ignore
    arg [--as-needed] ==> ignore
    arg [-m] ==> ignore
    arg [armelf_linux_eabi] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_fee2c] ==> ignore
    arg [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crt1.o] ==> obj [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crt1.o]
    arg [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crti.o] ==> obj [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crti.o]
    arg [/usr/lib/gcc/arm-linux-gnueabihf/12/crtbegin.o] ==> obj [/usr/lib/gcc/arm-linux-gnueabihf/12/crtbegin.o]
    arg [-L/usr/lib/gcc/arm-linux-gnueabihf/12] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/12]
    arg [-L/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf]
    arg [-L/usr/lib/gcc/arm-linux-gnueabihf/12/../../..] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/12/../../..]
    arg [-L/lib/arm-linux-gnueabihf] ==> dir [/lib/arm-linux-gnueabihf]
    arg [-L/usr/lib/arm-linux-gnueabihf] ==> dir [/usr/lib/arm-linux-gnueabihf]
    arg [CMakeFiles/cmTC_fee2c.dir/CMakeCCompilerABI.c.o] ==> ignore
    arg [-lgcc] ==> lib [gcc]
    arg [--push-state] ==> ignore
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--pop-state] ==> ignore
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [--push-state] ==> ignore
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--pop-state] ==> ignore
    arg [/usr/lib/gcc/arm-linux-gnueabihf/12/crtend.o] ==> obj [/usr/lib/gcc/arm-linux-gnueabihf/12/crtend.o]
    arg [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crtn.o] ==> obj [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crtn.o]
  collapse obj [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crt1.o] ==> [/usr/lib/arm-linux-gnueabihf/crt1.o]
  collapse obj [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crti.o] ==> [/usr/lib/arm-linux-gnueabihf/crti.o]
  collapse obj [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf/crtn.o] ==> [/usr/lib/arm-linux-gnueabihf/crtn.o]
  collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/12] ==> [/usr/lib/gcc/arm-linux-gnueabihf/12]
  collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/12/../../../arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf]
  collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/12/../../..] ==> [/usr/lib]
  collapse library dir [/lib/arm-linux-gnueabihf] ==> [/lib/arm-linux-gnueabihf]
  collapse library dir [/usr/lib/arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf]
  implicit libs: [gcc;gcc_s;c;gcc;gcc_s]
  implicit objs: [/usr/lib/arm-linux-gnueabihf/crt1.o;/usr/lib/arm-linux-gnueabihf/crti.o;/usr/lib/gcc/arm-linux-gnueabihf/12/crtbegin.o;/usr/lib/gcc/arm-linux-gnueabihf/12/crtend.o;/usr/lib/arm-linux-gnueabihf/crtn.o]
  implicit dirs: [/usr/lib/gcc/arm-linux-gnueabihf/12;/usr/lib/arm-linux-gnueabihf;/usr/lib;/lib/arm-linux-gnueabihf]
  implicit fwks: []


Determining if files ifaddrs.h exist passed with the following output:
Change Dir: /home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-ivKbC9

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_201a9/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_201a9.dir/build.make CMakeFiles/cmTC_201a9.dir/build
gmake[1]: Entering directory '/home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-ivKbC9'
Building C object CMakeFiles/cmTC_201a9.dir/KVSWEBRTC_HAVE_IFADDRS_H.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_201a9.dir/KVSWEBRTC_HAVE_IFADDRS_H.c.o -c /home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-ivKbC9/KVSWEBRTC_HAVE_IFADDRS_H.c
Linking C executable cmTC_201a9
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_201a9.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_201a9.dir/KVSWEBRTC_HAVE_IFADDRS_H.c.o -o cmTC_201a9 
gmake[1]: Leaving directory '/home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-ivKbC9'



Determining if the function getifaddrs exists passed with the following output:
Change Dir: /home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-lMZPRA

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_b505f/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_b505f.dir/build.make CMakeFiles/cmTC_b505f.dir/build
gmake[1]: Entering directory '/home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-lMZPRA'
Building C object CMakeFiles/cmTC_b505f.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=getifaddrs -o CMakeFiles/cmTC_b505f.dir/CheckFunctionExists.c.o -c /home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-lMZPRA/CheckFunctionExists.c
Linking C executable cmTC_b505f
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b505f.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=getifaddrs CMakeFiles/cmTC_b505f.dir/CheckFunctionExists.c.o -o cmTC_b505f 
gmake[1]: Leaving directory '/home/mechkarov/amazon-kinesis-video-streams-webrtc-sdk-c/build/CMakeFiles/CMakeScratch/TryCompile-lMZPRA'

Solution

  • Solution for Building AWS Kinesis Video Streams WebRTC SDK

    After encountering compilation issues with the AWS Kinesis Video Streams WebRTC SDK, I was able to resolve the problems on an EC2 instance. The following commands led to a successful build:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install build-essential
    

    Here's a list of the essential commands from my session:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt install default-jdk
    # ... (other not important commands)
    sudo apt-get install build-essential
    dpkg -s openssl
    sudo apt-get install openssl
    cmake ..
    make
    

    Important Disclaimer: This solution was performed on an EC2 instance rather than directly on a Raspberry Pi. Below are the EC2 instance configuration details, I tried to simulate the Raspberry PI OS on the EC2 instance.

    At first I even got the same error on the first try of the build!

    ✅ UPDATE: The solution worked for Raspberry PI

    EC2 Instance Configuration:

    Specification Value
    AMI Debian 12 (arm64 architecture)
    Instance Type m6g.large
    vCPUs 2
    Memory 8 GiB
    Storage EBS only
    Root Device Type EBS
    Network Performance Up to 10 Gigabit

    I will test this solution on a real Raspberry PI as soon as possible, It'll probably work.