LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   bluez-utils cross-compiling error (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/bluez-utils-cross-compiling-error-638369/)

cloudlast 04-28-2008 07:03 AM

bluez-utils cross-compiling error
 
Hello everybody.
These days I was trying to cross-compiling the bluez bluetooth-stack to make it work on the ARM2440 platform.My cross-compiler version is arm-linux-gcc-3.4.1 and I put it in "/usr/local/arm/3.4.1/" directory. My compiler's bin file are in "/usr/local/arm/3.4.1/bin/".
I have added "/usr/local/arm/3.4.1/bin" to my PATH.
I have cross-compiled the bluez-libs-3.30 successfully using the following command:
Code:

./configure
--prefix=/ARM2440/applications/bluezport/libs
--host=arm-linux
CC=arm-linux-gcc
CPP=arm-linux-cpp
AR=arm-linux-ar
STRIP=arm-linux-strip
RANLIB=arm-linux-ranlib
LD=arm-linux-ld
make && make install

but when I try to cross-compiling the bluez-utils-3.30,I got failed.
This is command I used:
Code:

./configure
--prefix=/ARM2440/applications/bluezport/utils
--host=arm-linux
--disable-test
--disable-cups
CC=arm-linux-gcc
CPP=arm-linux-cpp
AR=arm-linux-ar
STRIP=arm-linux-strip
RANLIB=arm-linux-ranlib
LD=arm-linux-ld

here things goes right.

but when I hitted the 'make' command.
it showed the error message to me
Code:

glib-helper.c:32:33: bluetooth/bluetooth.h: No such file or directory
glib-helper.c:33:27: bluetooth/sdp.h: No such file or directory
glib-helper.c:34:31: bluetooth/sdp_lib.h: No such file or directory
glib-helper.h:24: error: parse error before "sdp_list_t"

So I copied the "bluetooth" folder that contains all relevant head files to
"/usr/local/arm/3.4.1/arm-linux/include/",so the make process went on running for a while and stopped again. The error message was:
Code:

hal-libhal.c:33:24: hal/libhal.h: No such file or directory
hal-libhal.c:40: error: parse error before '*' token

So I copied the "hal" folder that contains "libhal.h" from "/usr/include" to "/usr/local/arm/3.4.1/arm-linux/include/" . I don't know that "libhal.h" is used for what,but all the same-name file I had is the one "/usr/include/hal/libhal.h" .The make process went on running for a while and stopped again.This time the error message is showed as follows:
Code:

/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: skipping incompatible /lib/libdbus-1.so when searching for -ldbus-1
/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/bin/ld: cannot find -ldbus-1
collect2: ld returned 1 exit status
make[3]: *** [hcid] Error 1
make[3]: Leaving directory `/root/bluez-utils-3.30/hcid'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/bluez-utils-3.30/hcid'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/bluez-utils-3.30'
make: *** [all] Error 2

I don't know why the complier searched "/lib/" for "libdbus-1.so".it is my x86 host's lib...
Maybe I made some mistakes when I ran ./configure.......?
I am troubled in this error for 5 days.I had tried many ways,but they all did nothing.I really got nothing to do now. I hope somebody can help me.
Thanks a lot!

moszern 05-15-2008 04:32 PM

I just ran into the same problem. Anyone else come across this before?

This looks helpful:
http://lists.alioth.debian.org/piper...ry/021092.html

psychicist 05-16-2008 03:02 PM

The message that you're getting is actually correct, since you're building for ARM and the linker is trying to link against /lib/libdbus-1.so on your x86 host. You may have to cross-build and install dbus and hal if you haven't done so already. After that you may have to pass a "--with-libdir=/path/to/ARM/libs" flag to your bluetooth build script so libraries on your host will be ignored while building.

kaiser1871 05-07-2009 03:21 AM

Cross compil Bluez, Obexd
 
Hello,

I am trying since a few days already to cross compile Bluez, Obexd ... For
activate the bluetooth on a BCM7401 STB using the followings Toolchain :
uClibc-0.9.28-crosstools-3.4.6-19 but without success as regards I have of
errors on the newer Bluez but the cross compile of Bluez 2.25 is with
succes and errors for Obexd :

/ home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/../lib/gcc
/mipsel-linux-uclibc/3.4.6 /../../../. . / mipsel-linux-uClibc / bin / ld:
skipping incompatible / / lib/libdbus-1.so when searching for-ldbus-1
/ home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/../lib/gcc
/mipsel-linux-uclibc/3.4.6 /../../../. . / mipsel-linux-uClibc / bin / ld:
skipping incompatible / / lib/libdbus-1.a when searching for-ldbus-1
/ home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/../lib/gcc
/mipsel-linux-uclibc/3.4.6 /../../../. . / mipsel-linux-uClibc / bin / ld:
can not find-ldbus-1
collect2: ld returned 1 exit status
make [2]: *** [obexd] Error 1
make [2]: Leaving directory `/ home/kaiser/Bureau/obexd-0.11/src '
make [1]: *** [all-recursive] Error 1
make [1]: Leaving directory `/ home/kaiser/Bureau/obexd-0.11 '
make: *** [all] Error 2

Unfortunately I'm stuck and I have no idea how to solve this problem!
I configured my environment as follows:
export LDFLAGS =- Wl,-dynamic-linker / lib/ld-uClibc.so.0,-soname =
libc.so.0
export BUILD = i686-pc-linux-gnu
export CROSS_COMPILE = mipsel-uClibc -
PATH = "$ PATH: /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin /:"
export HOSTCC = gcc
export PLATFORM = mipsel-uClibc
export CC = /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/mipsel-linux-gcc
export GCC = /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/mipsel-linux-gcc
Gxx export = /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/mipsel-linux-gcc
export RANLIB = /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/mipsel-linux-
ranlib
export LD = /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/mipsel-linux-ld
nm = export /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/mipsel-linux-nm
export as = /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/mipsel-linux-as
export AR = /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/bin/mipsel-linux-ar
export LD_LIBRARY_PATH = /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/mipsel-linux-
uclibc/lib: $ LD_LIBRARY_PATH
cd obexd-0.11 /
. / configure - host = mipsel-linux-uClibc - prefix = / home / kaiser
/ Office / Obexlib / LDFLAGS = /
home/kaiser/Bureau/uclibc-0.9.28-crosstools-3.4.6-19/mipsel- linux-
uclibc/lib/ld-uClibc.so.0

To configure, it works well but I have some mistakes with the Make.

Thank you in advance for your help

kaiser1871 05-07-2009 03:37 AM

Cross compil dbus
 
Given the previous errors I had, now I try to cross compile dbus-1.0.3 because I thought that the problem may be there but I was once again another problem:
checking abstract socket namespace ... configure: error: can not run test program while cross compiling
See `config.log 'for more details.

But I have no ideas on how to turn this test, I try everything that I found on the net but without success!

I must also say that I am a beginner in Linux and Cross Compilation!

Again thank you in advance.


All times are GMT -5. The time now is 12:43 PM.