LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-29-2015, 09:44 AM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641

Re #15.

? What' the target OS ?

! No OS uses a glib-2 version of tomorrow, and a six year old version of BlueZ.

( Actually no OS`s are using glib-2.45.6 ! ( Fedora 24, may be : Year 2016.))

** You are supposed to use the same glib2 version as the target OS.
Else : bluez-* will not work.


-
 
1 members found this post helpful.
Old 08-31-2015, 01:14 AM   #17
_n00b
Member
 
Registered: Aug 2015
Posts: 35

Original Poster
Rep: Reputation: Disabled
Target OS is Linux 2.6.35.3-571 as i wrote on Post #3.
But how can i cross compile glib in general, without the error message "configure: error: cannot run test program while cross compiling" appearing at configure? I don't think that i can solve this by using another version of glib, the same error will appear again.

Thx for the hint that i need a lower version of glib.

Last edited by _n00b; 08-31-2015 at 02:05 AM.
 
Old 08-31-2015, 03:54 AM   #18
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #17.

OK, unknown OS name. "2.6.35.3-xxx" is the kernel version.
"2.6.35.3" indicates year 2010. Like the bluez-3.36 : Year 2009.


GLIB version : The command is $ pkg-config --modversion glib-2.0
.. When you know the version, we will probably find a way to disable the tests.


-

Last edited by knudfl; 08-31-2015 at 03:56 AM.
 
1 members found this post helpful.
Old 08-31-2015, 04:00 AM   #19
_n00b
Member
 
Registered: Aug 2015
Posts: 35

Original Poster
Rep: Reputation: Disabled
I run glib version 2.24.1 on the machine where i build. I can't figure out the glib version of the target machine, the command does not work there, unfortunattely it is a very limited machine which does not know many commands, i doubt that glib is even installed there.
Is it necessary to install glib on the target machine?

Edit: Sorry for the basic questions, but i only have 2 years experience with linux, and this is my first time i try to cross compile something. Thank you for your help this far! I really appreciate it.

Last edited by _n00b; 08-31-2015 at 04:17 AM.
 
Old 08-31-2015, 05:13 AM   #20
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #15.

'glib-2.24.2' is probably OK (year 2010) : glib-2.24.2.tar.gz
http://gensho.acc.umu.se/mirror/gnom...-2.24.2.tar.gz

Cross_Compiling_BlueZ.... ,,, you can start here ...
http://wiki.beyondlogic.org/index.ph..._tools_for_ARM


By the way, which old gadgets is it that your ancient bluez**-3.3.6 is going to support ?
.. I would expect that a recent BlueZ were to be used ? ?


-
 
1 members found this post helpful.
Old 08-31-2015, 05:45 AM   #21
_n00b
Member
 
Registered: Aug 2015
Posts: 35

Original Poster
Rep: Reputation: Disabled
It's a small device from my company, which is used to log data from it's inputs and displays them on a webinterface. I tried bluez-***3.36 because i failed to configure bluez-5.33.

I already know this guide, but there is one problem, my sysadmin said that i am not allowed to install anything, he said it is possible to do it without installation, if i just link everything proberly. This is true, i did my research and found out how to link glib and dbus for configure bluez-5.33. But i get an error on configure:

./configure \
GLIB_CFLAGS=-I/bluetooth/glib-2.30.3/glib/ \
GLIB_LIBS=-L/bluetooth/glib-2.30.3/glib/.libs \
DBUS_CFLAGS=-I/bluetooth/dbus-1.9.18/dbus/ \
DBUS_LIBS=-L/bluetooth/dbus-1.9.18/dbus/.libs \
--host=arm-linux


checking for DBUS... yes
checking D-Bus configuration directory... /etc
checking D-Bus system bus services dir... configure: error: D-Bus system bus services directory is required


I am really stucked right now, nothing seems to work.

Update 1

I tried to add the option: --disable-dbus
But it seems to be necessary:

./configure \
GLIB_CFLAGS=-I/bluetooth/glib-2.30.3/glib/ \
GLIB_LIBS=-L/bluetooth/glib-2.30.3/glib/.libs \
--disable-dbus \
--host=arm-linux

checking for DBUS... no
configure: error: D-Bus >= 1.6 is required

Update 2

By executing "./configure --help" if found this option:

--with-dbussystembusdir=DIR
path to D-Bus system bus services directory


But which path can i set?

Update 2.1

I used the path: /bluetooth/dbus-1.10.0/

The error, dissapeared. Now i get this error: configure: error: libudev >= 172 is required
I will do my research.

Last edited by _n00b; 09-02-2015 at 01:30 AM. Reason: Added Color
 
Old 09-02-2015, 01:29 AM   #22
_n00b
Member
 
Registered: Aug 2015
Posts: 35

Original Poster
Rep: Reputation: Disabled
I used this option: --disable-udev
Now the libudev >= 172 error is not appearing anymore.
But i get:
checking readline/readline.h usability... no
checking readline/readline.h presence... no
checking for readline/readline.h... no
configure: error: readline header files are required


According to "askubuntu.com" i need to install this package: libreadline-dev (GNU readline and history libraries, development files)

i don't know how to solve it without installing this package. Is it even possible?
 
Old 09-02-2015, 02:09 AM   #23
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #22.

About libudev, glib-2.30.3 : Please use the mentioned glib-2.24.2 : See #20 !


Readline : If the `readline' headers only are required :
You don't have to cross-compile `readline', this will do :
$ sudo apt-get install libreadline-dev

But please remember that everything else must be compiled for arm or --disabled.
So I guess you should try with --disable-python --disable-perl ?
!! Important : The zlib used for glib-2 must be cross-compiled beforehand.


-
 
1 members found this post helpful.
Old 09-02-2015, 02:43 AM   #24
_n00b
Member
 
Registered: Aug 2015
Posts: 35

Original Poster
Rep: Reputation: Disabled
BlueZ 5.33 requires a glib version >= 2.29, thats why i choiced 2.30.
I have an idea, i will install my own linux machine where i can install and update whatever i need to, then it should work. I will report any updates.

Last edited by _n00b; 09-02-2015 at 02:45 AM.
 
Old 09-04-2015, 07:55 AM   #25
_n00b
Member
 
Registered: Aug 2015
Posts: 35

Original Poster
Rep: Reputation: Disabled
Ok i followed the guide, but i get this error while trying to build expat.

Quote:
xmlwf/xmlwf.o: file not recognized: File format not recognized
Does someone know how this is caused and how to solve this?
 
Old 09-04-2015, 08:18 AM   #26
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #25.
Quote:
I get this error while trying to build expat
I guess you mean cross-compiling expat ?

? Which expat version ? ?

May be you forgot to set the linker ? $ export LD=arm***


-

Last edited by knudfl; 09-04-2015 at 08:28 AM.
 
Old 09-04-2015, 08:41 AM   #27
_n00b
Member
 
Registered: Aug 2015
Posts: 35

Original Poster
Rep: Reputation: Disabled
Ah sry, yes i mean cross compile of course. I use the same versions as in guide.
I was able to compile it in the meanwhile. I've deleted all files and made a new fresh start but now i use "arm-none-linux-gnueabi" instead of "arm-linux-gnueabi" like used in the guide.

But i ran into now a problem on installing libical, in the guide it says that i need to install g++-arm-linux-gnueabi.
But if i execute: sudo apt-get install g++-arm-linux-gnueabi
Then i get: packet not found.

And if i skip it and procceed with cmake -DCMAKE_INSTALL_PREFIX=/usr/arm-none-linux-gnueabi
Then i get:
Quote:
The C compiler "/opt/FriendlyARM/toolschain/4.4.3/bin/arm-none-linux-gnueabi-gcc" is not
able to compile a simple test program
-- Configuring incomplete, errors occurred!
Update
Solved, i executed the command with sudo cmake -DCMAKE_INSTALL_PREFIX=/usr/arm-none-linux-gnueabi
this worked!

Update
But if i try make, then i get:
cannot find -lexpat

Last edited by _n00b; 09-04-2015 at 08:51 AM.
 
Old 09-04-2015, 09:03 AM   #28
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #27.
Quote:
$ sudo apt-get install g++-arm-linux-gnueabi
? Which OS are you using ?
a) Please show the reply from the command $ uname -m
b) $ cat /etc/issue

