Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263937 - Fix libX11 cross-compilation
Summary: Fix libX11 cross-compilation
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL: http://bugs.freedesktop.org/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-27 07:15 UTC by Sven 'sleipnir' Rebhan
Modified: 2009-09-10 21:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild part of the patch (libX11-1.1.5.patch,536 bytes, patch)
2009-03-27 07:16 UTC, Sven 'sleipnir' Rebhan
Details | Diff
Cross-compile fix (libX11-1.1.5-crosscompile-makekeys.patch,1.72 KB, patch)
2009-03-27 07:17 UTC, Sven 'sleipnir' Rebhan
Details | Diff
Corrected ebuild patch (libX11-1.1.5.patch,985 bytes, patch)
2009-03-27 07:57 UTC, Sven 'sleipnir' Rebhan
Details | Diff
Autoreconf fix for configure.ac (libX11-1.1.5-xtrans_connection_flags-configure.patch,460 bytes, patch)
2009-03-27 08:00 UTC, Sven 'sleipnir' Rebhan
Details | Diff
Reworked patch (libX11-1.1.5-crosscompile-makekeys.patch,1.79 KB, patch)
2009-03-31 19:47 UTC, Sven 'sleipnir' Rebhan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven 'sleipnir' Rebhan 2009-03-27 07:15:04 UTC
During the build process libX11 wants to execute its makekeys tool. For cross-compilation this fails, as the tool is compiled for the target architecture. The following patch catches this case and compiles an additional host version of makekeys.

Reproducible: Always
Comment 1 Sven 'sleipnir' Rebhan 2009-03-27 07:16:30 UTC
Created attachment 186382 [details, diff]
Ebuild part of the patch

Apply the patch in the ebuild. (Align the use switches)
Comment 2 Sven 'sleipnir' Rebhan 2009-03-27 07:17:39 UTC
Created attachment 186384 [details, diff]
Cross-compile fix

Compile a host version of the required makekeys tool when we cross-compile. A smilar patch for libXt can be found in #263897.
Comment 3 Sven 'sleipnir' Rebhan 2009-03-27 07:57:24 UTC
Created attachment 186387 [details, diff]
Corrected ebuild patch

Wooops, we also need to remove the previous cross-compile hack and do an autoreconf. This fails without the patch that follows.
Comment 4 Sven 'sleipnir' Rebhan 2009-03-27 08:00:32 UTC
Created attachment 186389 [details, diff]
Autoreconf fix for configure.ac

Without the patch I get the following error during autoreconf:
> error: possibly undefined macro: XTRANS_CONNECTION_FLAGS
> If this token and others are legitimate, please use m4_pattern_allow.
> See the Autoconf documentation.

In configure.ac the XTRANS_CONNECTION_FLAGS macro is forbidden rather than allowed. That seems to be wierd. Allowing this macro fixes autoreconf.
Comment 5 Rémi Cardona (RETIRED) gentoo-dev 2009-03-28 07:58:03 UTC
Please open a bug in FreeDesktop's bugzilla with your patch attached to it and paste the url here.

Thanks
Comment 6 SpanKY gentoo-dev 2009-03-28 11:21:48 UTC
the comments in Bug 263897 apply to this patch as well
Comment 7 Sven 'sleipnir' Rebhan 2009-03-31 19:47:00 UTC
Created attachment 186884 [details, diff]
Reworked patch

Make use of the cross_compile variable and respect preset CC_FOR_BUILD. Hope this makes vapier happy!? Will submit upstream and paste the URL here.
Comment 8 Sven 'sleipnir' Rebhan 2009-03-31 19:55:27 UTC
Submitted upstream as http://bugs.freedesktop.org/show_bug.cgi?id=20981
Comment 9 Rémi Cardona (RETIRED) gentoo-dev 2009-04-01 05:58:31 UTC
Upstream seems to think the bug is already fixed...
Comment 10 Sven 'sleipnir' Rebhan 2009-04-01 08:57:10 UTC
That's true for version 1.1.99 or 1.2. So we either bump the version here or backport the Xorg fix or apply the patch as is.

Upstream also thinks that the xtrans macro patch is wrong, however I can't reconfgure the package without it. Maybe it's a problem with my environment, because I think I have x11-libs/xtrans installed (this should provide the missing macro).
Comment 11 Sven 'sleipnir' Rebhan 2009-04-02 06:36:15 UTC
Comment on attachment 186389 [details, diff]
Autoreconf fix for configure.ac

The problem was an artefact of cross-compilation (host was missing xtrans). The patch is not required.
Comment 12 Sven 'sleipnir' Rebhan 2009-04-02 06:37:31 UTC
So the only problem left is the makekeys issue. How to proceed? Version bump? Backporting? Taking the current tested patch?
Comment 13 solar (RETIRED) gentoo-dev 2009-04-19 20:56:06 UTC
(In reply to comment #9)
> Upstream seems to think the bug is already fixed...

I think this might just be a "better" fix.
Anybody poked at what is upstream now?
Comment 14 Rémi Cardona (RETIRED) gentoo-dev 2009-08-17 22:50:48 UTC
Upstream says bug is fixed. Could anyone enlighten me on what needs to be done here? Aren't newer versions (that I yet have to unmask...) fixed?

Thanks
Comment 15 SnakeByte 2009-09-10 20:15:33 UTC
Cross compiling the libX11-1.2.2 ebuild works for arm and powerpc
but still has a CFLAG vs. CFLAG_FOR_BUILD issue that causes cross compiling mips64 to fail as -mabi is part of CFLAGS.

There is a corresponding bug and a proposed patch at https://bugs.freedesktop.org/show_bug.cgi?id=22584.

Creating a new patch for 1.1.5 based on this should be possible, right?
Comment 16 Rémi Cardona (RETIRED) gentoo-dev 2009-09-10 21:14:11 UTC
Then please send the patch to the xorg-devel mailing list, so that it gets reviewed/applied soon. Once the patch is in git, I'll backport it or even roll out a new release.

Thanks