ros / meta-ros

OpenEmbedded Layers for ROS 1 and ROS 2
MIT License
383 stars 252 forks source link

Error: Cross-compile ros package for beagleond black #399

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello,

Compiling newly written ros package error:

package.zip

... | /data/02_angstrom/setup-scripts/build/tmp-angstrom_v2014_12-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.9.3/ld: error: /opt/ros/indigo/lib/libroscpp.so: incompatible target | /data/02_angstrom/setup-scripts/build/tmp-angstrom_v2014_12-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.9.3/ld: error: /opt/ros/indigo/lib/librosconsole.so: incompatible target | /data/02_angstrom/setup-scripts/build/tmp-angstrom_v2014_12-glibc/sysroots/x86_64-linux/usr/libexec/arm-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.9.3/ld: error: /opt/ros/indigo/lib/librosconsole_log4cxx.so: incompatible target

Please see more detailed log in attached file and also my package. FYI: Git repo: beagle-ros: branch v1.1 |---setup-script: bfb121b555d4a6160da39d709de330b9d568170e

Thank you very much. Best regards, Huy Hoang

bulwahn commented 8 years ago

Dear Huy, your package.zip file is 166 bytes large and carries no content. In general, I feel uncomfortable to open any .zip files locally on my machine. Please provide a github fork of your development and a README how to re-construct your issue. As far as I know, beagle-ros is currently unmaintained, but probably large part of the installation can still be followed. Angstrom and meta-ros are maintained, however, no one has checked if they still are compatible with each other. meta-ros is currently only maintained against the master branch and the fido branch (as far as possible).

ghost commented 8 years ago

Dear Lukas,

Thank you very much for your reply and I'm sorry for the inconvenience zip file caused. Please let me report the issue again as below:

My target: cross-compile my C++ package for to run with ros on beaglebond black. What I did:

Step-1: Clone and configure "angstrom-v2014.12-yocto1.7". Refer: http://www.angstrom-distribution.org/building-angstrom/

Step-2: Clone "beagle-ros"

Step-3: Clone and replace "beagle-ros/recipe-ros/beginner-tutorials" by "meta-ros-example"

Step-4: Build "beginner-tutorials" by bitbake

Thank you so much for your help. Best regards, Huy Hoang

bulwahn commented 8 years ago

Dear Huy,

do you ever clone the meta-ros layer and add meta-ros to bblayers.conf? This seems to be missing completely somewhere between step 1 and step 3?

ghost commented 8 years ago

Dear Lukas,

Thank you.

do you ever clone the meta-ros layer and add meta-ros to bblayers.conf?

=> I think yes. The script clones it for me automatically.