The install command for 'g++-arm-linux-gnueabi' is :
$ sudo apt-get update && sudo apt-get install g++-arm-linux-gnueabi


-

Last edited by knudfl; 09-04-2015 at 09:07 AM.
 
1 members found this post helpful.
Old 09-04-2015, 09:08 AM   #29
_n00b
Member
 
Registered: Aug 2015
Posts: 35

Original Poster
Rep: Reputation: Disabled
I am using Kali Linux on a VMWARE.
$ uname -m Output: x86_64
$ cat /etc/issue Output: Kali GNU/Linux 1.1.0 \n \l

This is the output of $ locate expat, maybe it helps to diagnose the problem:

Code:
/lib/x86_64-linux-gnu/libexpat.so.1
/lib/x86_64-linux-gnu/libexpat.so.1.6.0
/usr/include/expat.h
/usr/include/expat_config.h
/usr/include/expat_external.h
/usr/include/python2.7/pyexpat.h
/usr/lib/python2.6/dist-packages/dbus/_expat_introspect_parser.py
/usr/lib/python2.6/lib-dynload/pyexpat.so
/usr/lib/python2.6/xml/dom/expatbuilder.py
/usr/lib/python2.6/xml/parsers/expat.py
/usr/lib/python2.6/xml/sax/expatreader.py
/usr/lib/python2.7/dist-packages/dbus/_expat_introspect_parser.py
/usr/lib/python2.7/lib-dynload/pyexpat.so
/usr/lib/python2.7/xml/dom/expatbuilder.py
/usr/lib/python2.7/xml/parsers/expat.py
/usr/lib/python2.7/xml/sax/expatreader.py
/usr/lib/python3.2/xml/dom/expatbuilder.py
/usr/lib/python3.2/xml/parsers/expat.py
/usr/lib/python3.2/xml/sax/expatreader.py
/usr/lib/x86_64-linux-gnu/libexpat.a
/usr/lib/x86_64-linux-gnu/libexpat.la
/usr/lib/x86_64-linux-gnu/libexpat.so
/usr/lib/x86_64-linux-gnu/libexpatw.a
/usr/lib/x86_64-linux-gnu/libexpatw.la
/usr/lib/x86_64-linux-gnu/libexpatw.so
/usr/lib/x86_64-linux-gnu/libexpatw.so.1
/usr/lib/x86_64-linux-gnu/libexpatw.so.1.6.0
/usr/lib/x86_64-linux-gnu/pkgconfig/expat.pc
/usr/share/aclocal/expat.m4
/usr/share/doc/libexpat1
/usr/share/doc/libexpat1-dev
/usr/share/doc/libxml-sax-expat-perl
/usr/share/doc/libexpat1/changelog.Debian.gz
/usr/share/doc/libexpat1/changelog.gz
/usr/share/doc/libexpat1/copyright
/usr/share/doc/libexpat1-dev/README.gz
/usr/share/doc/libexpat1-dev/changelog.Debian.gz
/usr/share/doc/libexpat1-dev/changelog.gz
/usr/share/doc/libexpat1-dev/copyright
/usr/share/doc/libexpat1-dev/examples
/usr/share/doc/libexpat1-dev/expat.html
/usr/share/doc/libexpat1-dev/examples/elements.c
/usr/share/doc/libexpat1-dev/examples/outline.c
/usr/share/doc/libexpat1-dev/expat.html/expat.png
/usr/share/doc/libexpat1-dev/expat.html/index.html
/usr/share/doc/libexpat1-dev/expat.html/reference.html
/usr/share/doc/libexpat1-dev/expat.html/style.css
/usr/share/doc/libexpat1-dev/expat.html/valid-xhtml10.png
/usr/share/doc/libexpat1-dev/expat.html/xmlwf.1.gz
/usr/share/doc/libexpat1-dev/expat.html/xmlwf.sgml.gz
/usr/share/doc/libxml-sax-expat-perl/changelog.Debian.gz
/usr/share/doc/libxml-sax-expat-perl/changelog.gz
/usr/share/doc/libxml-sax-expat-perl/copyright
/usr/share/doc/libxml-sax-expat-perl/examples
/usr/share/doc/libxml-sax-expat-perl/examples/counter.pl
/usr/share/doc/texlive-doc/latex/regexpatch
/usr/share/doc/texlive-doc/latex/regexpatch/README
/usr/share/doc/texlive-doc/latex/regexpatch/regexpatch.pdf
/usr/share/doc/texlive-latex-extra-doc/latex/regexpatch
/usr/share/doc/texlive-latex-extra-doc/latex/regexpatch/README
/usr/share/doc/texlive-latex-extra-doc/latex/regexpatch/regexpatch.pdf
/usr/share/doc-base/expat
/usr/share/ikat/pyexpat.so
/usr/share/lintian/overrides/libxml-sax-expat-perl
/usr/share/pyshared/dbus/_expat_introspect_parser.py
/usr/share/texlive/texmf-dist/tex/latex/regexpatch
/usr/share/texlive/texmf-dist/tex/latex/regexpatch/regexpatch.sty
/var/lib/dpkg/info/libexpat1-dev.list
/var/lib/dpkg/info/libexpat1-dev.md5sums
/var/lib/dpkg/info/libexpat1:amd64.list
/var/lib/dpkg/info/libexpat1:amd64.md5sums
/var/lib/dpkg/info/libexpat1:amd64.postinst
/var/lib/dpkg/info/libexpat1:amd64.postrm
/var/lib/dpkg/info/libexpat1:amd64.shlibs
/var/lib/dpkg/info/libexpat1:amd64.symbols
/var/lib/dpkg/info/libxml-sax-expat-perl.list
/var/lib/dpkg/info/libxml-sax-expat-perl.md5sums
/var/lib/dpkg/info/libxml-sax-expat-perl.postinst
/var/lib/dpkg/info/libxml-sax-expat-perl.prerm
I tried your command to install g++-arm-linux-gnueabi, it first updated and then tried to install, but it failed with the same error: packet not found

