SDL-2.0: cross-compile problem with X11 headers

$ ndk-build SDL2

Compile thumb : SDL2 <= SDL_events.c
In file included from /home/greno/build/SDL/jni/SDL/src/events/SDL_events.c:27:
/home/greno/build/SDL/jni/SDL/include/SDL_syswm.h:68:22: error: X11/Xlib.h: No such file or directory
/home/greno/build/SDL/jni/SDL/include/SDL_syswm.h:69:23: error: X11/Xatom.h: No such file or directory

Does this mean that we cannot have X11 headers installed when cross-compiling? Because if so that is a big problem.

X11 headers are installed for other projects and there are a lot of dependencies (20+) on them. Which turns into even more if you try to actually remove them. It is now almost impossible to remove them.

So how can we get around this issue for cross-compiles?

Ok, I fixed the issue with “hg revert include/SDL_config.h”

So that brings up the question, are we not supposed to run the configure script for any cross-compiling?

Shouldn’t the configure be necessary? Or just if you’re going to use the standard ‘make’ system?

.

Message-ID: <1335575984.m2f.32652 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

$ ndk-build SDL2

Compile thumb : SDL2 <= SDL_events.c
In file included from
/home/greno/build/SDL/jni/SDL/src/events/SDL_events.c:27:
/home/greno/build/SDL/jni/SDL/include/SDL_syswm.h:68:22: error: X11/Xlib.h:
No such file or directory
/home/greno/build/SDL/jni/SDL/include/SDL_syswm.h:69:23: error: X11/Xatom.h:
No such file or directory

Does this mean that we cannot have X11 headers installed when
cross-compiling? Because if so that is a big problem.

I think you’re misunderstanding the error. The compiler doesn’t seem
to be saying that you need to get rid of the X headers, it’s saying
that it CANNOT FIND THE X11 HEADERS. SDL2 isn’t clashing with X11,
it’s depending on it. You should check your cross-compiler setup to
make certain that the files are in the right place.> Date: Fri, 27 Apr 2012 18:19:44 -0700

From: “greno”
To: sdl at lists.libsdl.org
Subject: [SDL] SDL-2.0: cross-compile problem with X11 headers

This is in a cross-compile situation.

The target does not have X windows. The host does.

And because the X11 headers are installed on the host the configure is trying to draw in X11 even on cross-compiles where there is no X11 on target.

It’s not checking under the targets sysroot.

Reverting the config solves the issue.

But you are stuck with having to manually configure cross-compiles since the configure can’t do it.

.

**
This is in a cross-compile situation.

The target does not have X windows. The host does.

But you are stuck with having to manually configure cross-compiles since
the configure can’t do it.

Adding --disable-video-x11 on your ./configure line doesn’t solve the
problem?On Sun, Apr 29, 2012 at 6:11 AM, greno wrote:


Bye,
Gabry