All of lore.kernel.org
 help / color / mirror / Atom feed
* Building BlueZ from git in Yocto
@ 2018-03-21 15:15 Alan Martinovic
  2018-03-21 15:23 ` Burton, Ross
  2018-03-21 15:27 ` [yocto] " Burton, Ross
  0 siblings, 2 replies; 7+ messages in thread
From: Alan Martinovic @ 2018-03-21 15:15 UTC (permalink / raw)
  To: Yocto-mailing-list; +Cc: linux-bluetooth, Luiz Augusto von Dentz

[-- Attachment #1: Type: text/plain, Size: 3833 bytes --]

Started this issue a few days ago thinking it was a problem with
the bluez flags. I guess it might still be given it tries to build obex
even when it's been configured that is shouldn't...

The exact issue seems to point it's a Yocto related
or might be both (hence both lists). I have configured
BlueZ to build without any flags.

In terms of BlueZ code this means:

    git clone https://git.kernel.org/pub/scm/bluetooth/bluez.git
    cd bluez
    ./bootstrap
    make

This is built correctly for x86.

Trying to replicate that to Yocto, I've extended the recipe to
not to pass any feature configuration flags:

    $ bitbake bluez5 -e | grep EXTRA_OECONF
    ...
    EXTRA_OECONF=""

Before hand did all the steps so that BlueZ is correctly pulled
from master, and no patches from Yocto are applied to it.

Building it with Yocto results in the mentioned error:

| ../git/src/genbuiltin hostname wiimote autopair policy   a2dp avrcp
network input hog  gap scanparam deviceinfo  battery > src/builtin.h
| ../git/obexd/src/genbuiltin filesystem bluetooth  opp ftp irmc pbap mas
mns > obexd/src/builtin.h
| /bin/bash: obexd/src/builtin.h: No such file or directory
| Makefile:9431: recipe for target 'obexd/src/builtin.h' failed
| make: *** [obexd/src/builtin.h] Error 1
| make: *** Waiting for unfinished jobs....
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.


It seems that for some reason in Yocto, make can't redirect into
`obexd/src/builtin.h` while
it does so successfully for native build.

Open for comments/critics on how to diagnose this.... :)

Be Well,
Alan





On Fri, Mar 16, 2018 at 5:13 PM, Luiz Augusto von Dentz <
luiz.dentz@gmail.com> wrote:

> Hi Alan,
>
> On Fri, Mar 16, 2018 at 4:50 PM, Alan Martinovic
> <alan.martinovic@senic.com> wrote:
> > Hi,
> > I'm trying to cross compile a BLE BlueZ master.
> > Am having build issues pointing to obex.
> > I'm building it using Yocto but have stripped it down
> > to the essentials:
> >
> > ./configure
> >   --build=x86_64-linux
> >   --host=arm-linux-gnueabi
> >   --target=arm-linux-gnueabi
> >   --prefix=/usr
> >   --exec_prefix=/usr
> >   --bindir=/usr/bin
> >   --sbindir=/usr/sbin
> >   --libexecdir=/usr/libexec
> >   --datadir=/usr/share
> >   --sysconfdir=/etc
> >   --sharedstatedir=/com
> >   --localstatedir=/var
> >   --libdir=/usr/lib
> >   --includedir=/usr/include
> >   --oldincludedir=/usr/include
> >   --infodir=/usr/share/info
> >   --mandir=/usr/share/man
> >   --disable-silent-rules
> >   --disable-dependency-tracking
> >   --with-libtool-sysroot=/home/alan/senic-os/build/tmp-glibc/
> work/cortexa7hf-neon-vfpv4-senic-linux-gnueabi/bluez5/5.
> 49+gitAUTOINC+969dfae9a7-r0/recipe-sysroot
> >   --enable-test
> >   --enable-datafiles
> >   --enable-library
> >   --enable-a2dp
> >   --enable-avrcp
> >   --disable-cups
> >   --enable-deprecated
> >   --disable-health
> >   --enable-hid
> >   --enable-hog
> >   --disable-midi
> >   --enable-network
> >   --disable-nfc
> >   --disable-obex
> >   --enable-client
> >   --disable-sap
> >   --disable-sixaxis
> >   --enable-systemd
> >   --disable-testing
> >   --disable-threads
> >   --enable-tools
> > make -j 16
> >
> > This results in a build error:
> >
> >  ../git/obexd/src/genbuiltin filesystem bluetooth  opp ftp  mas mns >
> > obexd/src/builtin.h
> >  /bin/bash: obexd/src/builtin.h: No such file or directory
> >  Makefile:9431: recipe for target 'obexd/src/builtin.h' failed
> >
> >
> > Given that I don't need it for BLE, what else is required
> > besides "--disable-obex" to bypass this error?
>
> Obviously, it is a bug in the way we handle --disable-obex so we will
> need to fix it.
>
> --
> Luiz Augusto von Dentz
>

