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

IoT Secure Tunneling boost library #39

Closed AlexCatlan closed 3 years ago

AlexCatlan commented 3 years ago

We've tried to build a windows local proxy to get access to a device through the AWS IoT Core using these instructions but I have a issue on how to build the boost library (1.68). I've succeeded with installing version 1.75 but the current version of local proxy is using function calls which are no longer support in 1.68. Below I've attached a print screen of the boost library error I receive. BoostLibraryCMD

kareali commented 3 years ago

For the windows itself and visual studio, could you provide the version you're using and whether it's 32-bit or 64-bit?

And could you provide the the full commands you ran their full output as well?

AlexCatlan commented 3 years ago

Hello Kareem,

The version of Windows and Visual Studio is 64-bit and I've attached the full output here. bootstrap.log b2.log logalproxy.log

kareali commented 3 years ago

Thanks Alex

I see from the logalproxy.log file that you're also using Windows 10, Visual Studio 2019, is that correct? I see a problem with the command for building the localproxy as you need to replace _WIN32_WINNT_WIN10 the with actual value, something like this

cmake -DWIN32_WINNT=0x0A00 -DBoost_USE_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH="C:\Boost;C:\Program Files (x86)\Catch2;C:\Program Files (x86)\protobuf;C:\Program Files\OpenSSL" -G "Visual Studio 16 2019" -A x64 ..\

But let's focus on boost first, Could you also share the command you ran to install boost? I don't see it in the b2.log file. It starts with

warning: Did not find command for MSVC toolset. If you have Visual Studio 2017 installed you will need to specify the full path to the command, set VS150COMNTOOLS for your installation, or build from the 'Visual Studio Command Prompt for VS 2017'.

which makes me suspect it's Visual Studio issue a similar to the one mentioned here. You could try the solution mentioned in that issue or you could try using Visual Studio 2019 with msvc 14.1

AlexCatlan commented 3 years ago

Hi Kareem,

Thank you for the guidance, really helpful. We managed to build boost by changing from VS150 to VS160 in msvc.jam . After running msbuild localproxy.vcxproj -p:Configuration=Release , we got the following errors: msbuild_log.txt

kareali commented 3 years ago

nice!

Could you share the following the full cmake command you ran and its output as well?

AlexCatlan commented 3 years ago

Hi Kareem,

Great news ! We deleted the CMake files created in the build directory to run CMake again and send you it's output and this time the project compiled without any errors. Thank you very much for your help.

kareali commented 3 years ago

@AlexCatlan You're welcome!