Discussion:
Buildroot compilation using uClibc and activating bluez
Julien COUVRAND
2013-07-09 08:57:13 UTC
Permalink
Hi,

I would like to enable Bluez packages using uClibc but i meet some dependencies with MMU.
We can't enable bluez-utils package while MMU is deactivated.

As soon as i compile Buildroot deactivating MMU dependencies into Config.in from bluez-utils package such as:

--
config BR2_PACKAGE_BLUEZ_UTILS
bool "bluez-utils"
depends on !BR2_avr32
depends on BR2_USE_WCHAR # libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib
# depends on BR2_USE_MMU # dbus
select BR2_PACKAGE_DBUS
select BR2_PACKAGE_LIBGLIB2
help
bluez utils
--

I have got following compilation errors:

--
dbus-sysdeps-util-unix.c:(.text+0x530): undefined reference to `fork'
dbus-spawn.c:(.text+0xe38): undefined reference to `fork'
dbus-spawn.c:(.text+0xea0): undefined reference to `fork'
collect2: error: ld returned 1 exit status
make[3]: *** [dbus-daemon] Error 1
make[3]: *** Waiting for unfinished jobs....
dbus-sysdeps-util-unix.c:(.text+0x530): undefined reference to `fork'
collect2: error: ld returned 1 exit status
make[3]: *** [dbus-daemon-launch-helper] Error 1
--

So, currently, using uclibc for bluez, without MMU activation, I can't compile Buildroot due dBus and the "fork".
Does it exist a way to enable bluez using uClibc avoiding Dbus issues?


Thanks in advance


Julien


Julien COUVRAND
------------------------------------------------------------------------------------

Mailto:     11 rue Pierre-Felix Delarue
                    72100 Le Mans -  FRANCE
Office:      +33 2 44 02 71 07
Mobile:    +33 6 03 49 09 04
Emailto :   julien.couvrand-0IS4wlFg1OjSUeElwK9/***@public.gmane.org
-------------------------------------------------------------------------------------
This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you.

E-mail including attachments is susceptible to data corruption, interception, unauthorized amendment, tampering and viruses, and we only send and receive emails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.
Peter Korsgaard
2013-07-09 10:50:51 UTC
Permalink
Julien> Hi,

Julien> I would like to enable Bluez packages using uClibc but i meet
Julien> some dependencies with MMU. We can't enable bluez-utils
Julien> package while MMU is deactivated.

Julien> As soon as i compile Buildroot deactivating MMU dependencies
Julien> into Config.in from bluez-utils package such as:

Julien> --
Julien> config BR2_PACKAGE_BLUEZ_UTILS
Julien> bool "bluez-utils"
Julien> depends on !BR2_avr32
Julien> depends on BR2_USE_WCHAR # libglib2
Julien> depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib
Julien> # depends on BR2_USE_MMU # dbus
Julien> select BR2_PACKAGE_DBUS
Julien> select BR2_PACKAGE_LIBGLIB2
Julien> help
Julien> bluez utils
Julien> --

Indeed, dbus really requires a MMU.

Julien> So, currently, using uclibc for bluez, without MMU activation,
Julien> I can't compile Buildroot due dBus and the "fork". Does it
Julien> exist a way to enable bluez using uClibc avoiding Dbus issues?

Well, uClibc works nicely with a MMU. What hardware platform is this,
doesn't it have a MMU?
--
Bye, Peter Korsgaard
Thomas Petazzoni
2013-07-09 10:50:37 UTC
Permalink
Dear Julien COUVRAND,
Post by Julien COUVRAND
I would like to enable Bluez packages using uClibc but i meet some dependencies with MMU.
We can't enable bluez-utils package while MMU is deactivated.
--
config BR2_PACKAGE_BLUEZ_UTILS
bool "bluez-utils"
depends on !BR2_avr32
depends on BR2_USE_WCHAR # libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib
# depends on BR2_USE_MMU # dbus
select BR2_PACKAGE_DBUS
select BR2_PACKAGE_LIBGLIB2
help
bluez utils
--
--
dbus-sysdeps-util-unix.c:(.text+0x530): undefined reference to `fork'
dbus-spawn.c:(.text+0xe38): undefined reference to `fork'
dbus-spawn.c:(.text+0xea0): undefined reference to `fork'
collect2: error: ld returned 1 exit status
make[3]: *** [dbus-daemon] Error 1
make[3]: *** Waiting for unfinished jobs....
dbus-sysdeps-util-unix.c:(.text+0x530): undefined reference to `fork'
collect2: error: ld returned 1 exit status
make[3]: *** [dbus-daemon-launch-helper] Error 1
--
So, currently, using uclibc for bluez, without MMU activation, I can't compile Buildroot due dBus and the "fork".
Does it exist a way to enable bluez using uClibc avoiding Dbus issues?
Well, as you've seen, bluez requires DBus (it's a mandatory
dependency), and DBus uses fork(). Maybe it's possible to build and
make DBus work on non-MMU platform by patching it to not use fork().
Maybe you want to check the Blackfin Buildroot repository at
http://blackfin.uclinux.org/git/?p=buildroot;a=shortlog to see if they
have dbus patches in package/dbus/ to make it work on non-MMU
platforms. If they do, don't hesitate to integrate it in Buildroot, and
send us a patch to make DBus work on non-MMU platforms.

Thanks!

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Thomas Petazzoni
2013-07-09 15:14:04 UTC
Permalink
Dear Julien COUVRAND,
Thanks Thomas
I am going to check it.
Please don't reply to me directly: keep the list Cc'ed.

Now that my network connection is working a little bit better, the
Blackfin guys indeed have a noMMU patch for D-Bus, at
http://blackfin.uclinux.org/git/?p=buildroot;a=blob;f=package/dbus/dbus-nommu.patch;h=bd1cf4c00b454634648a7d074f2f7bda009b6581;hb=HEAD.
It'd be great if you could test it, clean it up, and submit it to
Buildroot.

Just curious, which noMMU architecture are you working on?

Thanks,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Julien COUVRAND
2013-07-10 07:56:21 UTC
Permalink
Hi Thomas,

I use the following toolchain:
uClibc/elf-fdpic-v7

About the patch, we will see together the best approach to apply it in Buildroot.


Julien

-----Original Message-----
From: Thomas Petazzoni [mailto:thomas.petazzoni-wi1+55ScJUtKEb57/***@public.gmane.org]
Sent: mardi 9 juillet 2013 17:39
To: Julien COUVRAND
Cc: buildroot@
Subject: Re: [Buildroot] Buildroot compilation using uClibc and activating bluez

Dear Julien COUVRAND,
I am checking it in my environment and submit it to Buildroot if it is ok.
Ok, thanks. Note that the Blackfin patch cannot be accepted as is. This NOMMU define is non-standard, and instead a configure.ac check for fork should be added. And ideally, the patch should be submitted upstream to D-Bus so that at some point in the future, we are able to get rid of it in Buildroot.
Currently, I use an architecture with R4 ARM processor.
Nice! Which toolchain are you using? I'm really interested in improving the support for noMMU platforms in Buildroot, so don't hesitate to ask questions if needed.

Thanks,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux development, consulting, training and support.
http://free-electrons.com
Thomas Petazzoni
2013-07-10 09:04:16 UTC
Permalink
Dear Julien COUVRAND,
Post by Julien COUVRAND
uClibc/elf-fdpic-v7
Where is toolchain coming from? I wasn't aware there was FDPIC support
available for ARM noMMU.

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Loading...