Status of X11

198 views
Skip to first unread message

damian

unread,
Dec 2, 2011, 1:13:16 AM12/2/11
to AndroiX Users
I've looked at the git repository and it looks like it's almost all
there.

Any chance of additional build instructions? or prebuilt binaries?
(I'm being lazy but I'm also not very familiar with Android
development ~3days actual hacking Android, +20yrs linux/unix/vxworks/
X11/zaurus).

The build instructions look like they are almost there but are missing
which androidx source branch to download.

So the last question is which branch is the one to build from
(androix-0.8)?

I'd really love an ipk though ;>>.

My main interest is to be able to run X11 applications without having
to rewrite the GUI code. I probably will have to for my own code but
there is an awful lot of X11 applications out there that would
sensible work on the larger Android tablets.

Thanks
Damian

Timothy Meade

unread,
Dec 2, 2011, 2:54:09 PM12/2/11
to androi...@googlegroups.com

Yeah, the last one should work (androix-0.8). I should be able to get a build setup working soon if the instructions make any sense. I know other people on this list have built it before.

Damian Dixon

unread,
Dec 3, 2011, 2:57:42 AM12/3/11
to androi...@googlegroups.com
Thanks for info. I'll give it ago over the next week.

Randall Mason

unread,
Dec 12, 2011, 2:13:26 PM12/12/11
to AndroiX Users
It seems like the very latest check-ins happened in Webbbn's repo
here:
https://github.com/webbbn/androix-xserver/tree/androix-merge_upstream_010611

Was it like a school project that they did and then dumped a bunch of
code changes on you, or is it going to get merged in? Does it work
better or differently than the android-0.8 code? It's an open pull
request on your tree and I'm wondering why it is still in limbo.

Thanks so much for your hard work on this. I'm also trying to get the
build up and running with the old script of a successful build. It's
just tough because it requires agcc changes for the latest NDK, then
I've got to figure out all of the paths like "/ndk" and stuff. If you
have any hints as to what should be where, let me know. I'm slowly
getting everything in place.

Thanks,
-Randall

On Dec 2, 9:54 pm, Timothy Meade <zt.t...@gmail.com> wrote:
> Yeah, the last one should work (androix-0.8). I should be able to get a
> build setup working soon if the instructions make any sense. I know other
> people on this list have built it before.

Damian Dixon

unread,
Dec 15, 2011, 4:06:41 AM12/15/11
to androi...@googlegroups.com
I'm about 10% the way through updating the build calls. I've been re-factoring the scripts 
as the places the source code was being pulled from were not ideal and the hard-paths
are not ideal.

I've updated the agcc script. 

I will try and post my updates tonight. They are however incomplete.

Damian Dixon

unread,
Dec 17, 2011, 1:00:02 PM12/17/11
to androi...@googlegroups.com
agcc - updated - suggest you do a diff to the one previously uploaded.
get_source - retrieves the source code (not the latest that is available for the XServer).
unpack - extract the source code.
build - partially updated - needs work to complete.
agcc
get_source
build
unpack

Randall Mason

unread,
Dec 17, 2011, 2:36:23 PM12/17/11
to AndroiX Users
I'm also still having lots of trouble with the build.
I jumped ship from agcc to droid-wrapper.  I think it's a little
moreflexible because it works just by exporting CC and LD and
letconfigure/autogen.sh do the rest.  I'm not very attached to
it,because I'm not sure if it's helping or hurting me.  I think it
isbetter since it allows me to use a fairly stock configure/
autogen.shcommand.Here's my git repository for changes to that to get
it working with the NDK: https://github.com/ClashTheBunny/droid-wrapper
I chose to use repo to get the source.  tmzt/androix had a version
ofit and Android itself does.  I used the libX11 and libxcb  from
tmzt,I'm missing Xt, Xft, and Xrender.   I'm going to add those next
in theapproximate place for the dependencies from X11's build.sh.  I
ditchedtmzt's x11proto and xtrans, they seem to be vanilla
releases.Otherwise, I think I have most of the same software in my git
repository here:https://github.com/ClashTheBunny/androix
And my build script (non-functional build script) is here:https://
github.com/ClashTheBunny/androix-buildscriptIt get my droid-wrapper,
installs it, fetches ncurses, patches it tobuild (without cxx
extensions, I think all we really need are thetermcaps), repo init &&
repo sync's the source code for everythingelse and then builds them in
the order that the build script was in(except for the 2nd build of
xtrans).  It gets a little way through.I think it may be time to
combine forces on our work.  I think one ofmy problems is that I need
better CFLAGS and LDFLAGS.  I do have quitea bunch of things in my
$BUILD_ROOT/usr directory and I need to gothrough and figure out what
I really am failing on.
You can go through all of the commits on github for both androix
andthe build script to see what I was thinking for every change, if
youlike pain, or if you think I'm on the right track.
Also, I just added detecting the location of the NDK through $(dirname$
(which ndk-build)).  Also, where are you building to?  I don't thinkit
matters with my script, but I'm building in my ~/ by doing:
mkdir androixgit clone https://github.com/ClashTheBunny/androix-buildscript.git./androix-buildscript/buildLog.sh
This makes some progress if git and repo are installed and all
thepaths at the top of buildLog.sh are correct.
Thanks for working on this too.  I'm really hopeful that we
havecritical mass for figuring this out.

