Bug 10985 - Dbus recipe fails when systemd is enabled
Summary: Dbus recipe fails when systemd is enabled
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: Other arm
: Medium+ major
Target Milestone: 2.3 M3
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-01-27 19:59 UTC by Blayne Dennis
Modified: 2017-02-21 17:14 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Log captured via 'bitbake -vv -D dbus | tee -a dbus.build.log 2>&1' (2.27 MB, application/octet-stream)
2017-01-27 19:59 UTC, Blayne Dennis
no flags Details
Patch that fixes stated bug (684 bytes, patch)
2017-02-06 16:35 UTC, Blayne Dennis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Blayne Dennis 2017-01-27 19:59:41 UTC
Created attachment 3611 [details]
Log captured via 'bitbake -vv -D dbus  | tee -a dbus.build.log 2>&1'

Dbus recipe fails when systemd is enabled. In the dbus recipe (poky/meta/recipes-core/dbus/dbus_1.10.6.bb)(upstream poky), if systemd is enabled, then the do_install task will "cd" into the sysroot. Then at the end, the same directory gets deleted, then the CWD error pops up and things get worse and worse. Error appears when attempting to build Automotive Grade Linux  (http://docs.automotivelinux.org/docs/getting_started/en/dev/) for the Raspberry Pi 3b board (http://docs.automotivelinux.org/docs/getting_started/en/dev/reference/machines/raspberrypi.html).

To fix, must change:
125         cd ${D}${systemd_system_unitdir}/dbus.target.wants/                                                        
126         ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
127         ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
128         ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service


To:
125         OLDPATH=`pwd`
126         cd ${D}${systemd_system_unitdir}/dbus.target.wants/
127         ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
128         ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
129         ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.services
130         cd $OLDPATH



Various configuration information:
[17:50:36] devel@agl-worker-sdldev-VirtualBox-0-sdldev:~/workspace_agl$ uname -a Linux agl-worker-sdldev-VirtualBox-0-sdldev 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 GNU/Linux

[18:07:15] devel@agl-worker-sdldev-VirtualBox-0-sdldev:~/workspace_agl$ ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 15653
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited


[18:49:32] devel@agl-worker-sdldev-VirtualBox-0-sdldev:~/workspace_agl$ repo manifest -r 
<?xml version="1.0" encoding="UTF-8"?> <manifest>
  <remote fetch="https://github.com/01org/" name="01org"/>
  <remote fetch="https://gerrit.automotivelinux.org/gerrit/" name="agl" pushurl="ssh://gerrit.automotivelinux.org:29418
  <remote fetch="git://git.freescale.com/imx" name="fsl-release"/>
  <remote fetch="https://github.com/" name="github"/>
  <remote fetch="git://git.openembedded.org/" name="openembedded"/>
  <remote fetch="git://git.yoctoproject.org/" name="yocto"/>
  
  <default remote="agl" revision="chinook" sync-j="4"/>
  
  <project name="AGL/meta-agl" path="meta-agl" revision="5a85901e245aa2605721c7dae645a00156a67dde" upstream="chinook"/>
  <project name="AGL/meta-agl-demo" path="meta-agl-demo" revision="fb92e316727a1ad0012ac90ed52c5d9cecdcf433" upstream="
  <project name="AGL/meta-agl-devel" path="meta-agl-devel" revision="134e5f446b52f6a02f38212b9bde076adad798f8" upstream
  <project name="AGL/meta-agl-extra" path="meta-agl-extra" revision="812bc8ab9490e2418dedcf3a868a0ef9393ab01f" upstream
  <project name="AGL/meta-renesas" path="meta-renesas" revision="90122dd63d72061b93bd3cbe3a7b520aaa531a19" upstream="ch
  <project name="CogentEmbedded/meta-rcar" path="meta-rcar" remote="github" revision="cc6c4ee3f61b4dd864804b6b34c295cd0
  <project name="Freescale/meta-fsl-arm-extra" path="meta-fsl-arm-extra" remote="github" revision="e95f4ae61fdaf6452d6d
  <project name="meta-fsl-arm" remote="yocto" revision="e2254e7b2ded0c2b66b1226f879b3a6d52037b2d" upstream="krogoth"/>
  <project name="meta-intel" remote="yocto" revision="1f8dd1b00ce9c72d73583c405ec392690d9b08b7" upstream="krogoth"/>
  <project name="meta-intel-iot-security" remote="01org" revision="20bbb97f6d5400b126ae96ef446c3e60c7e16285"/>
  <project name="meta-oic" remote="yocto" revision="0bdd959e0dee4f63098702c302d1d214ac3d808a"/>
  <project name="meta-openembedded" remote="openembedded" revision="55c8a76da5dc099a7bc3838495c672140cedb78e" upstream=
  <project name="meta-qcom" remote="yocto" revision="3bfe83535358289aa7f7342ed0977c076e7550c8" upstream="krogoth"/>
  <project name="meta-qt5/meta-qt5" path="meta-qt5" remote="github" revision="da138c99142bec136e43eba35ce09d86f00eca2c"
  <project name="meta-raspberrypi" remote="yocto" revision="a5f9b07a820d50ae5fb62e07306cd4e72d8638a9" upstream="krogoth
  <project name="meta-rust/meta-rust" path="meta-rust" remote="github" revision="d0663639a08ed60bb83fd6eb99e3e2045b21b5
  <project name="meta-security-isafw" remote="01org" revision="f44f15bb54057dd60399bb5dc7e0ecc7822168a2" upstream="mast
  <project name="meta-ti" remote="yocto" revision="d9a81e3be2945e11bd9da58b6de2ac31d51e9286" upstream="krogoth"/>
  <project name="poky" remote="yocto" revision="ae9b341ecfcc60e970f29cfe04306411ad26c0cf" upstream="krogoth"/>
  <project name="tripzero/meta-amb" path="meta-amb" remote="github" revision="ef3495bb8d6543709f6d1f7b657cb894d32c1757"
</manifest>


[18:49:27] devel@agl-worker-sdldev-VirtualBox-0-sdldev:~/workspace_agl$ repo status 
nothing to commit (working directory clean)
Comment 1 Ross Burton 2017-01-27 20:17:54 UTC
There's no need to do a cd at all if the ln calls use absolute paths for the link name, so the patch can just be to delete the cd.

Feel free to send a patch as you're in the perfect environment to test that it works.
Comment 2 Blayne Dennis 2017-01-27 21:17:11 UTC
(In reply to comment #1)
> There's no need to do a cd at all if the ln calls use absolute paths for the
> link name, so the patch can just be to delete the cd.
> 
> Feel free to send a patch as you're in the perfect environment to test that
> it works.

Will do, gotta complete the build I'm on then I'll make a patch file
Comment 3 Blayne Dennis 2017-02-06 16:35:53 UTC
Created attachment 3626 [details]
Patch that fixes stated bug

This is the promised patch. Build finished successfully (including the troublesome section in dbus) and generated a usable Automotive Grade Linux image for raspberry pi, which I have running on my local pi.

The comments form informs me not to submit patches here. Unfortunately, I'm not sure what mailing list to send this to. Can someone take a look at this?
Comment 4 Ross Burton 2017-02-06 16:43:47 UTC
Patch looks good.  Patches for openembedded-core go to the openembedded-core@lists.openembedded.org mailing list: http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
Comment 5 Ross Burton 2017-02-09 16:48:11 UTC
Patch on the list.
Comment 6 Ross Burton 2017-02-21 17:14:58 UTC
Fixed in oe-core 64d75438955c39e01187e897e9df47c93ac6c45a.