[android-building] ICS build failure: skipping incompatible //usr/lib/libGL.so when searching for -lGL

2,746 views
Skip to first unread message

Jarvis

unread,
Nov 16, 2011, 2:34:42 AM11/16/11
to Android Building
Is anyone facing following error on Ubuntu 10.10 ?

JarJar: out/target/common/obj/JAVA_LIBRARIES/
bouncycastle_intermediates/classes-jarjar.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/
classes-jarjar.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/
classes-jarjar.jar
Install: out/target/product/generic/system/lib/libm.so
Install: out/target/product/generic/system/lib/libstdc++.so
target SharedLib: liblog (out/target/product/generic/obj/
SHARED_LIBRARIES/liblog_intermediates/LINKED/liblog.so)
Install: out/target/product/generic/system/lib/libgabi++.so
target SharedLib: libicuuc (out/target/product/generic/obj/
SHARED_LIBRARIES/libicuuc_intermediates/LINKED/libicuuc.so)
Install: out/host/linux-x86/bin/adb
target Symbolic: libext4_utils (out/target/product/generic/symbols/
system/lib/libext4_utils.so)
Install: out/host/linux-x86/bin/simg2img
host SharedLib: libGLES_CM_translator (out/host/linux-x86/obj/lib/
libGLES_CM_translator.so)
host SharedLib: libEGL_translator (out/host/linux-x86/obj/lib/
libEGL_translator.so)
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/
4.4.5/../../../libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible //usr/lib/libGL.so when searching
for -lGL
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libGLES_CM_translator.so] Error
1
make: *** Waiting for unfinished jobs....
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/
4.4.5/../../../libGL.so when searching for -lGL
/usr/bin/ld: skipping incompatible //usr/lib/libGL.so when searching
for -lGL
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libEGL_translator.so] Error 1

I've installed libgl1-mesa-dev, mesa-common-dev.
lrwxrwxrwx 1 root root 13 2011-11-16 14:04 libGL.so ->
mesa/libGL.so

Conley Owens

unread,
Nov 16, 2011, 11:59:59 AM11/16/11
to android-...@googlegroups.com
Having you installed everything listed under "Installing required packages"?
http://source.android.com/source/initializing.html

It looks like you are missing a 32-bit version of the library, and a
package like ia32-libs might fix that.

~cco3

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>

Samuel B. Quiring

unread,
Nov 16, 2011, 1:53:47 PM11/16/11
to android-...@googlegroups.com
Greetings,

I am getting this error:

...
target Java: CtsThemeTestCases
(out/target/common/obj/APPS/CtsThemeTestCases_intermediates/classes)
target Java: CtsUsePermissionDiffCert
(out/target/common/obj/APPS/CtsUsePermissionDiffCert_intermediates/classes)
target Java: CtsUtilTestCases
(out/target/common/obj/APPS/CtsUtilTestCases_intermediates/classes)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
target R.java/Manifest.java: CtsVerifier
(out/target/common/obj/APPS/CtsVerifier_intermediates/src/R.stamp)
Warning: AndroidManifest.xml already defines versionCode (in
http://schemas.android.com/apk/res/android); using existing value in
manifest.
Warning: AndroidManifest.xml already defines versionName (in
http://schemas.android.com/apk/res/android); using existing value in
manifest.
Warning: AndroidManifest.xml already defines minSdkVersion (in
http://schemas.android.com/apk/res/android); using existing value in
manifest.
target Java: CtsVerifier
(out/target/common/obj/APPS/CtsVerifier_intermediates/classes)
cts/apps/CtsVerifier/src/com/android/cts/verifier/PassFailButtons.java:191:
onCreateDialog(int,android.os.Bundle) in android.app.Activity cannot
implement onCreateDialog(int,android.os.Bundle) in
com.android.cts.verifier.PassFailButtons.PassFailActivity; attempting to
assign weaker access privileges; was public
private static <T extends android.app.Activity & PassFailActivity>
^
1 error
make: ***
[out/target/common/obj/APPS/CtsVerifier_intermediates/classes-full-debug.jar
] Error 41
$

--------------
$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.9) (6b20-1.9.9-0ubuntu1~10.04.2)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode

This java works for building gingerbread. I see in your instructions you
advocate Sun's java. I am guessing you are going to tell me to switch to
that.

Is there a Lunch selection for building for the emulator but not building
the CTS test suite?

-Sam

Jean-Baptiste Queru

unread,
Nov 16, 2011, 2:25:12 PM11/16/11
to android-...@googlegroups.com
This is indeed one of the errors that happen in OpenJDK but not in Sun JDK.

Can can always hack some makefiles or projects away if you don't want
to build a specific part of the system.

JBQ

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Dmitry Golubovsky

unread,
Nov 17, 2011, 5:21:27 AM11/17/11
to Android Building
Hi,

I am getting exact same error building generic_x86-eng.

Ubuntu intrepid, ia32-libs installed, 32-bit libGL.so is in /usr/lib32

golubovsky@www:~/androbuild$ ldd /usr/lib32/libGL.so.1
linux-gate.so.1 => (0xf7fc9000)
libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7e3b000)
libXext.so.6 => /usr/lib32/libXext.so.6 (0xf7e2c000)
libXxf86vm.so.1 => /usr/lib32/libXxf86vm.so.1 (0xf7e26000)
libXdamage.so.1 => /usr/lib32/libXdamage.so.1 (0xf7e23000)
libXfixes.so.3 => /usr/lib32/libXfixes.so.3 (0xf7e1e000)
libdrm.so.2 => /usr/lib32/libdrm.so.2 (0xf7e14000)
libm.so.6 => /lib32/libm.so.6 (0xf7dee000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7dd5000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7dd0000)
libc.so.6 => /lib32/libc.so.6 (0xf7c89000)
libxcb.so.1 => /usr/lib32/libxcb.so.1 (0xf7c70000)
librt.so.1 => /lib32/librt.so.1 (0xf7c67000)
/lib/ld-linux.so.2 (0xf7fca000)
libXau.so.6 => /usr/lib32/libXau.so.6 (0xf7c64000)
libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf7c5e000)

golubovsky@www:~/androbuild$ file /usr/lib32/libGL.so.1
/usr/lib32/libGL.so.1: symbolic link to `libGL.so.1.2'
golubovsky@www:~/androbuild$ file /usr/lib32/libGL.so.1.2
/usr/lib32/libGL.so.1.2: ELF 32-bit LSB shared object, Intel 80386,
version 1 (SYSV), for GNU/Linux 2.4.20, dynamically linked, stripped



On Nov 16, 11:59 am, Conley Owens <c...@android.com> wrote:
> Having you installed everything listed under "Installing required packages"?http://source.android.com/source/initializing.html
>
> It looks like you are missing a 32-bit version of the library, and a
> package like ia32-libs might fix that.
>
> ~cco3
>
> On Tue, Nov 15, 2011 at 11:34 PM, Jarvis <kiyo7...@gmail.com> wrote:
> > Is anyone facing following error on Ubuntu 10.10 ?
[skip]
> >hostSharedLib: libGLES_CM_translator (out/host/linux-x86/obj/lib/
> > libGLES_CM_translator.so)
> >hostSharedLib:libEGL_translator(out/host/linux-x86/obj/lib/
> >libEGL_translator.so)
> > /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/
> > 4.4.5/../../../libGL.so when searching for -lGL
> > /usr/bin/ld: skipping incompatible //usr/lib/libGL.so when searching
> > for -lGL
> > /usr/bin/ld:cannotfind-lGL
> > collect2: ld returned 1 exit status
> > make: *** [out/host/linux-x86/obj/lib/libGLES_CM_translator.so] Error
> > 1
> > make: *** Waiting for unfinished jobs....
> > /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/
> > 4.4.5/../../../libGL.so when searching for -lGL
> > /usr/bin/ld: skipping incompatible //usr/lib/libGL.so when searching
> > for -lGL
> > /usr/bin/ld:cannotfind-lGL
> > collect2: ld returned 1 exit status
> > make: *** [out/host/linux-x86/obj/lib/libEGL_translator.so] Error 1
>
> > I've installed libgl1-mesa-dev, mesa-common-dev.
> > lrwxrwxrwx   1 root root           13 2011-11-16 14:04 libGL.so ->
> > mesa/libGL.so
>
> > --
> > You received this message because you are subscribed to the "AndroidBuilding" mailing list.
> > To post to this group, send email toandroid...@googlegroups.com

Conley Owens

unread,
Nov 17, 2011, 12:01:50 PM11/17/11
to android-...@googlegroups.com
I had a problem with Ubuntu 11.10 where there was no symlink created
for libX11.so->libX11.so.1. Perhaps you are having a similar problem?

Does /usr/lib32/libGL.so exist? If not, try symlinking
/usr/lib32/libGL.so to /usr/lib32/libGL.so.1 and let me know if that
fixes anything for you.

~cco3

> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com

Dmitry Golubovsky

unread,
Nov 17, 2011, 8:38:21 AM11/17/11
to Android Building
Hi,

As I mentioned in another message, I have the same error on Ubuntu
Intrepid 64bit. 32-bit libGL seems to be installed in /usr/lib32

In the BoardConfig.mk related to generic_x86, there is a definition:

# Build OpenGLES emulation host and guest libraries
BUILD_EMULATOR_OPENGL := true

If I say false here, what happens? Will it exclude building these
problematic openGL libraries?

In fact, all I need is just userland filesystems (system.img and
friends) as I am going to test them in KVM, UML, and maybe physically
load on a PC, but never in QEMU. In fact I would like to exclude
buiding QEMU at all.

Thanks.

On Nov 16, 2:34 am, Jarvis <kiyo7...@gmail.com> wrote:
> Is anyone facing following error on Ubuntu 10.10 ?

[skip]

Dmitry Golubovsky

unread,
Nov 17, 2011, 12:18:54 PM11/17/11
to Android Building, golub...@gmail.com
I'll surely try!

Thank you.

黃柏鈞

unread,
Nov 18, 2011, 12:38:44 AM11/18/11
to android-...@googlegroups.com
Hi Conley,

I check the /usr/lib32/libGL.so and found that it links to /usr/lib32/libGL.so.1
And I changed it to /usr/lib32/mesa/libGL.so.1 than get build pass.
Thx.

Jarvis

Conley Owens

unread,
Nov 18, 2011, 11:37:34 AM11/18/11
to android-...@googlegroups.com
Great! I'd like to update the docs appropriately. Were you also
running Ubuntu 10.10? If not, what OS/version were you running?

Dmitry Golubovsky

unread,
Nov 18, 2011, 11:15:09 PM11/18/11
to Android Building
Yes, it at least got me past that point.

I had to symlink:

golubovsky@www:/usr/lib32$ ls -lt /usr/lib32 | head
total 36584
lrwxrwxrwx 1 root root 11 2011-11-18 22:14 libX11.so -> libX11.so.
6
lrwxrwxrwx 1 root root 10 2011-11-18 21:48 libGL.so -> libGL.so.1

So maybe it might be mentioned on the "Initializing a build
environment" page as a general recipe:

if the linker complains about skipping incompatible versions of some
shared libraries, but you believe you have them installed, try to
symlink their version-containing names (the shortest ones) into the
same directory where they are located, without version in the name.

Thank you.

On Nov 17, 12:01 pm, Conley Owens <c...@android.com> wrote:

黃柏鈞

unread,
Nov 19, 2011, 1:24:19 AM11/19/11
to android-...@googlegroups.com
Yes, Ubuntu 10.10.

jBeta

unread,
Jan 1, 2012, 7:46:44 PM1/1/12
to Android Building
I saw this thread and another related thread and just thought id point
something out...

This fixed my problem on Ubuntu 11.10 as well, but the android
initializing.html page says:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
when it should be
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/libGL.so

I'm not sure if it's a typo or a diff between 10.10 and 11.10. I hope
that helps someone out :)

On Nov 18 2011, 11:37 am, Conley Owens <c...@android.com> wrote:
> Great!  I'd like to update the docs appropriately.  Were you also
> running Ubuntu 10.10?  If not, what OS/version were you running?
>
>
>
>
>
>
>
> On Thu, Nov 17, 2011 at 9:38 PM, 黃柏鈞 <kiyo7...@gmail.com> wrote:
> > Hi Conley,
>
> > I check the /usr/lib32/libGL.so and found that it links to
> > /usr/lib32/libGL.so.1
> > And I changed it to /usr/lib32/mesa/libGL.so.1 than get build pass.
> > Thx.
>
> > Jarvis
>
> > On Fri, Nov 18, 2011 at 1:01 AM, Conley Owens <c...@android.com> wrote:
>
> >> I had a problem with Ubuntu 11.10 where there was no symlink created
> >> for libX11.so->libX11.so.1.  Perhaps you are having a similar problem?
>
> >> Does /usr/lib32/libGL.so exist?  If not, try symlinking
> >> /usr/lib32/libGL.so to /usr/lib32/libGL.so.1 and let me know if that
> >> fixes anything for you.
>
> >> ~cco3
>
> >> On Thu, Nov 17, 2011 at 2:21 AM, Dmitry Golubovsky <golubov...@gmail.com>
Reply all
Reply to author
Forward
0 new messages