-Randall


On Dec 17, 8:00 pm, Damian Dixon <damian.di...@gmail.com> wrote:
> agcc - updated - suggest you do a diff to the one previously uploaded.
> get_source - retrieves the source code (not the latest that is available
> for the XServer).
> unpack - extract the source code.
> build - partially updated - needs work to complete.
>

> On 15 December 2011 09:06, Damian Dixon <damian.di...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I'm about 10% the way through updating the build calls. I've
> > been re-factoring the scripts
> > as the places the source code was being pulled from were not ideal and the
> > hard-paths
> > are not ideal.
>
> > I've updated the agcc script.
>
> > I will try and post my updates tonight. They are however incomplete.
>

> > On 12 December 2011 19:13, Randall Mason <clashthebu...@gmail.com> wrote:
>
> >> It seems like the very latest check-ins happened in Webbbn's repo
> >> here:
>

> >>https://github.com/webbbn/androix-xserver/tree/androix-merge_upstream...

>  agcc
> 8KViewDownload
>
>  get_source
> 3KViewDownload
>
>  build
> 29KViewDownload
>
>  unpack
> 1KViewDownload

Randall Mason

unread,
Dec 19, 2011, 10:21:41 AM12/19/11
to AndroiX Users
My build efforts have the following status:
Success: util/macros
Success: proto/xproto
Success: lib/libxtrans
Success: xcb/proto
Success: xcb/pthread-stubs
Failure: lib/libXau # strings.h error
Failure: xcb/libxcb # missing Xau
Success: proto/xextproto
Success: proto/kbproto
Success: proto/inputproto
Failure: lib/libX11 # missing libxcb
Failure: lib/libxkbfile # missing X11
Failure: app/xkbcomp # ./xkbparse.c... configure: error: cannot check
for file existence when cross compiling make: *** No rule to make
target `install'. Stop.
Success: xkeyboard-config
Success: mesa/drm
Success: proto/fixesproto
Success: proto/damageproto
Success: proto/xcmiscproto
Success: proto/bigreqsproto
Success: proto/compositeproto
Success: proto/recordproto
Success: proto/scrnsaverproto
Success: proto/resourceproto
Failure: freetype # still working on figuring out what the best way
of building this would be, TODO
Success: lib/libfontenc
Failure: lib/libXfont # missing fontsproto, TODO
Failure: lib/libXdmcp # similar problem to strings.h libXau problem
Failure: pixman # different looking problem with 'Elf32_auxv_t', but
may be the same as the strings.h problem with size_t. They are both
DEFINE oriented problems.

Many of the failures have something to do with the definition of
size_t, but I'm having trouble figuring it out.
CC AuDispose.lo
droid-debug(compile): /opt/android-ndk-r7/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -
DHAVE_CONFIG_H -I. -I./include -I/home/rmason/androix/usr/include -
Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -
Wmissing-declarations -Wnested-externs -fno-strict-aliasing -Wbad-
function-cast -Wformat=2 -Wold-style-definition -Wdeclaration-after-
statement -I/home/rmason/androix/usr/include -MT AuDispose.lo -MD -MP -
MF .deps/AuDispose.Tpo -c AuDispose.c -fPIC -DPIC -o .libs/AuDispose.o
-I/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include -
D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__
-DANDROID -DSK_RELEASE -DNDEBUG -UDEBUG -march=armv5te -mtune=xscale -
msoft-float -mthumb-interwork -fpic -fno-exceptions -ffunction-
sections -funwind-tables -fstack-protector -fmessage-length=0
In file included from /opt/android-ndk-r7/platforms/android-8/arch-arm/
usr/include/stdlib.h:42,
from AuDispose.c:34:
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/strings.h:
47: error: expected declaration specifiers or '...' before numeric
constant
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/strings.h:
47: error: conflicting types for 'memset'
AuDispose.c: In function 'XauDisposeAuth':
AuDispose.c:44: error: too many arguments to function 'memset'
make[1]: *** [AuDispose.lo] Error 1
make[1]: Leaving directory `/home/rmason/androix/lib/libXau'
make: *** [install] Error 2

