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
77 stars 72 forks source link

Protobuf library doesn't build for Raspberry Pi 3B #2

Closed dhwalters423 closed 4 years ago

dhwalters423 commented 4 years ago
[ 42%] Built target libprotoc
Scanning dependencies of target protoc
[ 42%] Building CXX object CMakeFiles/protoc.dir/home/pi/secure-tunnel/protobuf-3.6.1/src/google/protobuf/compiler/main.cc.o
[ 43%] Linking CXX executable protoc
/usr/bin/ld: libprotobuf.a(arena.cc.o): in function `google::protobuf::internal::ArenaImpl::Init()':
arena.cc:(.text+0x34): undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/protoc.dir/build.make:88: protoc] Error 1
make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/protoc.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Known issue fixed with this commit: https://github.com/protocolbuffers/protobuf/commit/55ed1d427ccc0d200927746329ac9b811dee77b9

Consider updating to Protobuf 3.11.1 https://github.com/protocolbuffers/protobuf/releases

arunsabat commented 4 years ago

I have similar issue building in visual studio 2019. Since the Prerequisites list was showing protobuf 3.6.x, Can I use Protobuf 3.11.1 in WIndows to build in VS 2019? Also, it will be good, if the documentation can be updated for VS 2019.

DavidOgunsAWS commented 4 years ago

David, Thank you, This was an issue noticed during cross compilation testing. For the time being there are two lines in CMakeLists to link against libatomic which can be placed outside of the cross-compilation condition check. We will be working to upgrade the dependencies in the near future and post an update here.

Arun, Upgrading or changing to other ProtocolBuffers versions within major version 3 should work. While we are continuously working to ensure Windows builds and comparability holds, producing documentation to set up a Visual Studio project or solution is not currently a priority. Please let us know if there are other steps we can take to make the transition from the CMake build to VS any easier.

David O.

sebastibe commented 3 years ago

I had the same compilation error on a Raspberry Pi 4 with Raspian, while compiling more recent version of Protobuf works well, any plans to upgrade dependencies as discussed last year?

kareali commented 3 years ago

@sebastibe We don't have updates regarding the version updates, are you running into issue when using a more recent version of Protobuf?