Hi Sebastian

2014-03-25 21:21 GMT+01:00 Sebastian Schildt <schildt@ibr.cs.tu-bs.de>:
Hello,


You did not specify exactly how you cross-compiled, but I guess your build is broken. Unfortunately there is much more to cross-compiling than just choosig the right architecture.

 libm.so normally contains basic math functions, which defintely are available on your plattform „somehow“, however maybe they are in your uclibc (or glibc which are you using?) and not seperately or you might need to statically link them. At least it sounds like maybe you accidentally linked with a host library instead of the target, or your cross-compiling environment did not match the target.

 I have checked out that the library is there and I have found it

$VirtualBox:~/openwrt/attitude_adjustment_rPi$ locate ./ libm.so
/attitude_adjustment_rPi/build_dir/target-arm_v6_eglibc-2.15_eabi/root-brcm2708/lib/libm.so.6
/attitude_adjustment_rPi/build_dir/target-arm_v6_eglibc-2.15_eabi/toolchain/ipkg-brcm2708/libc/lib/libm.so.6
/attitude_adjustment_rPi/build_dir/toolchain-arm_v6_gcc-4.6-linaro_eglibc-2.15_eabi/eglibc-2.15-r18909-final/math/libm.so
/attitude_adjustment_rPi/build_dir/toolchain-arm_v6_gcc-4.6-linaro_eglibc-2.15_eabi/eglibc-2.15-r18909-final/math/libm.so.6
/attitude_adjustment_rPi/staging_dir/target-arm_v6_eglibc-2.15_eabi/root-brcm2708/lib/libm.so.6
/attitude_adjustment_rPi/staging_dir/toolchain-arm_v6_gcc-4.6-linaro_eglibc-2.15_eabi/lib/libm.so
/attitude_adjustment_rPi/staging_dir/toolchain-arm_v6_gcc-4.6-linaro_eglibc-2.15_eabi/lib/libm.so.6


and on my openwrt the library is present as well
root@OpenWrt:/lib# ls -la | grep libm
-rwxr-xr-x    1 root     root        615996 Mar 22  2014 libm-2.15.so
lrwxrwxrwx    1 root     root            12 Mar 22  2014 libm.so.6 -> libm-2.15.so

So then is it a matter of crosscompilation?

Thanks in advance,

Regards



There are buildroot (which is used by OpenWRT) recipes for all IBR-DTN components, which you can find here

https://github.com/ibrdtn/ibrdtn/tree/master/recipes/buildroot

If your build has not been created with buildroot you should try to make this work first. If it is, maybe describe what you needed to change to make it compile.

Just using „any“ toolchain that targets the processor (e.g. using a toolchain for A PI with Raspbian, because I think the processor is related) will most likely not work, unless you configure it to build a huge statically linked binary.


Sebastian






On 25 Mar 2014, at 19:59, Francisco Cuesta <ndarkness@gmail.com> wrote:

