Bug 69798 - libXext is not compiled when cross-compiling
Summary: libXext is not compiled when cross-compiling
Status: RESOLVED WORKSFORME
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xext (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-25 09:00 UTC by Sergey
Modified: 2013-10-03 13:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
config.log of libXext (54.56 KB, text/plain)
2013-09-25 09:40 UTC, Sergey
no flags Details

Description Sergey 2013-09-25 09:00:12 UTC
I'm trying to cross-compile libXext from git. The host system architecture is i686-pc-linux-gnu. The target system architecture is i586-pc-linux-uclibc. The target directory is /mnt/clfs/sources/xorg-build/. I build packages with build.sh from util-macros. I pass to build.sh with the following arguments: --clone /mnt/clfs/sources/xorg-build, CONFFLAGS= --build i686-pc-linux-gnu --host i586-pc-linux-uclibc --enable-malloc0returnsnull, PKG_CONFIG_PATH=/mnt/clfs/sources/xorg-build/lib/pkgconfig:/mnt/clfs/sources/xorg-build/share/pkgconfig. I get the following error message:

make[2]: Entering directory `/mnt/clfs/sources/xorg-src/lib/libXext/src'
  CC       XEVI.lo
In file included from XEVI.c:34:0:
eat.h:32:20: error: static declaration of '_XEatDataWords' follows non-static declaration
In file included from XEVI.c:27:0:
/mnt/clfs/sources/xorg-build/include/X11/Xlibint.h:840:13: note: previous declaration of '_XEatDataWords' was here
make[2]: *** [XEVI.lo] Error 1

All sources from git.
Comment 1 Sergey 2013-09-25 09:40:22 UTC
Created attachment 86540 [details]
config.log of libXext
Comment 2 Garry Iglesias 2013-10-03 07:21:36 UTC
Well I have a similar problem. That's it I got the same error message but in a different situation:

In file included from XEVI.c:34:0:
eat.h:32:20: error: static declaration of '_XEatDataWords' follows non-static declaration
In file included from XEVI.c:27:0:
/someplace/sandbox/build/include/X11/Xlibint.h:840:13: note: previous declaration of '_XEatDataWords' was here


My case is I'm building static libraries only to link with a redistributable standalone executable. So all my X11/Xcb/Xlib dependencies are "--enable-static" and "--disable-shared" in this sandbox.

I don't know since when this problem occurs, I just upgraded all libraries to last versions, last time it was "years" ago (2011... :) ).

Thanks.
Comment 3 Alan Coopersmith 2013-10-03 13:52:12 UTC
You get this error message when you configure the libXext build to use headers
from a different version of libX11 than you link with.

It indicates that this test in configure.ac failed to find the _XEatDataWords
function in libX11:

# Obtain compiler/linker options for depedencies
PKG_CHECK_MODULES(XEXT, [xproto >= 7.0.13] [x11 >= 1.1.99.1] [xextproto >= 7.1.99])

# Check for _XEatDataWords function that may be patched into older Xlib releases
SAVE_LIBS="$LIBS"
LIBS="$XEXT_LIBS"
AC_CHECK_FUNCS([_XEatDataWords])
LIBS="$SAVE_LIBS"

but when you build it's defined in libX11.

Don't do that.  Use matching library & headers.

It'll get resolved in the future as we drop support for patching this into
Xlib and change the above to simply require Xlib 1.6 or newer.
Comment 4 Alan Coopersmith 2013-10-03 13:54:00 UTC
Not enough caffiene yet this morning, change "but when you build it's defined
in libX11." to "but when you build it's defined in <X11/Xlibint.h>" (a header
from the libX11 package).


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.