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
73 stars 70 forks source link

Return Error while build for raspberry pi 4 compute module #86

Closed albertshanhandoko closed 1 year ago

albertshanhandoko commented 2 years ago

Describe the bug

When building local proxy it stopped and returns error at 58%

[ 58%] Linking CXX executable bin/localproxytest /usr/bin/ld: /usr/local/lib/arm-linux-gnueabihf/libprotobuf-lite.a(arena.cc.o): in function google::protobuf::internal::ThreadSafeArena::Init(bool)': arena.cc:(.text+0xa60): undefined reference to__atomic_fetch_add_8' collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/localproxytest.dir/build.make:292: bin/localproxytest] Error 1 make[1]: [CMakeFiles/Makefile2:97: CMakeFiles/localproxytest.dir/all] Error 2 make: *** [Makefile:103: all] Error 2

To Reproduce

Steps to reproduce the behavior:

  1. Install All libraries and dependencies
  2. git clone https://github.com/aws-samples/aws-iot-securetunneling-localproxy
  3. cd aws-iot-securetunneling-localproxy
  4. mkdir build
  5. cd build
  6. cmake ../
  7. make
  8. See Error

Expected behavior

Build complete successfully, binaries generated

Actual behavior

"make" command returns error

Logs Attached image

Environment (please complete the following information):

HarshGandhi-AWS commented 2 years ago

Hello @albertshanhandoko ,

I haven't seen the exact error yet for other OS but I will try to reproduce this issue on raspberry pi device. Will keep you posted with my progress.

Regards, Harsh Gandhi

HarshGandhi-AWS commented 1 year ago

Still facing some issue to install dependencies (boost) on Raspberry pi 4. Will continue working on it this week.

HarshGandhi-AWS commented 1 year ago

Hello @albertshanhandoko , I have tried reproducing the issue you were facing on the Raspberry Pi 4 device but because of low computing power and other issues, I was not able to install all of the dependencies on the device. But when I tried to cross compile the binary for raspberry pi, it compiled without any build issues and also all local tests passed. I would suggest you to cross compile the localproxy binary on a different device and then use that binary on your Raspberry Pi device.

Here are the steps which you can follow to cross compile localproxy binary: https://github.com/aws-samples/aws-iot-securetunneling-localproxy#cross-compilation

Please let us know if it works for you or not.

Regards, Harsh Gandhi

HarshGandhi-AWS commented 1 year ago

Hello @albertshanhandoko , we are closing this issue now. Please feel free to reopen it or create a new issue if you find any difficulty in using localproxy.

Thank you.