0

I was trying to build B2G for emulator, but I've got an error.

Environment:

  • Ubuntu 12.04.1 x64

  • gcc 4.6.3

Install: out/host/linux-x86/bin/traceview host SharedLib: libGLES_CM_translator (out/host/linux-x86/obj/lib/libGLES_CM_translator.so) /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

real 1m33.903s user 0m46.539s sys 0m6.088s

Build failed! <

How do I fix it?

  • Run following scripts: " #!/bin/bash # install_files=`dpkg -L libdrm-dev:i386 libgl1-mesa-dev:i386 libxext-dev:i386 mesa-common-dev:i386`; for file in $install_files;do if [ ! -d $file ];then echo $file >> /tmp/GL_i386.log fi done cd / cat /tmp/GL_i386.log|xargs tar czf /tmp/GL_i386.tgz sudo apt-get install libgl1-mesa-dev sudo tar zxf /tmp/GL_i386.tgz " Then build the Android as usual: $ source ./build/envsetup.sh $ lunch full_x86-eng $ make droid -jN – m4n07 Sep 25 '12 at 13:35
  • @m4n07 you should turn that into an answer. – Nelson Sep 28 '12 at 16:58

4 Answers4

2

Firefox OS build prerequisites

When building on 64-bit Ubuntu, you may find that you need to add symlinks for the 32-bit >versions of libX11.so and libGL.so:

$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

none53
  • 63
  • 8
0

Here you should find the solution to your problem.

#> sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386

and then:

#> sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Avio
  • 2,700
  • 6
  • 30
  • 50
0

from the Firefox OS wiki (Firefox OS build prerequisites), about building on Ubuntu 12.04 x64:

$ sudo apt-get install autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev libgl1-mesa-dev libx11-dev make

and then,

$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so /usr/lib/i386-linux-gnu/libGL.so
Mathieu
  • 5,495
  • 2
  • 31
  • 48
0

I had the exact same error while compiling Android. The following fixed it:

sudo apt-get install libgl1-mesa-dev:i386

I did not have to create any symbolic links or anything, just this simple install

www.jensolsson.se
  • 3,023
  • 2
  • 35
  • 65