openembedded / meta-openembedded

MIT License
416 stars 716 forks source link

serial: Fix empty package and use shared lib instead of static lib. #809

Closed wesleyel closed 6 months ago

wesleyel commented 7 months ago

The older recipe of serial built a static lib libserial.a.

Which was contained in FILES_${PN}-dev and FILES_${PN} is empty.

This will make bitbake unhapply and raise Nothing provides serial needed by other-recipe problem.

To fix it we need add CMake set_target_properties function.

see also:

  1. https://docs.yoctoproject.org/pipermail/yocto/2015-January/022921.html
  2. https://stackoverflow.com/questions/59091938/yocto-oe-recipe-with-cmake-install-a-shared-library-so
wesleyel commented 7 months ago

@kraj Thanks for your reminder. I have appended Upstream-Status label.

I noticed that the maintainer of the serial project has not had any activity in the past 10 months. Maybe in this case we can merge it directly into meta-oe.

kraj commented 7 months ago

https://errors.yoctoproject.org/Errors/Details/763022/

wesleyel commented 7 months ago

https://errors.yoctoproject.org/Errors/Details/763022/

Sorry. I have not test ptest feature on my project.

Can you give me some hint for fix unimplemented-ptest Error?

I noticed that we have CATKIN_ENABLE_TESTING macro to enable test binary building. But I don't know how to make them integrating with ptest.

https://github.com/wjwwood/serial/blob/main/tests/CMakeLists.txt

kraj commented 6 months ago

https://errors.yoctoproject.org/Errors/Details/763022/

Sorry. I have not test ptest feature on my project.

Can you give me some hint for fix unimplemented-ptest Error?

I noticed that we have CATKIN_ENABLE_TESTING macro to enable test binary building. But I don't know how to make them integrating with ptest.

https://github.com/wjwwood/serial/blob/main/tests/CMakeLists.txt

Enable ptest via adding it to local.conf

DISTRO_FEATURES:append = " ptest"

then try building it again.

kraj commented 6 months ago

fixed with 224eb2697f

wesleyel commented 6 months ago

Thanks!