[-- Attachment #2: Type: text/html, Size: 5422 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Building BlueZ from git in Yocto
  2018-03-21 15:15 Building BlueZ from git in Yocto Alan Martinovic
@ 2018-03-21 15:23 ` Burton, Ross
  2018-03-21 15:35   ` Alan Martinovic
  2018-03-21 15:27 ` [yocto] " Burton, Ross
  1 sibling, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2018-03-21 15:23 UTC (permalink / raw)
  To: Alan Martinovic
  Cc: Yocto-mailing-list, Luiz Augusto von Dentz, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]

On 21 March 2018 at 15:15, Alan Martinovic <alan.martinovic@senic.com>
wrote:

>
> Building it with Yocto results in the mentioned error:
>
> | ../git/src/genbuiltin hostname wiimote autopair policy   a2dp avrcp
> network input hog  gap scanparam deviceinfo  battery > src/builtin.h
> | ../git/obexd/src/genbuiltin filesystem bluetooth  opp ftp irmc pbap mas
> mns > obexd/src/builtin.h
> | /bin/bash: obexd/src/builtin.h: No such file or directory
> | Makefile:9431: recipe for target 'obexd/src/builtin.h' failed
> | make: *** [obexd/src/builtin.h] Error 1
> | make: *** Waiting for unfinished jobs....
> | ERROR: oe_runmake failed
> | WARNING: exit code 1 from a shell command.
>
>
> It seems that for some reason in Yocto, make can't redirect into
> `obexd/src/builtin.h` while
> it does so successfully for native build.
>

Yocto will be doing an out-of-tree build with high parallelism, neither of
which you are likely doing yourself.

The hint is "no such file or directory" for a file it is writing *to*.
This means the parent doesn't exist, in this case obexd/src/.

This is a typical race in out-of-tree and parallel builds, where genbuiltin
is racing against other commands to create the directory.  The fix is to
ensure that whatever rule calls genbuiltin actually does a mkdir first.

We have a fix for this already in oe-core:

http://git.openembedded.org/openembedded-core/tree/meta/
recipes-connectivity/bluez5/bluez5/out-of-tree.patch

So I imagine you're using an old release of Yocto.  I sent this patch to
the linux-bluetooth list in April 2016 but it was either moderated away or
missed.

Ross

[-- Attachment #2: Type: text/html, Size: 2769 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [yocto] Building BlueZ from git in Yocto
  2018-03-21 15:15 Building BlueZ from git in Yocto Alan Martinovic
  2018-03-21 15:23 ` Burton, Ross
@ 2018-03-21 15:27 ` Burton, Ross
  1 sibling, 0 replies; 7+ messages in thread
From: Burton, Ross @ 2018-03-21 15:27 UTC (permalink / raw)
  To: linux-bluetooth

On 21 March 2018 at 15:15, Alan Martinovic <alan.martinovic@senic.com> wrote:
> Building it with Yocto results in the mentioned error:
>
> | ../git/src/genbuiltin hostname wiimote autopair policy   a2dp avrcp network input hog  gap scanparam deviceinfo  battery > src/builtin.h
> | ../git/obexd/src/genbuiltin filesystem bluetooth  opp ftp irmc pbap mas mns > obexd/src/builtin.h
> | /bin/bash: obexd/src/builtin.h: No such file or directory
> | Makefile:9431: recipe for target 'obexd/src/builtin.h' failed
> | make: *** [obexd/src/builtin.h] Error 1
> | make: *** Waiting for unfinished jobs....
> | ERROR: oe_runmake failed
> | WARNING: exit code 1 from a shell command.
>
>
> It seems that for some reason in Yocto, make can't redirect into `obexd/src/builtin.h` while
> it does so successfully for native build.

Yocto will be doing an out-of-tree build with high parallelism,
neither of which you are likely doing yourself.

The hint is "no such file or directory" for a file it is writing *to*.
This means the parent doesn't exist, in this case obexd/src/.

This is a typical race in out-of-tree and parallel builds, where
genbuiltin is racing against other commands to create the directory.
The fix is to ensure that whatever rule calls genbuiltin actually does
a mkdir first.

We have a fix for this already in oe-core:

http://git.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch

So I imagine you're using an old release of Yocto.  I sent this patch
to the linux-bluetooth list in April 2016 but it was either moderated
away or missed.

Ross

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Building BlueZ from git in Yocto
  2018-03-21 15:23 ` Burton, Ross
@ 2018-03-21 15:35   ` Alan Martinovic
  2018-03-21 15:39     ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Martinovic @ 2018-03-21 15:35 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Yocto-mailing-list

Hey Ross, thanks for the clarification.

The issues reoccurred because I modified the recipe not to include any patches,
falsely assuming that all of them were BlueZ backports and none is actually
a Yocto specific change.

On Wed, Mar 21, 2018 at 4:23 PM, Burton, Ross <ross.burton@intel.com> wrote:
> On 21 March 2018 at 15:15, Alan Martinovic <alan.martinovic@senic.com>
> wrote:
>>
>>
>> Building it with Yocto results in the mentioned error:
>>
>> | ../git/src/genbuiltin hostname wiimote autopair policy   a2dp avrcp
>> network input hog  gap scanparam deviceinfo  battery > src/builtin.h
>> | ../git/obexd/src/genbuiltin filesystem bluetooth  opp ftp irmc pbap mas
>> mns > obexd/src/builtin.h
>> | /bin/bash: obexd/src/builtin.h: No such file or directory
>> | Makefile:9431: recipe for target 'obexd/src/builtin.h' failed
>> | make: *** [obexd/src/builtin.h] Error 1
>> | make: *** Waiting for unfinished jobs....
>> | ERROR: oe_runmake failed
>> | WARNING: exit code 1 from a shell command.
>>
>>
>> It seems that for some reason in Yocto, make can't redirect into
>> `obexd/src/builtin.h` while
>> it does so successfully for native build.
>
>
> Yocto will be doing an out-of-tree build with high parallelism, neither of
> which you are likely doing yourself.
>
> The hint is "no such file or directory" for a file it is writing *to*.  This
> means the parent doesn't exist, in this case obexd/src/.
>
> This is a typical race in out-of-tree and parallel builds, where genbuiltin
> is racing against other commands to create the directory.  The fix is to
> ensure that whatever rule calls genbuiltin actually does a mkdir first.
>
> We have a fix for this already in oe-core:
>
> http://git.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch
>
> So I imagine you're using an old release of Yocto.  I sent this patch to the
> linux-bluetooth list in April 2016 but it was either moderated away or
> missed.
>
> Ross


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Building BlueZ from git in Yocto
  2018-03-21 15:35   ` Alan Martinovic
@ 2018-03-21 15:39     ` Burton, Ross
  2018-03-21 15:47       ` Alan Martinovic
  0 siblings, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2018-03-21 15:39 UTC (permalink / raw)
  To: Alan Martinovic; +Cc: Yocto-mailing-list

If you look at the patch headers, you'll see that none of them are
tagged as backports.

Ross

On 21 March 2018 at 15:35, Alan Martinovic <alan.martinovic@senic.com> wrote:
> Hey Ross, thanks for the clarification.
>
> The issues reoccurred because I modified the recipe not to include any patches,
> falsely assuming that all of them were BlueZ backports and none is actually
> a Yocto specific change.
>
> On Wed, Mar 21, 2018 at 4:23 PM, Burton, Ross <ross.burton@intel.com> wrote:
>> On 21 March 2018 at 15:15, Alan Martinovic <alan.martinovic@senic.com>
>> wrote:
>>>
>>>
>>> Building it with Yocto results in the mentioned error:
>>>
>>> | ../git/src/genbuiltin hostname wiimote autopair policy   a2dp avrcp
>>> network input hog  gap scanparam deviceinfo  battery > src/builtin.h
>>> | ../git/obexd/src/genbuiltin filesystem bluetooth  opp ftp irmc pbap mas
>>> mns > obexd/src/builtin.h
>>> | /bin/bash: obexd/src/builtin.h: No such file or directory
>>> | Makefile:9431: recipe for target 'obexd/src/builtin.h' failed
>>> | make: *** [obexd/src/builtin.h] Error 1
>>> | make: *** Waiting for unfinished jobs....
>>> | ERROR: oe_runmake failed
>>> | WARNING: exit code 1 from a shell command.
>>>
>>>
>>> It seems that for some reason in Yocto, make can't redirect into
>>> `obexd/src/builtin.h` while
>>> it does so successfully for native build.
>>
>>
>> Yocto will be doing an out-of-tree build with high parallelism, neither of
>> which you are likely doing yourself.
>>
>> The hint is "no such file or directory" for a file it is writing *to*.  This
>> means the parent doesn't exist, in this case obexd/src/.
>>
>> This is a typical race in out-of-tree and parallel builds, where genbuiltin
>> is racing against other commands to create the directory.  The fix is to
>> ensure that whatever rule calls genbuiltin actually does a mkdir first.
>>
>> We have a fix for this already in oe-core:
>>
>> http://git.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch
>>
>> So I imagine you're using an old release of Yocto.  I sent this patch to the
>> linux-bluetooth list in April 2016 but it was either moderated away or
>> missed.
>>
>> Ross


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Building BlueZ from git in Yocto
  2018-03-21 15:39     ` Burton, Ross
@ 2018-03-21 15:47       ` Alan Martinovic
  2018-03-21 15:48         ` Alexander Kanavin
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Martinovic @ 2018-03-21 15:47 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Yocto-mailing-list

When you say "tagged as backports" are you referring to the Upstream-Status?

So this is a backport patch:
    Upstream-Status: Accepted
[https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=76255f73
   2d68aef2b90d36d9c7be51a9e1739ce7]

but these two aren't yet or never will be:
    Upstream-Status: Submitted
    Upstream-Status: Denied

On Wed, Mar 21, 2018 at 4:39 PM, Burton, Ross <ross.burton@intel.com> wrote:
> If you look at the patch headers, you'll see that none of them are
> tagged as backports.
>
> Ross
>
> On 21 March 2018 at 15:35, Alan Martinovic <alan.martinovic@senic.com> wrote:
>> Hey Ross, thanks for the clarification.
>>
>> The issues reoccurred because I modified the recipe not to include any patches,
>> falsely assuming that all of them were BlueZ backports and none is actually
>> a Yocto specific change.
>>
>> On Wed, Mar 21, 2018 at 4:23 PM, Burton, Ross <ross.burton@intel.com> wrote:
>>> On 21 March 2018 at 15:15, Alan Martinovic <alan.martinovic@senic.com>
>>> wrote:
>>>>
>>>>
>>>> Building it with Yocto results in the mentioned error:
>>>>
>>>> | ../git/src/genbuiltin hostname wiimote autopair policy   a2dp avrcp
>>>> network input hog  gap scanparam deviceinfo  battery > src/builtin.h
>>>> | ../git/obexd/src/genbuiltin filesystem bluetooth  opp ftp irmc pbap mas
>>>> mns > obexd/src/builtin.h
>>>> | /bin/bash: obexd/src/builtin.h: No such file or directory
>>>> | Makefile:9431: recipe for target 'obexd/src/builtin.h' failed
>>>> | make: *** [obexd/src/builtin.h] Error 1
>>>> | make: *** Waiting for unfinished jobs....
>>>> | ERROR: oe_runmake failed
>>>> | WARNING: exit code 1 from a shell command.
>>>>
>>>>
>>>> It seems that for some reason in Yocto, make can't redirect into
>>>> `obexd/src/builtin.h` while
>>>> it does so successfully for native build.
>>>
>>>
>>> Yocto will be doing an out-of-tree build with high parallelism, neither of
>>> which you are likely doing yourself.
>>>
>>> The hint is "no such file or directory" for a file it is writing *to*.  This
>>> means the parent doesn't exist, in this case obexd/src/.
>>>
>>> This is a typical race in out-of-tree and parallel builds, where genbuiltin
>>> is racing against other commands to create the directory.  The fix is to
>>> ensure that whatever rule calls genbuiltin actually does a mkdir first.
>>>
>>> We have a fix for this already in oe-core:
>>>
>>> http://git.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/bluez5/bluez5/out-of-tree.patch
>>>
>>> So I imagine you're using an old release of Yocto.  I sent this patch to the
>>> linux-bluetooth list in April 2016 but it was either moderated away or
>>> missed.
>>>
>>> Ross


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Building BlueZ from git in Yocto
  2018-03-21 15:47       ` Alan Martinovic
@ 2018-03-21 15:48         ` Alexander Kanavin
  0 siblings, 0 replies; 7+ messages in thread
From: Alexander Kanavin @ 2018-03-21 15:48 UTC (permalink / raw)
  To: Alan Martinovic, Burton, Ross; +Cc: Yocto-mailing-list

On 03/21/2018 05:47 PM, Alan Martinovic wrote:
> When you say "tagged as backports" are you referring to the Upstream-Status?
> 
> So this is a backport patch:
>      Upstream-Status: Accepted
> [https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=76255f73
>     2d68aef2b90d36d9c7be51a9e1739ce7]
> 
> but these two aren't yet or never will be:
>      Upstream-Status: Submitted
>      Upstream-Status: Denied

See here for explanations:
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations:_Upstream-Status

In either case, do not rely on Upstream-Status when deciding what to 
drop and what to keep. The only authority is actual code: if it already 
contains the patch (or, in rare cases, resolves the issue in a different 
way), you can drop it. Otherwise you most likely need to keep it, 
rebasing as needed.

Alex


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-21 15:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21 15:15 Building BlueZ from git in Yocto Alan Martinovic
2018-03-21 15:23 ` Burton, Ross
2018-03-21 15:35   ` Alan Martinovic
2018-03-21 15:39     ` Burton, Ross
2018-03-21 15:47       ` Alan Martinovic
2018-03-21 15:48         ` Alexander Kanavin
2018-03-21 15:27 ` [yocto] " Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.