Actually, I followed instructions in Angstrom distribution (http://www.angstrom-distribution.org/building-angstrom/) with following commands:

After that, "meta-ros" other "meta-*" are cloned and added into "bblayers.conf" as below:

LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf

changes incompatibly

LCONF_VERSION = "5" TOPDIR := "${@os.path.dirname(os.path.dirname(d.getVar('FILE', True)))}"

BBPATH = "${TOPDIR}"

BBFILES = ""

These layers hold recipe metadata not found in OE-core, but lack any machine or distro content

BASELAYERS ?= " \ ${TOPDIR}/sources/meta-openembedded/meta-oe \ ${TOPDIR}/sources/meta-openembedded/meta-efl \ ${TOPDIR}/sources/meta-openembedded/meta-gpe \ ${TOPDIR}/sources/meta-openembedded/meta-gnome \ ${TOPDIR}/sources/meta-openembedded/meta-xfce \ ${TOPDIR}/sources/meta-openembedded/meta-initramfs \ ${TOPDIR}/sources/meta-openembedded/toolchain-layer \ ${TOPDIR}/sources/meta-openembedded/meta-multimedia \ ${TOPDIR}/sources/meta-openembedded/meta-networking \ ${TOPDIR}/sources/meta-openembedded/meta-webserver \ ${TOPDIR}/sources/meta-openembedded/meta-ruby \ ${TOPDIR}/sources/meta-openembedded/meta-filesystems \ ${TOPDIR}/sources/meta-openembedded/meta-perl \ ${TOPDIR}/sources/meta-openembedded/meta-python \ ${TOPDIR}/sources/meta-kde4 \ ${TOPDIR}/sources/meta-java \ ${TOPDIR}/sources/meta-browser \ ${TOPDIR}/sources/meta-mono \ ${TOPDIR}/sources/meta-qt5 \ ${TOPDIR}/sources/meta-openembedded/meta-systemd \ ${TOPDIR}/sources/meta-ros \ ${TOPDIR}/sources/meta-uav \ ${TOPDIR}/sources/meta-telephony \ ${TOPDIR}/sources/meta-beagleboard/meta-beagleboard-extras \ ${TOPDIR}/sources/meta-photography \ ${TOPDIR}/sources/meta-ci \ ${TOPDIR}/sources/meta-intel-iot-middleware \ ${TOPDIR}/sources/meta-maker \ "

These layers hold machine specific content, aka Board Support Packages

BSPLAYERS ?= " \ ${TOPDIR}/sources/meta-beagleboard/common-bsp \ ${TOPDIR}/sources/meta-ti \ ${TOPDIR}/sources/meta-fsl-arm \ ${TOPDIR}/sources/meta-fsl-arm-extra \ ${TOPDIR}/sources/meta-nslu2 \ ${TOPDIR}/sources/meta-smartphone/meta-htc \ ${TOPDIR}/sources/meta-smartphone/meta-nokia \ ${TOPDIR}/sources/meta-smartphone/meta-openmoko \ ${TOPDIR}/sources/meta-smartphone/meta-palm \ ${TOPDIR}/sources/meta-handheld \ ${TOPDIR}/sources/meta-intel \ ${TOPDIR}/sources/meta-intel/meta-sugarbay \ ${TOPDIR}/sources/meta-intel/meta-crownbay \ ${TOPDIR}/sources/meta-intel/meta-emenlow \ ${TOPDIR}/sources/meta-intel/meta-fri2 \ ${TOPDIR}/sources/meta-intel/meta-jasperforest \ ${TOPDIR}/sources/meta-sunxi \ ${TOPDIR}/sources/meta-raspberrypi \ ${TOPDIR}/sources/meta-minnow \ ${TOPDIR}/sources/meta-dominion \ ${TOPDIR}/sources/meta-atmel \ ${TOPDIR}/sources/meta-exynos \ ${TOPDIR}/sources/meta-gumstix-community \ ${TOPDIR}/sources/meta-qualcomm \ ${TOPDIR}/sources/meta-edison \ ${TOPDIR}/sources/meta-96boards \ "

Add your overlay location to EXTRALAYERS

Make sure to have a conf/layers.conf in there

EXTRALAYERS ?= " \ ${TOPDIR}/sources/meta-linaro/meta-linaro \ ${TOPDIR}/sources/meta-linaro/meta-linaro-toolchain \ ${TOPDIR}/sources/meta-linaro/meta-aarch64 \ "

BBLAYERS = " \ ${TOPDIR}/sources/meta-angstrom \ ${BASELAYERS} \ ${BSPLAYERS} \ ${EXTRALAYERS} \ ${TOPDIR}/sources/openembedded-core/meta \ "

Thank you very much for your time. Best regards, Huy Hoang

bulwahn commented 8 years ago

Okay. Here's a first guess and some hints that might solve the problem:

It seems that when building your package bitbake links against the locally installed packages instead of the ones that should be provided by the bitbake tool chain. So avoid that error, you can try to:

I hope this helps.

ghost commented 8 years ago

Dear Lukas,

Thank you very much for your information.

=> I planned to check the suitable version and go deep into logs to understanding what happened.

However, due to the time constrain of my project, we need to go forward to next phase by using "qemu-arm-static" and "chroot" as work around solution for cross compilation. So I would like to temporarily close this issue here and I will come back to this issue later when I have more time.

Thank you very much for your help. I really appreciate it! Best regards, Huy Hoang.