> Hello Juliano,
>
> Thanks for replying, the point is that I don't know what library I have to install in order to get libm.so.0 on openwrt. I mean, I think maybe my OpenWRT OS is lacking that library and I don't know which package I should install to get it.
>
> Thanks again,
>
> Regards
>
>
> 2014-03-24 18:25 GMT+01:00 Juliano <julianofischer@gmail.com>:
> Hi Francisco,
> you shall add the dir wich contains libm.so.0 to the library path.
> ( /mnt/usb/opkg/lib in my case)
>
>
> Juliano Fischer Naves
> Informatics Professor  - IFRO
> D.Sc. Student - IC/UFF/Brazil
>
> Please do not send me Microsoft Office/Apple iWork documents. Send OpenDocument instead! http://fsf.org/campaigns/opendocument/
> Document Freedom Day - Liberate your documents
> http://documentfreedom.org/ - March 26th 2014
>
>
> 2014-03-24 12:13 GMT-04:00 Francisco Cuesta <ndarkness@gmail.com>:
> Hello IBR staff,
>
> I was wondering whether you have available a version of ibr dtn  openwrt packages for broadcom 2708 chipset, it is based on arm architecture, quite similar to raspberri pi.
>
> I have seen here  http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn/wiki/download#OpenWRTrepositories  that you mention the possibility to find different architectures in your jetkins builder, however, I could find any reference to broadcom architecture there.
>
> Therefore, I tried to crosscompilie ibr dtn from source aiming to that architecture and with openwrt as OS. I got the daemon, libraries and binaries, but now I get the following error when trying to start the daemon itself.
>
> root@OpenWrt:~# dtnd
> dtnd: error while loading shared libraries: libm.so.0: cannot open shared object file: No such file or directory
>
>
> Did I miss to include some library when crosscompiling? Or I am missing it on my openwrt OS? In such a case, what libraries should I install?
>
> Thanks in advance,
>
> Regards!
>
> Below all the packages I installed listed with opgk list
>
> root@OpenWrt:/lib# opkg list
> base-files - 118.2-r39952
> blkid - 2.21.2-1
> block-mount - 0.2.0-9
> busybox - 1.19.4-6
> dnsmasq - 2.66-2
> dropbear - 2011.54-2
> e2fsprogs - 1.42.4-1
> gdb - 6.8a-4
> hotplug2 - 1.0-beta-4
> hwclock - 2.21.2-1
> iw - 3.6-1
> jshn - 2013-10-19-734d28eb1a46358743cf8837c91e5d46695c3b91
> kernel - 3.3.8-1-85fa4859c0083294a4ca10e855c97bf6
> kmod-ath - 3.3.8+2014-01-23.1-1
> kmod-ath9k-common - 3.3.8+2014-01-23.1-1
> kmod-ath9k-htc - 3.3.8+2014-01-23.1-1
> kmod-cfg80211 - 3.3.8+2014-01-23.1-1
> kmod-crypto-aes - 3.3.8-1
> kmod-crypto-arc4 - 3.3.8-1
> kmod-crypto-core - 3.3.8-1
> kmod-fs-vfat - 3.3.8-1
> kmod-hid - 3.3.8-1
> kmod-input-core - 3.3.8-1
> kmod-input-evdev - 3.3.8-1
> kmod-ipt-conntrack - 3.3.8-1
> kmod-ipt-core - 3.3.8-1
> kmod-ipt-nat - 3.3.8-1
> kmod-ipt-nathelper - 3.3.8-1
> kmod-lib-crc-ccitt - 3.3.8-1
> kmod-mac80211 - 3.3.8+2014-01-23.1-1
> kmod-nls-base - 3.3.8-1
> kmod-nls-cp437 - 3.3.8-1
> kmod-nls-iso8859-1 - 3.3.8-1
> kmod-sound-arm-bcm2835 - 3.3.8-1
> kmod-sound-core - 3.3.8-1
> kmod-usb-core - 3.3.8-1
> kmod-usb-hid - 3.3.8-1
> libblkid - 2.21.2-1
> libblobmsg-json - 2013-10-19-734d28eb1a46358743cf8837c91e5d46695c3b91
> libbsd - 0.3.0-1
> libc - 2.15-1
> libcom_err - 1.42.4-1
> libcurl - 7.29.0-1
> libdaemon - 0.14-2
> libext2fs - 1.42.4-1
> libgcc - 4.6-linaro-1
> libip4tc - 1.4.10-5
> libjson - 0.11-2
> libjson-c - 0.11-2
> liblua - 5.1.4-8
> libmount - 2.21.2-1
> libncurses - 5.7-5
> libncursesw - 5.7-5
> libnl - 2.0-1
> libnl-tiny - 0.1-3
> libopenssl - 1.0.1e-1
> libpthread - 2.15-1
> libpthread - 0.9.33.2-1
> libreadline - 5.2-2
> librpc - 0.9.32-rc2-0a2179bbc0844928f2a0ec01dba93d9b5d6d41a7
> librt - 2.15-1
> librt - 0.9.33.2-1
> libsqlite3 - 3071201-1
> libstdcpp - 4.6-linaro-1
> libubox - 2013-10-19-734d28eb1a46358743cf8837c91e5d46695c3b91
> libubus - 2013-08-08-b20a8a01c7faea5bcc9d34d10dcf7736589021b8
> libubus-lua - 2013-08-08-b20a8a01c7faea5bcc9d34d10dcf7736589021b8
> libuci - 2013-06-11.1-1
> libuci-lua - 2013-06-11.1-1
> libuuid - 2.21.2-1
> libxtables - 1.4.10-5
> lua - 5.1.4-8
> luac - 5.1.4-8
> mount-utils - 2.21.2-1
> netifd - 2013-07-16-2674941b06c1ec67f1aff1bff9212e1372106641
> opkg - 9c97d5ecd795709c8584e972bfdf3aee3a5b846d-3
> swap-utils - 2.21.2-1
> terminfo - 5.7-5
> ubus - 2013-08-08-b20a8a01c7faea5bcc9d34d10dcf7736589021b8
> ubusd - 2013-08-08-b20a8a01c7faea5bcc9d34d10dcf7736589021b8
> uci - 2013-06-11.1-1
> zlib - 1.2.7-1
>
>
>
>
> --
> !! This message is brought to you via the `ibr-dtn' mailing list.
> !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust
> !! your settings, send a mail message to <ibr-dtn-request@ibr.cs.tu-bs.de>
> !! or look at https://mail.ibr.cs.tu-bs.de/listinfo/ibr-dtn.
>
>
> --
> !! This message is brought to you via the `ibr-dtn' mailing list.
> !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust
> !! your settings, send a mail message to <ibr-dtn-request@ibr.cs.tu-bs.de>
> !! or look at https://mail.ibr.cs.tu-bs.de/listinfo/ibr-dtn.

--
!! This message is brought to you via the `ibr-dtn' mailing list.
!! Please do not reply to this message to unsubscribe. To unsubscribe or adjust
!! your settings, send a mail message to <ibr-dtn-request@ibr.cs.tu-bs.de>
!! or look at https://mail.ibr.cs.tu-bs.de/listinfo/ibr-dtn.