Bug 8256

Summary: Example multilib setup from dev manual fails when using systemd
Product: [Documentation] Development Manual Reporter: Joshua Lock <joshuagloe>
Component: developmentAssignee: Scott Rifenbark <srifenbark>
Status: VERIFIED FIXED QA Contact: Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu>
Severity: normal    
Priority: Medium CC: bogdanx.a.voiculescu, meta.mr.watcher, meta.watcher, ross.burton, srifenbark
Version: 1.9   
Target Milestone: 2.0   
Hardware: x86   
OS: Multiple   
Whiteboard: 23 Sept 2015 - RESOLVED/FIXED
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Done (doc changes complete)

Description Joshua Lock 2015-09-04 10:51:27 UTC
When setting up an environment to test the impact of some changes on multilib I ran into build errors when using multilib + systemd.

The dev manual suggests[1] that an easy way to enable & test multilib is to add the following to local.conf:

MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
IMAGE_INSTALL = "lib32-connman"

As I'm developing changes to systemd my local.conf also includes the following entries to enable it as init manager:

DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

When building core-image-sato (with connman + lib32-connman from the IMAGE_INSTALL line pasted from the dev manual) I receive the following error:

Multilib check error: duplicate files 
/srv/build/split-multilib/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/multilib/lib32/lib/systemd/system/connman.service 
/srv/build/split-multilib/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/
rootfs/lib/systemd/system/connman.service is not the same

1. https://www.yoctoproject.org/docs/1.8/dev-manual/dev-manual.html#using-multilib
Comment 1 Ross Burton 2015-09-04 13:06:26 UTC
Yes, the example is a terrible idea as you can't just swap a lib32 binary for a lib64 binary as the systemd unit files which need to be identical are not as they have references to $(libdir) in.

We should change the documentation to install something that you'd actually install into a multilib image such as lib32-glib-2.0.
Comment 2 Scott Rifenbark 2015-09-16 16:30:56 UTC
Hi, 

I have updated the YP Development Manual to use lib32-glib-2.0 rather than lib32-connman as suggested by Ross.  You can review the section at http://www.yoctoproject.org/docs/1.9/dev-manual/dev-manual.html#using-multilib.  Let me know if there are any issues or changes needed beyond this.

Thanks
Comment 3 Ross Burton 2015-09-21 13:47:59 UTC
The lib32-glib-2.0 is good and I've verified that works, but the surrounding isn't right.

IMAGE_INSTALL = "lib32-glib-2.0" will result in an image that *just* contains that library.  The example should be

IMAGE_INSTALL_append = " lib32-glib-2.0"

(note the leading space in the value is important)
Comment 4 Scott Rifenbark 2015-09-22 14:29:35 UTC
Ross, 

I fixed as directed.  See http://www.yoctoproject.org/docs/1.9/dev-manual/dev-manual.html#using-multilib and let me know if I can set this to RESOLVED.

Thanks, 
Scott
Comment 5 Scott Rifenbark 2015-09-22 15:06:46 UTC
Setting to 1.0 days to get this off the red-flag list.  The change is just waiting for approval from Ross.
Comment 6 Ross Burton 2015-09-22 15:11:18 UTC
Looks good!
Comment 7 Scott Rifenbark 2015-09-23 14:13:33 UTC
Setting to RESOLVED/FIXED and turning Doc flag off.