awslabs / amazon-kinesis-video-streams-producer-sdk-cpp

Amazon Kinesis Video Streams Producer SDK for C++ is for developers to install and customize for their connected camera and other devices to securely stream video, audio, and time-encoded data to Kinesis Video Streams.
Apache License 2.0
377 stars 334 forks source link

compilation error on Ubuntu #1142

Closed akilani closed 8 months ago

akilani commented 8 months ago

Logging Add relevent SDK logging. IMPORTANT NOTE: Please make sure to NOT share AWS access credentials under any circumstance! Please make sure they are not in the logs.

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: use ubuntu ec2 image, try to compile under it

Platform (please complete the following information):

[ 66%] Linking C executable lib1518 [ 66%] Built target lib1518 [ 66%] Building C object tests/libtest/CMakeFiles/lib1520.dir/lib1520.c.o [ 66%] Building C object tests/libtest/CMakeFiles/lib1520.dir/first.c.o [ 66%] Linking C executable lib1520 [ 66%] Built target lib1520 [ 66%] Generating lib1521.c [ 66%] Building C object tests/libtest/CMakeFiles/lib1521.dir/lib1521.c.o cc: fatal error: Killed signal terminated program cc1 compilation terminated. gmake[5]: [tests/libtest/CMakeFiles/lib1521.dir/build.make:81: tests/libtest/CMakeFiles/lib1521.dir/lib1521.c.o] Error 1 gmake[4]: [CMakeFiles/Makefile2:4529: tests/libtest/CMakeFiles/lib1521.dir/all] Error 2 gmake[3]: [Makefile:146: all] Error 2 gmake[2]: [CMakeFiles/project_libcurl.dir/build.make:87: build/src/project_libcurl-stamp/project_libcurl-build] Error 2 gmake[1]: [CMakeFiles/Makefile2:83: CMakeFiles/project_libcurl.dir/all] Error 2 gmake: [Makefile:91: all] Error 2 CMake Error at dependency/libkvscproducer/kvscproducer-src/CMake/Utilities.cmake:93 (message): CMake step for libcurl failed: 2 Call Stack (most recent call first): dependency/libkvscproducer/kvscproducer-src/CMakeLists.txt:95 (build_dependency)

-- Configuring incomplete, errors occurred! See also "/root/gg/amazon-kinesis-video-streams-producer-sdk-cpp/CMakeFiles/CMakeOutput.log".

#########################################################################################################################

