-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azure-iot-sdk-c linking fails during make #22777
Comments
I have the exact same problem. Just did a fresh install but i can't seem to work around the problem. uhttp and parson do seem to be installed. i'm using the same compiler and same ubuntu version without WSL
|
Hi @tjeerdvandijk and @rschiefer. I am on the Azure Iot C SDK team. We are taking a look into this. Thanks! |
Thank you for your response. I did a new installation this morning since a saw a bunch of changes on the repo. Unfortunately the issue still persists with the new versions
|
Hi @rschiefer, I'm not reproducing the exact error you are seeing, but I am running into a different problem that may be related. I encounter an error during cmake. Host Environment
To reproduce, use these directions: https://github.com/Azure/azure-iot-sdk-c/blob/de09b35289313665f0d359835c661f8cb2a0fdf1/doc/setting_up_vcpkg.md Essentially, your steps 1 and 2 are the same for me, but when I run cmake, I receive the error:
@LilyWangLL , could you please help me look at our CMakeLists.txt for azure-iot-sdk-c and to see if we are not using CMake correctly to export the package? I am still relatively new to both CMake and vcpkg. When I run Thank you. |
I get that error if I don't pass the DCMAKE_TOOLCHAIN_FILE arg on the cmake call. You have to tell cmake where to find vcpkg.cmake: -DCMAKE_TOOLCHAIN_FILE=/mnt/d/source/Github/vcpkg/scripts/buildsystems/vcpkg.cmake |
@momuno That is the build directory. The package probably lacks an install command for the config. |
I can reproduce this issue locally. CMakeLists.txt for
I can reproduce this issue by the following steps on VCPKG:
CMakeLists.txt
main.cpp
result:
result:
|
@LilyWangLL Did you test the latest version of the port? It removed a patch which had strange changes with regard to parson and uhttp. |
Yes, I use the latest version of this port.
|
Please test #22869. |
Will be happy to try it but need some direction on how to test the PR? |
I can test shortly. Thank you @dg0yt and @LilyWangLL very much for your assistance on this. |
@LilyWangLL I no longer encounter my earlier issue. I had supplied the DCMAKE_TOOLCHAIN_FILE on Friday, not sure why it was working then. It worked today. However, I have reproduced the same issue you are seeing:
Testing @dg0yt patch next. |
|
Thank you for your change in the PR. I agree this addresses the quoted issue. |
@rschiefer the PR #22869 has been merged. Can you please confirm this fixes your issue? Thank you. |
Yes, it appears to be working now. Thanks! |
@LilyWangLL @dg0yt when you have a chance, I think this issue can be closed. Thanks. |
Once I added some references to the iothub sdk and attempted to build/link I got new errors: [ 25%] Linking C executable Checkin This looks like an SDK issue but not sure. I added the following lines to my CMakeLists.txt: find_package(azure_iot_sdks CONFIG REQUIRED) Am I missing something? |
x64-linux uses static linkage. You need to link all required libraries, and in the right order. Unfortunately there are two obstacles here:
|
John Sheppard, please adhere to the Code of Conduct as define here: |
This is from
So this target links to To upstream: |
Thanks for Kai Pastor's reply. @rschiefer There is upstream issue about the new error: Azure/azure-iot-sdk-c#598. You can try solution as this issue. |
@dg0yt @LilyWangLL Thank you for your input and assistance on these issues. We are looking into #20190 and other needed improvements to our CMake build system. @ewertons @danewalton @ericwol-msft |
This issue has been resolved, I am closing this issue for now. |
Host Environment
To Reproduce
Steps to reproduce the behavior:
1-
./vcpkg install azure-iot-sdk-c
2-add the CMake targets to your CMakeLists.txt
3-run cmake
4-run make
Failure logs
Additional context
It looks like the vcpkg port includes parson and uhttp dependencies but they don't appear to be linking correctly.
The text was updated successfully, but these errors were encountered: