Bug 10223 - libical build fails after changing machine (QA check for tmpdir in .pc file)
Summary: libical build fails after changing machine (QA check for tmpdir in .pc file)
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M4
Assignee: Maxin B. John
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-09-06 07:53 UTC by Jussi Kukkonen
Modified: 2016-09-15 08:04 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 :)