Here's another example from libXdmcp:
CC Array.lo
droid-debug(compile): /opt/android-ndk-r7/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -
std=gnu99 -DHAVE_CONFIG_H -I. -I./include -I/home/rmason/androix/usr/
include -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing -Wbad-
function-cast -Wformat=2 -Wold-style-definition -Wdeclaration-after-
statement -I/home/rmason/androix/usr/include -MT Array.lo -MD -MP -
MF .deps/Array.Tpo -c Array.c -fPIC -DPIC -o .libs/Array.o -I/opt/
android-ndk-r7/platforms/android-8/arch-arm/usr/include -
D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__
-DANDROID -DSK_RELEASE -DNDEBUG -UDEBUG -march=armv5te -mtune=xscale -
msoft-float -mthumb-interwork -fpic -fno-exceptions -ffunction-
sections -funwind-tables -fstack-protector -fmessage-length=0
In file included from /opt/android-ndk-r7/platforms/android-8/arch-arm/
usr/include/fcntl.h:34,
from /home/rmason/androix/usr/include/X11/Xos.h:88,
from Array.c:30:
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/unistd.h:
In function 'getpagesize':
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/unistd.h:
167: warning: nested extern declaration of '__page_size'
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/unistd.h:
In function '__getpageshift':
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/unistd.h:
171: warning: nested extern declaration of '__page_shift'
In file included from /opt/android-ndk-r7/platforms/android-8/arch-arm/
usr/include/stdlib.h:42,
from Array.c:35:
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/
strings.h: At top level:
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/strings.h:
49: error: expected declaration specifiers or '...' before '(' token
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/strings.h:
49: error: expected declaration specifiers or '...' before '(' token
/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include/strings.h:
49: warning: function declaration isn't a prototype
make[1]: *** [Array.lo] Error 1
make[1]: Leaving directory `/home/rmason/androix/lib/libXdmcp'
make: *** [install-recursive] Error 1

Pixman problem:
CC pixman-cpu.lo
droid-debug(compile): /opt/android-ndk-r7/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -
DHAVE_CONFIG_H -I. -I.. -I/home/rmason/androix/usr/include -Wall -fno-
strict-aliasing -fvisibility=hidden -MT pixman-cpu.lo -MD -MP -
MF .deps/pixman-cpu.Tpo -c pixman-cpu.c -fPIC -DPIC -o .libs/pixman-
cpu.o -I/opt/android-ndk-r7/platforms/android-8/arch-arm/usr/include -
D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__
-DANDROID -DSK_RELEASE -DNDEBUG -UDEBUG -march=armv5te -mtune=xscale -
msoft-float -mthumb-interwork -fpic -fno-exceptions -ffunction-
sections -funwind-tables -fstack-protector -fmessage-length=0
pixman-cpu.c: In function 'pixman_arm_read_auxv':
pixman-cpu.c:269: error: 'Elf32_auxv_t' undeclared (first use in this
function)
pixman-cpu.c:269: error: (Each undeclared identifier is reported only
once
pixman-cpu.c:269: error: for each function it appears in.)
pixman-cpu.c:269: error: expected ';' before 'aux'
pixman-cpu.c:274: error: 'aux' undeclared (first use in this function)
make[2]: *** [pixman-cpu.lo] Error 1
make[2]: Leaving directory `/home/rmason/androix/pixman/pixman'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/rmason/androix/pixman/pixman'
make: *** [install-recursive] Error 1

