LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to cross-compile bluez-utils? (https://www.linuxquestions.org/questions/linux-software-2/how-to-cross-compile-bluez-utils-638546/)

cloudlast 04-28-2008 10:02 PM

how to cross-compile bluez-utils?
 
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!

unSpawn 04-29-2008 06:24 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate of http://www.linuxquestions.org/questi...-error-638369/.


All times are GMT -5. The time now is 07:30 AM.