You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by f....@schrack-seconet.com on 2019/12/17 08:30:50 UTC

Cross Compiling qpid-proton 0.30.0 with Yocto SDK

Hi,

I would like to cross compile qpid-proton version 0.30.0 for an NXP i.MX7D 
(Arm Cortex A7 core) using the cross compiler toolchain generated with 
yocto.

Unfortunately, the build fails when it comes to linking the C++ library 
against libqpid-proton-proactor.so. The library libqpid-proton-proactor.so 
itself was successfully built and resided in the 'c' subdirectory. It 
seems that the build process does not find the library it builds itself a 
few steps before.

This is how I invoked cmake and make:

$ $OECORE_NATIVE_SYSROOT/usr/bin/cmake 
-DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake 
-DCMAKE_INSTALL_PREFIX=/opt/qpid -DSYSINSTALL_BINDINGS=OFF 
-DBUILD_PYTHON=OFF -DBUILD_RUBY=OFF ..
$ make

This is the output of the build process where it fails.

[ 70%] Building CXX object 
cpp/CMakeFiles/qpid-proton-cpp.dir/src/connect_config_dummy.cpp.o
[ 71%] Linking CXX shared library libqpid-proton-cpp.so
/home/hof/work/qpid-proton/cpp/include/proton/./endpoint.hpp:37:21: 
warning: virtual table of type 'struct endpoint' violates one definition 
rule [-Wodr]
 PN_CPP_CLASS_EXTERN endpoint {
                     ^
/home/hof/work/qpid-proton/cpp/include/proton/./endpoint.hpp:37:21: note: 
the conflicting type defined in another translation unit has virtual table 
table with more entries
 PN_CPP_CLASS_EXTERN endpoint {
                     ^
[ 71%] Built target qpid-proton-cpp
Scanning dependencies of target codec_test
[ 71%] Building CXX object 
cpp/CMakeFiles/codec_test.dir/src/codec_test.cpp.o
[ 71%] Linking CXX executable codec_test
/opt/b8mcu_sdk/0.0.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: 
warning: libqpid-proton-proactor.so.1, needed by 
libqpid-proton-cpp.so.12.6.1, not found (try using -rpath or -rpath-link)
/opt/b8mcu_sdk/0.0.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: 
warning: libqpid-proton-core.so.10, needed by 
libqpid-proton-cpp.so.12.6.1, not found (try using -rpath or -rpath-link)
libqpid-proton-cpp.so.12.6.1: undefined reference to 
`pn_data_put_described'
libqpid-proton-cpp.so.12.6.1: undefined reference to `pn_dtag'


Any suggestions?

BTW: Is the -Wodr warning something I should worry about?

Thanks.

Regards,

Franz Hollerer

Re: Cross Compiling qpid-proton 0.30.0 with Yocto SDK

Posted by f....@schrack-seconet.com.
I found that the pull-request #187 solves the problem.

https://github.com/apache/qpid-proton/pull/187



Von:    f.hollerer@schrack-seconet.com
An:     users@qpid.apache.org
Datum:  17.12.2019 09:37
Betreff:        Cross Compiling  qpid-proton 0.30.0 with Yocto SDK



Hi,

I would like to cross compile qpid-proton version 0.30.0 for an NXP i.MX7D 

(Arm Cortex A7 core) using the cross compiler toolchain generated with 
yocto.

Unfortunately, the build fails when it comes to linking the C++ library 
against libqpid-proton-proactor.so. The library libqpid-proton-proactor.so 

itself was successfully built and resided in the 'c' subdirectory. It 
seems that the build process does not find the library it builds itself a 
few steps before.

This is how I invoked cmake and make:

$ $OECORE_NATIVE_SYSROOT/usr/bin/cmake 
-DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake 

-DCMAKE_INSTALL_PREFIX=/opt/qpid -DSYSINSTALL_BINDINGS=OFF 
-DBUILD_PYTHON=OFF -DBUILD_RUBY=OFF ..
$ make

This is the output of the build process where it fails.

[ 70%] Building CXX object 
cpp/CMakeFiles/qpid-proton-cpp.dir/src/connect_config_dummy.cpp.o
[ 71%] Linking CXX shared library libqpid-proton-cpp.so
/home/hof/work/qpid-proton/cpp/include/proton/./endpoint.hpp:37:21: 
warning: virtual table of type 'struct endpoint' violates one definition 
rule [-Wodr]
 PN_CPP_CLASS_EXTERN endpoint {
                     ^
/home/hof/work/qpid-proton/cpp/include/proton/./endpoint.hpp:37:21: note: 
the conflicting type defined in another translation unit has virtual table 

table with more entries
 PN_CPP_CLASS_EXTERN endpoint {
                     ^
[ 71%] Built target qpid-proton-cpp
Scanning dependencies of target codec_test
[ 71%] Building CXX object 
cpp/CMakeFiles/codec_test.dir/src/codec_test.cpp.o
[ 71%] Linking CXX executable codec_test
/opt/b8mcu_sdk/0.0.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: 

warning: libqpid-proton-proactor.so.1, needed by 
libqpid-proton-cpp.so.12.6.1, not found (try using -rpath or -rpath-link)
/opt/b8mcu_sdk/0.0.1/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: 

warning: libqpid-proton-core.so.10, needed by 
libqpid-proton-cpp.so.12.6.1, not found (try using -rpath or -rpath-link)
libqpid-proton-cpp.so.12.6.1: undefined reference to 
`pn_data_put_described'
libqpid-proton-cpp.so.12.6.1: undefined reference to `pn_dtag'


Any suggestions?

BTW: Is the -Wodr warning something I should worry about?

Thanks.

Regards,

Franz Hollerer