Any ideas? Some people have changed the definition of size_t to be
the kernel's version of that, but I don't think I'd want to mess with
that. I think the problem is in the NDK itself, but I have no idea.

-Randall

> mkdir androixgit clonehttps://github.com/ClashTheBunny/androix-buildscript.git./androix-bui...

Timothy Meade

unread,
Dec 19, 2011, 4:28:47 PM12/19/11
to androi...@googlegroups.com, clasht...@gmail.com

Xkbcomp won't build against bionic, you'll have to use a static version or the version from debian and put it in the zip file (.so)

Timothy Meade

unread,
Dec 19, 2011, 4:28:47 PM12/19/11
to androi...@googlegroups.com, clasht...@gmail.com

Same thing with pixman, but I solved it by copying the definition of that struct into the bionic header (auxv)

These were the two most annoying aspects of building androix so they stick in my head.

You can also try my forks of those libraries, but I can't guarantee all the changes are in there as I was working against a full chroot prefix most of the time.

On Dec 19, 2011 10:21 AM, "Randall Mason" <clasht...@gmail.com> wrote:

tmzt

unread,
Dec 19, 2011, 11:55:23 PM12/19/11
to AndroiX Users
By the way to anyone working on this. I did not use any wrapper simply
the long gcc command line using the NDK version, -nostdlib and and -L
linking against the bionic librairies. I built a chroot-like
environment using the libraries in the NDK as a base and used this as
my build prefix, called /opt/androix.

Almost everything is built through Xorg's configure/GNU automake
solution. Only the final step really involves the NDK or ant at all,
which takes the Xorg/DDX built as a .so
And builds it into an apk alongside the java code.

Also, xkbcomp won't build against bionic so I used a static binary or
Ubuntu version (with libc in the LD_LIBRARY_PATH).

To build pixman you'll need to modify the bionic headers to contain a
definition of AUXV.

I've gotten a few pull requests but I'd much rather have a fuller
build solution and a relaunch as a community project.

Please understand that getting this building was a lot of trial and
error and small corrections to the build setup over time not all of
which are captured in the github repository. All code changes to Xorg
are there though to the best of my knowledge.

On Dec 19, 4:28 pm, Timothy Meade <zt.t...@gmail.com> wrote:
> Same thing with pixman, but I solved it by copying the definition of that
> struct into the bionic header (auxv)
>
> These were the two most annoying aspects of building androix so they stick
> in my head.
>
> You can also try my forks of those libraries, but I can't guarantee all the
> changes are in there as I was working against a full chroot prefix most of
> the time.

> ...
>
> read more »

Randall Mason

unread,
Dec 17, 2011, 2:01:22 PM12/17/11
to androi...@googlegroups.com
I'm also still having lots of trouble with the build.

I jumped ship from agcc to droid-wrapper. I think it's a little more
flexible because it works just by exporting CC and LD and let
configure/autogen.sh do the rest. I'm not very attached to it,
because I'm not sure if it's helping or hurting me. I think it is
better since it allows me to use a fairly stock configure/autogen.sh
command.

Here's my repo for that: https://github.com/ClashTheBunny/droid-wrapper

I chose to use repo to get the source. tmzt/androix had a version of
it and Android itself does. I used the libX11 and libxcb from tmzt,
I'm missing Xt, Xft, and Xrender. I'm going to add those next in the
approximate place for the dependencies from X11's build.sh. I ditched
tmzt's x11proto and xtrans, they seem to be vanilla releases.

Otherwise, I think I have most of the same software in my repo here:
https://github.com/ClashTheBunny/androix

And my build script (non-functional build script) is here:
https://github.com/ClashTheBunny/androix-buildscript

It get my droid-wrapper, installs it, fetches ncurses, patches it to


build (without cxx extensions, I think all we really need are the
termcaps), repo init && repo sync's the source code for everything
else and then builds them in the order that the build script was in
(except for the 2nd build of xtrans). It gets a little way through.
I think it may be time to combine forces on our work. I think one of
my problems is that I need better CFLAGS and LDFLAGS. I do have quite
a bunch of things in my $BUILD_ROOT/usr directory and I need to go
through and figure out what I really am failing on.

You can go through all of the commits on github for both androix and
the build script to see what I was thinking for every change, if you
like pain, or if you think I'm on the right track.

Also, I just added detecting the location of the NDK through $(dirname

$(which ndk-build)). Also, where are you building to? I don't think
it matters with my script, but I'm building in my ~/ by doing:

