celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CELIX-388) celix build for raspberry pi2 fails
Date Fri, 16 Dec 2016 21:00:59 GMT
Rob created CELIX-388:
-------------------------

             Summary: celix build for raspberry pi2 fails
                 Key: CELIX-388
                 URL: https://issues.apache.org/jira/browse/CELIX-388
             Project: Celix
          Issue Type: Bug
          Components: Framework
    Affects Versions: 1.0.0-incubating
         Environment: yocto poky version 2.2 with raspberry pi2 meta layers
on ubuntu 16.04 lts
            Reporter: Rob
            Priority: Minor


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message