Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 761730

Summary: dev-libs/libical: support cross-compiling
Product: Gentoo Linux Reporter: David Michael <fedora.dm0>
Component: Current packagesAssignee: Andreas Sturmlechner <asturm>
Status: UNCONFIRMED ---    
Severity: normal CC: matoro_bugzilla_gentoo, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: fix.patch

Description David Michael 2020-12-26 03:54:50 UTC
The src-generator program must be built natively since it is executed during the build.  This requires installing libxml2 and glib with BDEPEND.

The build system isn't smart enough to handle this, though, so it needs to be compiled separately.  (If the build system was correct, libxml2 could be removed from DEPEND.)  I'll attach a patch that fixes the issue.
Comment 1 David Michael 2020-12-26 03:57:53 UTC
Created attachment 679515 [details, diff]
fix.patch
Comment 2 matoro archtester 2021-09-07 15:11:21 UTC
Note that another alternative I found is to simply build with USE="-glib -introspection"
Comment 3 Andreas Sturmlechner gentoo-dev 2022-10-22 15:34:42 UTC
This went into 3.0.9:

https://github.com/libical/libical/commit/1197d84b63dce179b55a6293cfd6d0523607baf1

Is there anything left for us to do after that?
Comment 4 David Michael 2022-10-23 18:05:15 UTC
Unless I'm misunderstanding that commit, it expects you to install libical natively and specify the path to the native src-generator CMake file when cross-compiling, so the ebuild would have to BDEPEND on itself to use that functionality which isn't going to work.  This issue can be closed if no one else is affected.  You can make it work manually with something like this:

> emerge libical
> MYCMAKEARGS=-DIMPORT_ICAL_GLIB_SRC_GENERATOR=/usr/lib64/cmake/LibIcal/IcalGlibSrcGenerator.cmake cross-emerge libical