Edit
I also tried to create a symlink to libexpat.so.1 like this:

First i navigated into /lib/x86_64-linux-gnu/
$ ln -s ./libexpat.so.1 ./libexpat.so

Last edited by _n00b; 09-07-2015 at 01:10 AM. Reason: Added additional information at the bottom
 
Old 09-04-2015, 09:20 AM   #30
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #29.

A file list / any list : Please use CODE Tags, instead of QUOTE Tags :
[code]list text[/code]
Editing post #29 : That's the 'Edit' button in post #29.
.. Or delete the list : Is a copy of the OS expat files, not arm !


No 'g++-arm-linux-gnueabi' : Please use a regular OS.
Kali Linux is a live-cd meant for forensics only.

I know you can also install the OS,
but do not expect all required packages to be available.


-

Last edited by knudfl; 09-04-2015 at 09:22 AM.
 
  


Reply

Tags
bluetooth, bluez, cross-compile, crostool-ng



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bluez-utils cross-compiling error cloudlast Linux - Embedded & Single-board computer 5 08-27-2015 03:10 AM
Compiling and Deploying Bluez 4.x (Bluetooth Protocol Stack) linuxbawks Linux - Software 3 08-04-2013 03:02 PM
Error in cross-compiling bluez-utils mrmuds Linux - Wireless Networking 0 06-30-2009 05:49 AM
Bluez 3.36 cross compiling + cannot find library kewl Linux - Software 1 06-17-2009 12:47 PM
Cross compiling Bluez-utils for ARM deshu Linux - Software 1 03-06-2009 01:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration