64-bit Ubuntu supported for build environment?

942 views
Skip to first unread message

Tom Morris

unread,
Oct 23, 2008, 12:03:23 PM10/23/08
to Android Internals
It doesn't appear that building from source works out of the box on 64-
bit Ubuntu (8.04 Hardy Heron).

Before I dig into debugging it, I was wondering if a) it's a supported
platform and b) anyone has already done the work?

The initial errors are listed below, but, like I said, I haven't
looked at it yet, so I don't know if this is an isolated problem or
the tip of the iceberg.

Tom
-----

$ make
build/core/product_config.mk:229: WARNING: adding test OTA key
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/
acp_intermediates/acp)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/
libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/
libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/
libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/
libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp]
Error 1
$

koba

unread,
Oct 24, 2008, 10:14:10 AM10/24/08
to Android Internals
Tom,

I have built Android on Ubuntu 8.04.1 desktop x86_64.
I did not enconter your problem.

koba

unread,
Oct 24, 2008, 6:36:40 AM10/24/08
to Android Internals
Tom,

I am using ubuntu 8.04.1 desktop on x86_64 to build android.

You need 32bit version library, such as /usr/lib32/libstdc++.so
How about try

$ sudo apt-get install ia32-libs lib32z1-dev lib32ncurses5-dev

to get 32bit libraries.

On 10月24日, 午前1:03, Tom Morris <tfmor...@gmail.com> wrote:

Disconnect

unread,
Oct 24, 2008, 10:16:29 AM10/24/08
to android-...@googlegroups.com
Needs g++-multilib and gcc-multilib.

Should be on the install page but I've given up convincing the google
guys to make the change..

Jonas Bonn

unread,
Oct 24, 2008, 3:18:09 AM10/24/08
to android-...@googlegroups.com
>
> It doesn't appear that building from source works out of the box on 64-
> bit Ubuntu (8.04 Hardy Heron).
>
> Before I dig into debugging it, I was wondering if a) it's a supported
> platform and b) anyone has already done the work?
>

No, building on 64-bit does not appear to work... you can get past
your error by installing g++-multilib. Then you'll also need a 32-bit
libz, but the build will still fail at some point unable to find
libX11, even though it's installed.
/Jonas

mark gross

unread,
Oct 24, 2008, 11:37:26 AM10/24/08
to android-...@googlegroups.com
Android C runtime is 32bit only, and the X86 stuff isn't released yet.

Additionally the compiler for ubuntu 8.04 is the newer gcc and it will complain when compiling some of the C++ code.

--mgross

Tom Morris

unread,
Oct 24, 2008, 2:58:06 PM10/24/08
to android-...@googlegroups.com
Koba & Disconnect - Thanks for the tips. Apologies to everyone for
the duplicate post, but there was a significant moderation delay
yesterday and the other query hadn't been posted when I wrote mine.

I got everything to build and run on 64-bit Linux once all the
necessary dependencies were installed.

The libX11 problem mentioned by Jonas Bonn is due to this Ubuntu bug

https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/117131

If you've got ia32-libs installed, you can work around the problem by
creating the softlink by hand.

$ cd /usr/lib32
$ sudo ln -s libX11.so.6 libX11.so

I had most of what I need installed, so I'm not sure this list of
dependencies is complete, but you definitely need a bunch of the
32-bit dev packages. Combining the lists from Koba and Disconnect,
I'd suggest starting with

$ sudo apt-get install ia32-libs g++-multilib gcc-multilib
lib32z1-dev lib32ncurses5-dev

and then creating the softlink as described above. Of course, this is
in addition to the dependencies already listed on Google's build page
http://source.android.com/download#TOC-Linux

It took over an hour on my laptop, but when it was done I had a
complete build with working emulator, SDK, and bundled apps that ran
just fine.

BTW, if anyone needs to debug the makefiles, there's a target
'showcommands' that is useful to see what's going on.

Tom

ubuntu_user

unread,
Oct 24, 2008, 7:06:29 PM10/24/08
to Android Internals
I have gone through the same problems and I can confirm that the steps
Tom Moris shared here will allow you to build the source successfully
on an 64AMD platform.

What to do next is a big question mark for me! But one step at a time.

Cheers,

On Oct 24, 11:58 am, "Tom Morris" <tfmor...@gmail.com> wrote:
> Koba & Disconnect - Thanks for the tips.  Apologies to everyone for
> the duplicate post, but there was a significant moderation delay
> yesterday and the other query hadn't been posted when I wrote mine.
>
> I got everything to build and run on 64-bit Linux once all the
> necessary dependencies were installed.
>
> The libX11 problem mentioned by Jonas Bonn is due to this Ubuntu bug
>
>    https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/117131
>
> If you've got ia32-libs installed, you can work around the problem by
> creating the softlink by hand.
>
>     $ cd /usr/lib32
>     $ sudo ln -s libX11.so.6 libX11.so
>
> I had most of what I need installed, so I'm not sure this list of
> dependencies is complete, but you definitely need a bunch of the
> 32-bit dev packages.  Combining the lists from Koba and Disconnect,
> I'd suggest starting with
>
>     $ sudo apt-get install ia32-libs  g++-multilib gcc-multilib
> lib32z1-dev lib32ncurses5-dev
>
> and then creating the softlink as described above.  Of course, this is
> in addition to the dependencies already listed on Google's build pagehttp://source.android.com/download#TOC-Linux

Yalcin

unread,
Oct 25, 2008, 7:59:11 AM10/25/08
to Android Internals
Hi,

i made the changes Tom wrote, also
$ sudo ln -s libX11.so.6 libX11.so

however the following error occurs:
---
host Executable: emulator (out/host/linux-x86/obj/EXECUTABLES/
emulator_intermediates/emulator)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/
4.2.4/../../../libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/
4.2.4/../../../libX11.a when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libX11.so when
searching for -lX11
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libX11.a when
searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libX11.so when searching
for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libX11.a when searching
for -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_intermediates/
emulator] Error 1
---

any help !
Yalcin

On Oct 24, 8:58 pm, "Tom Morris" <tfmor...@gmail.com> wrote:
> Koba & Disconnect - Thanks for the tips.  Apologies to everyone for
> the duplicate post, but there was a significant moderation delay
> yesterday and the other query hadn't been posted when I wrote mine.
>
> I got everything to build and run on 64-bit Linux once all the
> necessary dependencies were installed.
>
> The libX11 problem mentioned by Jonas Bonn is due to this Ubuntu bug
>
>    https://bugs.launchpad.net/ubuntu/+source/ia32-libs/+bug/117131
>
> If you've got ia32-libs installed, you can work around the problem by
> creating the softlink by hand.
>
>     $ cd /usr/lib32
>     $ sudo ln -s libX11.so.6 libX11.so
>
> I had most of what I need installed, so I'm not sure this list of
> dependencies is complete, but you definitely need a bunch of the
> 32-bit dev packages.  Combining the lists from Koba and Disconnect,
> I'd suggest starting with
>
>     $ sudo apt-get install ia32-libs  g++-multilib gcc-multilib
> lib32z1-dev lib32ncurses5-dev
>
> and then creating the softlink as described above.  Of course, this is
> in addition to the dependencies already listed on Google's build pagehttp://source.android.com/download#TOC-Linux

ubuntu_user

unread,
Oct 25, 2008, 12:01:29 PM10/25/08
to Android Internals
Could you post here the result of this ls command?

$ ls -l /usr/lib32/libX11*

May be you have different version of libX11 installed.

art-info

unread,
Oct 25, 2008, 7:28:32 PM10/25/08
to android-...@googlegroups.com
Result of   /usr/lib64/

$ ls -l /usr/lib64/libX11*
-rw-r--r-- 1 root root 1969010 2008-03-11 22:06 /usr/lib64/libX11.a
lrwxrwxrwx 1 root root      15 2008-10-24 21:57 /usr/lib64/libX11.so -> libX11.so.6.2.0
lrwxrwxrwx 1 root root      15 2008-10-23 01:02 /usr/lib64/libX11.so.6 -> libX11.so.6.2.0
-rw-r--r-- 1 root root 1060528 2008-03-11 22:06 /usr/lib64/libX11.so.6.2.0
lrwxrwxrwx 1 root root      19 2008-10-23 01:02 /usr/lib64/libX11-xcb.so.1 -> libX11-xcb.so.1.0.0
-rw-r--r-- 1 root root    3976 2008-03-11 22:06 /usr/lib64/libX11-xcb.so.1.0.0

Thanks

2008/10/25 ubuntu_user <tie...@gmail.com>

Yalcin

unread,
Oct 25, 2008, 7:36:28 PM10/25/08
to Android Internals
sorry, you meant /usr/lib32/libX11*

hier is the result:
$ ls -l /usr/lib32/libX11*
lrwxrwxrwx 1 root root 15 2008-10-25 11:27 /usr/lib32/libX11.so.6 -
> libX11.so.6.2.0
-rw-r--r-- 1 root root 944876 2008-03-11 21:33 /usr/lib32/libX11.so.
6.2.0

Thanks

koba

unread,
Oct 25, 2008, 10:48:51 PM10/25/08
to Android Internals
Hi, Yalcin

You need /usr/lib32/libX11.so
So what you should do is
$ cd /usr/lib32
$ sudo ln -s libX11.so.6 libX11.so


Yalcin

unread,
Oct 26, 2008, 3:23:18 AM10/26/08
to Android Internals
Yes you are right. I had link in /usr/lib64.
After
$ sudo ln -s libX11.so.6 libX11.so

build is succesfull.
Thank you very much.
Reply all
Reply to author
Forward
0 new messages