celix build for raspberry pi2 fails
- Dominant language
- C
- Stars
- 193
- Forks
- 99
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Building celix for raspberry pi2 with yocto poky distro version 2.2
gives warning: "readdir_r is deprecated"
and since all warnings are treated as errors the build fails.
(See log.do_compile.4948)
The following changes were needed for succesful compilation
./celix/CMakeLists.txt
39,40c39
< # SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall -Werror -fPIC ${CMAKE_C_FLAGS}")
< SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall -fPIC ${CMAKE_C_FLAGS}")
./celix/dependency_manager_cxx/CMakeLists.txt
22,23c22
< # set(CMAKE_CXX_FLAGS "-Wall -Werror -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
< set(CMAKE_CXX_FLAGS "-Wall -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
./celix/examples/dm_example_cxx/CMakeLists.txt
19,20c19
< # set(CMAKE_CXX_FLAGS "-Wall -Werror -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
< set(CMAKE_CXX_FLAGS "-Wall -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
./celix/examples/services_example_cxx/CMakeLists.txt
19,20c19
< # set(CMAKE_CXX_FLAGS "-Wall -Werror -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
< set(CMAKE_CXX_FLAGS "-Wall -fno-rtti -fno-exceptions ${CMAKE_CXX_FLAGS}")
Also the link stage fails with the error:
../../framework/libcelix_framework.so.2: undefined reference to `dlsym'
../../framework/libcelix_framework.so.2: undefined reference to `dlerror'
../../framework/libcelix_framework.so.2: undefined reference to `dlopen'
../../framework/libcelix_framework.so.2: undefined reference to `dlclose'
(See log.do_compile.4948)
I had to add the dl library to the link libraries to make the build work:
./celix/deployment_admin/CMakeLists.txt
64c64
< target_link_libraries(deployment_admin celix_framework ${CURL_LIBRARIES} dl)
./celix/launcher/CMakeLists.txt
29c29
< target_link_libraries(celix celix_framework ${CURL_LIBRARIES} dl)
31c31
< target_link_libraries(celix celix_dfi dl) #note not strictly needed, but ensure libdfi is a dep for the framework, useful when create docker images
./celix/utils/CMakeLists.txt
61c61
< target_link_libraries(celix_utils m pthread dl)
The bitbake do_package_qa stage fails with:
ERROR: QA Issue: celix: /work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/celix/1.0-r0/packages-split/celix/usr/bin/celix contains probably-redundant RPATH /usr/lib [useless-rpaths]
(See log.do_package_qa.10608)
I solved this by adding the following in the celix.bb file:
INSANE_SKIP_${PN} += "useless-rpaths"
With these changes celix builds and i can run the hello world and dm examples on the pi2.
[log.do_compile.4948](https://github.com/apache/celix/files/3665564/log.do_compile.4948.txt)
[log.do_package_qa.10608](https://github.com/apache/celix/files/3665565/log.do_package_qa.10608.txt)
---
Original creation date: 16/Dec/2016
Reporter: Rob
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.