LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 04-28-2008, 07:03 AM   #1
cloudlast
LQ Newbie
 
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
Smile 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!

Last edited by cloudlast; 04-28-2008 at 09:59 PM.
 
Old 05-15-2008, 04:32 PM   #2
moszern
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
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
 
Old 05-16-2008, 03:02 PM   #3
psychicist
Member
 
Registered: Apr 2007
Posts: 80

Rep: Reputation: 15
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.
 
Old 05-07-2009, 03:21 AM   #4
kaiser1871
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
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
 
Old 05-07-2009, 03:37 AM   #5
kaiser1871
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
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.
 
  


Reply

Tags
bluetooth, bluez


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross compiling Bluez-utils for ARM deshu Linux - Software 1 03-06-2009 01:29 PM
Linking error while Cross compiling m.harshavardhan Linux - Software 0 07-31-2006 06:08 AM
alsa-utils on fc4 not compiling sf_basilix Linux - Software 13 05-09-2006 10:06 PM
BlueTooth Bluez-utils porting dubrick_vit Linux - Software 2 01-29-2006 03:08 AM
Error cross-compiling glibc, chapter 5 donbellioni Linux From Scratch 2 09-17-2004 02:12 PM


All times are GMT -5. The time now is 05:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration