Skip to content
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

aws-sdk-cpp together with aws-iot-device-sdk-cpp-v2 #1712

Closed
2 tasks done
angrdtsk opened this issue Jul 15, 2021 · 5 comments
Closed
2 tasks done

aws-sdk-cpp together with aws-iot-device-sdk-cpp-v2 #1712

angrdtsk opened this issue Jul 15, 2021 · 5 comments
Labels
dependencies This issue is a problem in a dependency. needs-reproduction This issue needs reproduction. p3 This is a minor priority issue

Comments

@angrdtsk
Copy link

Confirm by changing [ ] to [x] below:

Platform/OS/Hardware/Device
Debian Buster

Describe the question
I have written a program for embedded environment that uses aws-iot-device-sdk-cpp-v2.

I do most of the development and testing in PC environment. Part of the testing is accomplished with a test bench program that includes the code of the actual application packaged in the form of a statically linked library. One of the things I'd like the test bench to do is administrating Jobs i.e. creating and deleting them and queueing them to the application code.

I was hoping I could do that using aws-sdk-cpp, but all my attempts to do that have ended up in problems either in build phase or run-time. The only way I have been able to explain those problems has been assuming that these two libraries can't exist together in one program. Is that correct?

If it is, then is there any other way to administer Jobs and run client device client code in the same program?

The best option I have in my mind for now is to administer Jobs from another program or script that is invoked from the test bench program.

@angrdtsk angrdtsk added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Jul 15, 2021
@KaibaLopez
Copy link
Contributor

@angrdtsk ,
So there should be no reason why the two libraries can't coexist, but I'll be honest and say I haven't tried it myself.
I'm curious about the building problems you are having though, like how are you trying to build and link the libraries, we tend to have issues opened on building process so maybe you're facing a known issue.
Can you walk me through your build process?

@KaibaLopez KaibaLopez added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. and removed needs-triage This issue or PR still needs to be triaged. labels Jul 16, 2021
@KaibaLopez KaibaLopez self-assigned this Jul 16, 2021
@angrdtsk
Copy link
Author

@KaibaLopez
I have tried two approaches, one with "flat" linking configuration and one with a linking "hierarchy" that was meant to hide the libraries from each other.

Linking on the highest level means that I had just one cmake project containing the actual implementation, the test bench code and both libraries. That approach gave me a huge amount of compile errors all related to macros whose name started with AWS_. That was probably caused by overlapping in headers. The implementation code #included headers like aws/crt/Types.h and aws/crt/Api.h from aws-iot-device-sdk-cpp-v2 and the test bench #included headers from aws-sdk-cpp that defined same stuff. I didn't inspect that deeper than that, but that was my impression that made me abandon that approach for now.

Linking with "hierarchy" means that I made the implementation a library project and linked aws-iot-device-sdk-cpp-v2 only to that. I then linked the test bench project with the implementation library and aws-sdk-cpp but not with aws-iot-device-sdk-cpp-v2. That way, I got rid of compilation problems, but got run-time problems instead. Specifically, I get segmentation fault when I call MqttClientConnectionConfigBuilder::Build, and all I need to do to get rid of that is to leave out aws-sdk-cpp and all refereneces to it. In other words, the changes needed to fix the segmentation fault have no apparent connection to the code where it happens. That suggests to me that those libraries somehow affect each other.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. label Jul 20, 2021
@angrdtsk
Copy link
Author

@KaibaLopez
Friday will be my last day before a holiday of three weeks during which I won't follow/participate this discussion. I'll be back, though.

@KaibaLopez KaibaLopez added automation-exempt This issue will not be closed by autoclose action needs-reproduction This issue needs reproduction. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. and removed guidance Question that needs advice or information. labels Aug 4, 2021
@jmklix
Copy link
Member

jmklix commented Mar 8, 2023

Both sdks should be using the latest version of the aws-crt-cpp which should allow you to statically link the dependencies and allow you to use both at the same time. Please let me know if you run into any problems with this.

@jmklix jmklix added dependencies This issue is a problem in a dependency. p3 This is a minor priority issue and removed automation-exempt This issue will not be closed by autoclose action labels Mar 8, 2023
@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. label Mar 9, 2023
@jmklix jmklix closed this as completed Sep 13, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies This issue is a problem in a dependency. needs-reproduction This issue needs reproduction. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

3 participants