root@ip-172-31-7-93:~/gg/amazon-kinesis-video-streams-producer-sdk-cpp# tail -100 "/root/gg/amazon-kinesis-video-streams-producer-sdk-cpp/CMakeFiles/CMakeOutput.log" ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"] ignore line: [#include "..." search starts here:] ignore line: [#include <...> search starts here:] ignore line: [ /usr/include/c++/11] ignore line: [ /usr/include/x86_64-linux-gnu/c++/11] ignore line: [ /usr/include/c++/11/backward] ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/11/include] ignore line: [ /usr/local/include] ignore line: [ /usr/include/x86_64-linux-gnu] ignore line: [ /usr/include] ignore line: [End of search list.] ignore line: [GNU C++17 (Ubuntu 11.4.0-1ubuntu1~22.04) version 11.4.0 (x86_64-linux-gnu)] ignore line: [ compiled by GNU C version 11.4.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version isl-0.24-GMP] ignore line: [] ignore line: [GGC heuristics: --param ggc-min-expand=60 --param ggc-min-heapsize=57145] ignore line: [Compiler executable checksum: d591828bb4d392ae8b7b160e5bb0b95f] ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_2dd4e.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_2dd4e.dir/'] ignore line: [ as -v --64 -o CMakeFiles/cmTC_2dd4e.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccT9iidx.s] ignore line: [GNU assembler version 2.38 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38] ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/] ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/] ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_2dd4e.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles/cmTC_2dd4e.dir/CMakeCXXCompilerABI.cpp.'] ignore line: [Linking CXX executable cmTC_2dd4e] ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2dd4e.dir/link.txt --verbose=1] ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_2dd4e.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_2dd4e ] ignore line: [Using built-in specs.] ignore line: [COLLECT_GCC=/usr/bin/c++] ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper] ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa] ignore line: [OFFLOAD_TARGET_DEFAULT=1] ignore line: [Target: x86_64-linux-gnu] ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2] ignore line: [Thread model: posix] ignore line: [Supported LTO compression algorithms: zlib zstd] ignore line: [gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) ] ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/] ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/11/../../../:/lib/:/usr/lib/] ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_2dd4e' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_2dd4e.'] link line: [ /usr/lib/gcc/x86_64-linux-gnu/11/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/cc0gUQhr.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_2dd4e /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. CMakeFiles/cmTC_2dd4e.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] arg [/usr/lib/gcc/x86_64-linux-gnu/11/collect2] ==> ignore arg [-plugin] ==> ignore arg [/usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so] ==> ignore arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper] ==> ignore arg [-plugin-opt=-fresolution=/tmp/cc0gUQhr.res] ==> ignore arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore arg [-plugin-opt=-pass-through=-lgcc] ==> ignore arg [-plugin-opt=-pass-through=-lc] ==> ignore arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore arg [-plugin-opt=-pass-through=-lgcc] ==> ignore arg [--build-id] ==> ignore arg [--eh-frame-hdr] ==> ignore arg [-m] ==> ignore arg [elf_x86_64] ==> ignore arg [--hash-style=gnu] ==> ignore arg [--as-needed] ==> ignore arg [-dynamic-linker] ==> ignore arg [/lib64/ld-linux-x86-64.so.2] ==> ignore arg [-pie] ==> ignore arg [-znow] ==> ignore arg [-zrelro] ==> ignore arg [-o] ==> ignore arg [cmTC_2dd4e] ==> ignore arg [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o] arg [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o] arg [/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o] arg [-L/usr/lib/gcc/x86_64-linux-gnu/11] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11] arg [-L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu] arg [-L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib] arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] arg [-L/lib/../lib] ==> dir [/lib/../lib] arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] arg [-L/usr/lib/gcc/x86_64-linux-gnu/11/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../..] arg [CMakeFiles/cmTC_2dd4e.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore arg [-lstdc++] ==> lib [stdc++] arg [-lm] ==> lib [m] arg [-lgcc_s] ==> lib [gcc_s] arg [-lgcc] ==> lib [gcc] arg [-lc] ==> lib [c] arg [-lgcc_s] ==> lib [gcc_s] arg [-lgcc] ==> lib [gcc] arg [/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o] arg [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] ==> obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] collapse obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1.o] ==> [/usr/lib/x86_64-linux-gnu/Scrt1.o] collapse obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o] ==> [/usr/lib/x86_64-linux-gnu/crti.o] collapse obj [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o] ==> [/usr/lib/x86_64-linux-gnu/crtn.o] collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11] ==> [/usr/lib/gcc/x86_64-linux-gnu/11] collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib] ==> [/usr/lib] collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] collapse library dir [/lib/../lib] ==> [/lib] collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] collapse library dir [/usr/lib/../lib] ==> [/usr/lib] collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/11/../../..] ==> [/usr/lib] implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc] implicit objs: [/usr/lib/x86_64-linux-gnu/Scrt1.o;/usr/lib/x86_64-linux-gnu/crti.o;/usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o;/usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o;/usr/lib/x86_64-linux-gnu/crtn.o] implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/11;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] implicit fwks: []

sirknightj commented 8 months ago

Hi @akilani

I attempted to replicate the issue by creating a new Ubuntu instance (t2.micro) with this configuration

image

and ran the following with no issues

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install cmake m4 git build-essential pkg-config libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
git clone https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp.git
cd amazon-kinesis-video-streams-producer-sdk-cpp
mkdir build
cd build
cmake .. -DBUILD_GSTREAMER_PLUGIN=TRUE
make

If you haven't already, could you update the libraries that come preinstalled on the Ubuntu image (refer to the commands above)?

If that doesn't solve the issue, could you help us replicate the issue you are encountering by providing the following:

  1. Which branch are you building?
  2. What arguments are you passing into CMake?
  3. Which settings did you use to configure the EC2?