Bug 10223

Summary: libical build fails after changing machine (QA check for tmpdir in .pc file)
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jussi Kukkonen <jku>
Component: coreAssignee: Maxin B. John <maxin.john>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, ross.burton
Version: unspecified   
Target Milestone: 2.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Jussi Kukkonen 2016-09-06 07:53:48 UTC
This only fails when libical is built for e.g. qemux86-64 already, and is then built for generic86-64 in a way that install is re-run:
$ MACHINE=qemux86-64 bitbake libical
$ MACHINE=genericx86-64 bitbake -f -Cinstall libical


In this case a QA check finds tmpdir in the pc file. core2-64-poky-linux libical workdir looks like this after build fails for MACHINE=genericx86-64:

$ grep iculib= build/libical.pc 
iculib=/home/jku/src/poky/build/tmp/sysroots/qemux86-64/usr/lib/libicuuc.so /home/jku/src/poky/build/tmp/sysroots/qemux86-64/usr/lib/libicui18n.so 


This is the hack in libical recipe:

do_install_append () {
        sed -i -e "s#${STAGING_LIBDIR}/lib\([a-z0-9]*\)\.so#-l\1#g" ${D}${libdir}/pkgconfig/libical.pc
}
Comment 1 Ross Burton 2016-09-08 14:37:09 UTC
Note that upstream just fixed a related bug: https://github.com/libical/libical/issues/227
Comment 2 Maxin B. John 2016-09-08 15:53:24 UTC
Hi Ross,

(In reply to comment #1)
> Note that upstream just fixed a related bug:
> https://github.com/libical/libical/issues/227


Thank you very much for the link. I was moving more towards upgrading the FindICU.cmake (https://github.com/julp/FindICU.cmake).

Sent the back-ported patch to oe-core:
http://lists.openembedded.org/pipermail/openembedded-core/2016-September/126322.html
Comment 3 Jussi Kukkonen 2016-09-09 06:11:50 UTC
(In reply to comment #1)
> Note that upstream just fixed a related bug:
> https://github.com/libical/libical/issues/227

Loving the upstream solution: instead of replacing >100 lines of custom cmake with a single pkg-config call, add more hard-coded linker flags :)