aws-samples / aws-iot-securetunneling-localproxy

AWS Iot Secure Tunneling local proxy reference C++ implementation
https://docs.aws.amazon.com/iot/latest/developerguide/what-is-secure-tunneling.html
Apache License 2.0
74 stars 71 forks source link

build stops at 58%, no binaries produced #125

Closed paapu88 closed 1 year ago

paapu88 commented 1 year ago

Describe the bug

In a docker container I run:

git clone https://github.com/aws-samples/aws-iot-securetunneling-localproxy
cd aws-iot-securetunneling-localproxy 
mkdir build 
cd build 
cmake3 ../
make

output

Cloning into 'aws-iot-securetunneling-localproxy'...
remote: Enumerating objects: 569, done.
remote: Counting objects: 100% (360/360), done.
remote: Compressing objects: 100% (162/162), done.
remote: Total 569 (delta 260), reused 226 (delta 192), pack-reused 209
Receiving objects: 100% (569/569), 275.61 KiB | 2.78 MiB/s, done.
Resolving deltas: 100% (329/329), done.
-- The CXX compiler identification is GNU 7.3.1
-- 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
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found Protobuf: /usr/local/lib64/libprotobuf.a;-lpthread (found suitable version "3.17.3", minimum required is "3.17.3") 
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.1.1g")  
-- Boost 1.81.0 found.
-- Found Boost components:
   system;log;log_setup;thread;program_options;date_time;filesystem;chrono
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dependencies/aws-iot-securetunneling-localproxy/build
[  4%] Running cpp protocol buffer compiler on /home/dependencies/aws-iot-securetunneling-localproxy/resources/Message.proto
Scanning dependencies of target localproxytest
[  8%] Building CXX object CMakeFiles/localproxytest.dir/test/AdapterTests.cpp.o
[ 12%] Building CXX object CMakeFiles/localproxytest.dir/test/TestHttpServer.cpp.o
[ 16%] Building CXX object CMakeFiles/localproxytest.dir/test/TestWebsocketServer.cpp.o
[ 20%] Building CXX object CMakeFiles/localproxytest.dir/test/Url.cpp.o
[ 25%] Building CXX object CMakeFiles/localproxytest.dir/test/WebProxyAdapterTests.cpp.o
[ 29%] Building CXX object CMakeFiles/localproxytest.dir/src/TcpAdapterProxy.cpp.o
[ 33%] Building CXX object CMakeFiles/localproxytest.dir/src/ProxySettings.cpp.o
[ 37%] Building CXX object CMakeFiles/localproxytest.dir/src/WebProxyAdapter.cpp.o
[ 41%] Building CXX object CMakeFiles/localproxytest.dir/Message.pb.cc.o
[ 45%] Building CXX object CMakeFiles/localproxytest.dir/src/WebSocketStream.cpp.o
[ 50%] Building CXX object CMakeFiles/localproxytest.dir/src/config/ConfigFile.cpp.o
[ 54%] Building CXX object CMakeFiles/localproxytest.dir/src/Url.cpp.o
[ 58%] Linking CXX executable bin/localproxytest
CMakeFiles/localproxytest.dir/src/config/ConfigFile.cpp.o: In function `void boost::sp_adl_block::intrusive_ptr_release<boost::filesystem::detail::recur_dir_itr_imp, boost::sp_adl_block::thread_safe_counter>(boost::sp_adl_block::intrusive_ref_counter<boost::filesystem::detail::recur_dir_itr_imp, boost::sp_adl_block::thread_safe_counter> const*)':
ConfigFile.cpp:(.text._ZN5boost12sp_adl_block21intrusive_ptr_releaseINS_10filesystem6detail17recur_dir_itr_impENS0_19thread_safe_counterEEEvPKNS0_21intrusive_ref_counterIT_T0_EE[_ZN5boost12sp_adl_block21intrusive_ptr_releaseINS_10filesystem6detail17recur_dir_itr_impENS0_19thread_safe_counterEEEvPKNS0_21intrusive_ref_counterIT_T0_EE]+0x49): undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/localproxytest] Error 1
make[1]: *** [CMakeFiles/localproxytest.dir/all] Error 2
make: *** [all] Error 2

Environment (please complete the following information):

bash-4.2# uname -r 6.0.0-1006-oem

bash-4.2# uname -m x86_64


 - Localproxy commit: 

git log commit c9a337567240059a0ea9a5af91868ec775c55e47 (HEAD -> main, tag: v3.1.0, origin/main, origin/HEAD) Author: RogerZhongAWS 100961047+RogerZhongAWS@users.noreply.github.com Date: Mon Mar 6 09:09:19 2023 -0800

Docker Images (#113)

* add docker image build workflows

- other program versions

zlib-1.2.13 boost_1_81_0 protobuf-all-3.17.3 git checkout OpenSSL_1_1_1-stable git clone --branch v2.13.6 https://github.com/catchorg/Catch2.git

RogerZhongAWS commented 1 year ago

Hello @paapu88, thanks for reaching out. Is your uname output for the docker container or host machine? The reason I am asking is because there is an issue with our image tagging as of late. All the ARM images get uploaded after the x86 ones, and they have been overriding the latest tag in the repo. A fix for this will come shortly and you can try again with an image that properly supports x86.

paapu88 commented 1 year ago

All the commans and outputs are from inside of a docker container

paapu88 commented 1 year ago

It works now good for me outside of the docker container, was just inside docker for debugging. So for my purposes it is working fine for the moment, and you can close this issue if you find of no general value.

RogerZhongAWS commented 1 year ago

Thanks, will keep the issue open for now. I have tested building on the docker container myself and have not encountered such an issue yet. Will keep looking.