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

integrating into yocto. #64

Closed
mmohtashamirad opened this issue Jul 15, 2021 · 8 comments
Closed

integrating into yocto. #64

mmohtashamirad opened this issue Jul 15, 2021 · 8 comments

Comments

@mmohtashamirad
Copy link

Hello,
I'm trying to integrate the library into a yocto cmake project as it's instructed in user manual. the problem is that I'm able to compile the same project in ubuntu and manually cross compile it for the target. but when it comes to yocto bitbake, it fails because it's compiling the libosdp for the host, not for target.
does anyone have any idea about it?

@sidcha
Copy link
Member

sidcha commented Jul 17, 2021 via email

@mmohtashamirad
Copy link
Author

You’d have to export cross compilers before invoking cmake. Did you have a look at https://libosdp.gotomain.io/libosdp/cross-compiling.html? Even though it’s not something that you can directly use, it’s a good starting point on what the library expects in order to be cross compiled.

On Thu 15. Jul 2021 at 05:05, mmohtashamirad @.***> wrote: Hello, I'm trying to integrate the library into a yocto cmake project as it's instructed in user manual. the problem is that I'm able to compile the same project in ubuntu and manually cross compile it for the target. but when it comes to yocto bitbake, it fails because it's compiling the libosdp for the host, not for target. does anyone have any idea about it? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#64>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAW3LGIDOARX2HDWJQHZYNLTXZF6RANCNFSM5AMUPS3Q .

Thanks for your answer, Sidcha.
I already checked all parts of the manual pages.
In yocto, you don't need to set cross compiler. It's done automatically. Actually, the main project is compiled for target, but only libosdp is being compiled for host.

@sidcha
Copy link
Member

sidcha commented Jul 17, 2021

@mmohtashamirad, can you give me some link/steps/reproducer to reproduce the problem locally? Did you have to make some changes to LibOSDP to get to where you are?

I'm not super familiar with Yocto and and there isn't much to go on here :)

@mmohtashamirad
Copy link
Author

Sure, I will try to provide you some guidance alongside with needed materials to build yocto and compile a simple osdp application using your library here. it takes a while for me to do so. I'll let you know when it's ready.
also about the question "Did you have to make some changes to LibOSDP to get to where you are?": I haven't made any changes to your source code yet. and I think the best would be not to make any change to your library to keep it intact.

@sidcha
Copy link
Member

sidcha commented Aug 10, 2021

Ping?

@sidcha sidcha closed this as completed Aug 28, 2021
@sidcha
Copy link
Member

sidcha commented Aug 28, 2021

@mmohtashamirad, feel free to reopen when you have something I can look into.

@xJurgen
Copy link

xJurgen commented Sep 9, 2021

We had same issue with integrating libosdp in yocto.
If you have "recipe-sysroot-native" in line "Found OpenSSL" (in do_configure cmake log), you have to change it to just "recipe-sysroot"
We solved it by adding openssl in recipe dependencies and now everything compiles accordingly.

DEPENDS += "openssl"

Also we compile only libraries, so we added EXTRA_OECMAKE option in recipe aswell

EXTRA_OECMAKE += "-DCONFIG_OSDP_LIB_ONLY:BOOL=ON"

@sidcha
Copy link
Member

sidcha commented Sep 9, 2021

@xJurgen, Thanks for letting us know. Please feel free to raise a PR for any changes needed to the library to make it easy for integration into yocto.

If you think that your yocto recipe can be helpful for others, you can send a PR for that too. There a misc directory to have configuration files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants