Bug 16484

Summary: Do not cross-compile build tools
Product: xorg Reporter: Maarten ter Huurne <maarten.ter.huurne>
Component: Lib/XlibAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 7.3 (2007.09)   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Use native compiler to build "makekeys" tool none

Description Maarten ter Huurne 2008-06-23 12:34:47 UTC
Created attachment 17331 [details] [review]
Use native compiler to build "makekeys" tool

When I try to cross-compile libX11-1.0.4, I get the following compile error:

../src/util/makekeys < /opt/freescale/wxX11/targetfs/include/X11/keysymdef.h > ks_tables_h
/bin/sh: ../src/util/makekeys: cannot execute binary file
make[2]: *** [ks_tables.h] Error 126

The problem is that "makekeys" has been compiled with the cross-compiler and is therefore not executable on the host system. I fixed this by overriding the "CC" variable when building the "util" directory, see attached patch. I don't know if there is something in autotools that gives you the native compiler; right now I hardcoded it to "gcc".
Comment 1 Julien Cristau 2009-02-17 06:28:29 UTC

*** This bug has been marked as a duplicate of bug 6669 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.