./androix-buildscript/buildLog.sh

This makes some progress if git and repo are installed and all the
paths at the top of buildLog.sh are correct.

Thanks for working on this too. I'm really hopeful that we have


critical mass for figuring this out.

Randall Mason
ClashT...@gmail.com

Timothy Meade

unread,
Mar 3, 2012, 9:50:40 PM3/3/12
to androi...@googlegroups.com

Hey Clash,

I tried droidgcc and wasn't happy with how it exported the compiler since autoconf expects the normal triple in the name when cross compiling.

I'm using your build process with the repo.xml, but I had to reorder a lot of the repos to fix dependencies since your script builds in order. It's still hacky but it works.

I'm trying to build again, but I'm getting a libandroix with dependencies on a number of shared libraries and Android's linker refuses to resolve them.

So back to --enable-static and --disable-dynamic.

I'm back to it looking for some shared Android libraries and failing for some other reason.

(Guess I should have taken better notes when I solved all these problems the first time (not .so's of course))

About the pull request, my README points to your version of androix-build-scripts and that's fine with me. The repo.xml should point to the best source for whatever package, whether yours or mine or somebody elses.

If we get a non-hacky solution I'll be happy to import your changes.

tmzt

samfreed

unread,
Mar 5, 2012, 7:40:06 PM3/5/12
to AndroiX Users
Standing by to test on my Asus transformer prime, I guess this should
play well with Ubuntu-in-a-chroot, should it not?

Tell me when to start.... I can''t put in more than an hour a day
here, max.

Sam

On Mar 4, 2:50 am, Timothy Meade <zt.t...@gmail.com> wrote:
> Hey Clash,
>
> I tried droidgcc and wasn't happy with how it exported the compiler since
> autoconf expects the normal triple in the name when cross compiling.
>
> I'm using your build process with the repo.xml, but I had to reorder a lot
> of the repos to fix dependencies since your script builds in order. It's
> still hacky but it works.
>
> I'm trying to build again, but I'm getting a libandroix with dependencies
> on a number of shared libraries and Android's linker refuses to resolve
> them.
>
> So back to --enable-static and --disable-dynamic.
>
> I'm back to it looking for some shared Android libraries and failing for
> some other reason.
>
> (Guess I should have taken better notes when I solved all these problems
> the first time (not .so's of course))
>
> About the pull request, my README points to your version of
> androix-build-scripts and that's fine with me. The repo.xml should point to
> the best source for whatever package, whether yours or mine or somebody
> elses.
>
> If we get a non-hacky solution I'll be happy to import your changes.
>
> tmzt
>
> > git clonehttps://github.com/ClashTheBunny/androix-buildscript.git
> > ./androix-buildscript/buildLog.sh
>
> > This makes some progress if git and repo are installed and all the
> > paths at the top of buildLog.sh are correct.
>
> > Thanks for working on this too.  I'm really hopeful that we have
> > critical mass for figuring this out.
>
> > Randall Mason
> > ClashTheBu...@gmail.com
>
> > On Sat, Dec 17, 2011 at 8:00 PM, Damian Dixon <damian.di...@gmail.com>

Timothy Meade

unread,
Mar 5, 2012, 9:57:09 PM3/5/12
to androi...@googlegroups.com, sam....@gmail.com

Yeah, and it should run nicely on that tablet, though you'll also need an xkb keymap for it.

Just trying to work out some build issues. You can try the old binary if you want, should be linked from the wiki. Would be good to know if it runs at all.

fattie

unread,
Mar 6, 2012, 7:15:28 AM3/6/12
to AndroiX Users
I could test it on the TF101 if someone wanted to offer the build. ;)

On Mar 5, 9:57 pm, Timothy Meade <zt.t...@gmail.com> wrote:
> Yeah, and it should run nicely on that tablet, though you'll also need an
> xkb keymap for it.
>
> Just trying to work out some build issues. You can try the old binary if
> you want, should be linked from the wiki. Would be good to know if it runs
> at all.

Sam Freed

unread,
Mar 14, 2012, 10:55:43 AM3/14/12
to androi...@googlegroups.com
So where do we find binaries, or instructions - I am ubuntu-wise but Android-newbie.
Reply all
Reply to author
Forward
0 new messages