I use AOSP to build Android.
I use these commands to build Android on my Ubuntu 17.04:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
repo sync -j8
. build/envsetup.sh
lunch
make -j8
and after 30 minutes this error came, anybody knows how to fix it?
host Executable: tblgen (out/host/linux-x86/obj/EXECUTABLES/tblgen_intermediates/tblgen)
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
/usr/bin/ld: cannot find -lGL
/usr/bin/ld: cannot find -lGL
make: *** [out/host/linux-x86/obj/lib/libGLES_CM_translator.so] Error 1
make: *** Waiting for unfinished jobs....
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
It would appear that you have not completely followed the "Establishing a Build Environment" instructions completely.
I see you're trying to build Android Ice Cream Sandwich (4.0.1) on Ubuntu 17 - please note that this is not a supported build / host environment and may not function correctly.
It would appear that you have a misconfigured or missing installs of the libx11-dev and libgl1-mesa-dev libraries (or whatever their Ubuntu 17 equivalents are named).
I would recommend installing Ubuntu 14 and trying Android L or N instead.
Using these solutions will solve the problems:
for -lGL error:
sudo apt-get install libgl1-mesa-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
for -lX11 error:
add this line LOCAL_LDLIBS += -lX11 to the file
development/tools/emulator/opengl/host/renderer/Android.mk
More information:
http://developers-club.com/posts/209206/
http://www.mamicode.com/info-detail-232796.html
You are missing a libGL.so file. This is the OpenGL library. Ensure that you have the appropriate OpenGL library installed and it is part of the search path (see -L directives).
Related
I am trying to implement text generator of JAMR. It redirects me to install cdec. I followed this tutorial to install cdec. BUT
I installed gcc-4.8 (I had a better version 5.x but I thought 4.8 is neccessary). So I installed gcc-4.8 using this. And I build Boost using this (in ~/prefix/sw), I used boost_1_58 because it was latest. Everything worked fine.
Coming back to the tutorial, instead of cd ~/prefix/sw I went to cd jamr/tools/cdec where my cdec is present. Did autoreconf -ifv and ./configure --prefix=/home/student/prefix, fine till now (I just had to comment line 216 of containing boost_major_version and wrote boost_major_version="158"). But when I do make after a while I get
libtool: link: g++ -std=gnu++11 -fPIC -g -O3 /usr/lib /usr/lib -o reconstruct_weights reconstruct_weights.o -L/usr/lib libutils.a -ldl -lrt -lboost_program_options -lboost_regex -lboost_serialization -lboost_system -lboost_filesystem -lz -lbz2
/usr/bin/ld: cannot find /usr/lib: File format not recognized
/usr/bin/ld: cannot find /usr/lib: File format not recognized
collect2: error: ld returned 1 exit status
Makefile:836: recipe for target 'reconstruct_weights' failed
make[2]: *** [reconstruct_weights] Error 1
make[2]: Leaving directory '/home/student/ATS/jamr/tools/cdec-2014-10-12/utils'
Makefile:480: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/student/ATS/jamr/tools/cdec-2014-10-12'
Makefile:410: recipe for target 'all' failed
make: *** [all] Error 2
I tried sudo make, simple ./configure and make clean;make. No help. This is make file.
When you are in the cdec folder and you try to execute the commands there according to the instructions, we see that you get the collect2 error: error: ld returned 1 exit status. In the cdec folder, i initially execute the command:
gcc -std=gnu99 -Wall -Werror -g array_product.c -o array_product -I../../ZDK -L../../ZDK -I../../TestLib04 -L../../TestLib04 -ltestlib04 -lzdk -lncurses -lm
After this command, the error is solved and i get to the file and it says:
> First, you need all the build dependencies, and the fastest way to install them all is this command, which installs not only the compiler but the additional boost libraries and Flex that you'll need. sudo apt-get install build-essential libboost-all-dev cmake flex
> Secondly, create a directory and go into it (you said ~/prefix/sw in your comments).
> Thirdly, git clone https://github.com/redpony/cdec.git
> Fourthly, you probably did not read the README page on the GitHub repository which explains what commands to run to make the software build. It lists these as the build steps, after cd-ing into the newly created cdec folder.
I was trying to install Armadillo in my Ubuntu 14.04.
I run cmake . command in the terminal at the folder where the Armadillo files are located and then run make command. I got the following errors.
/usr/bin/ld: /usr/local/lib/libsuperlu.a(util.c.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/libsuperlu.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libarmadillo.so.7.800.1] Error 1
make[1]: *** [CMakeFiles/armadillo.dir/all] Error 2
make: *** [all] Error 2
How can I rectify this?
The library at /usr/local/lib/libsuperlu.a on your system was most likely not built with -fPIC and you are presumably trying to build a shared library that uses code from libsuperlu.a. If this is your situation, then the compiler is telling you that the code in libsuperlu.a is not relocatable, but your shared library needs it to be. You will need to build your own libsuperlu.a and ensure that all of its object files are compiled with the -fPIC flag, since the libsuperlu.a you currently have installed in /usr/local/lib won't work for you.
Im trying to install openl2tp on CentOS.I have downloaded the source from here but when i try to run make it gives me the following error
gin.o l2tp_event.o l2tp_test.o md5.o l2tp_api.o l2tp_rpc_server.o l2tp_rpc_xdr.o l2tp_config_token.o l2tp_config_parse.o -Wl,-E -L. -Lusl -lusl -ldl -lc -lfl
/usr/bin/ld: cannot find -lfl
collect2: ld returned 1 exit status
make: *** [openl2tpd] Error 1
can someone guide me what im doing wrong...
Regards
libfl is from the flex package. Try installing flex-devel.
When I install gearmand on mac10.8.3. Everything seems fine when I install libevent boost and so on . But at last I got and error return 1 when I run command make.
Error infomation is :
`make -j5 all-am
CXXLD bin/gearadmin
ld: library not found for -lboost_program_options-mt
collect2: ld returned 1 exit status
make[1]: * [bin/gearadmin] Error 1
make: * [all] Error 2`
I guess you need libboost-program-options-dev (debian name) library - try to find how it's named in MacOS.
I am trying to install Giza++ and Moses on Ubuntu 12.10 64bit. While make I keep on getting the same problem:
Finished building giza
cp ../lib/libgiza.a /usr/local/lib/
................................
giza-pgplot.o -L/usr/X11R6//lib -lX11 -L/usr/X11R6//lib -lcairo -lm -L/usr/local /lib/x86_64/ -lgfortran
/usr/bin/ld: giza-fortran.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
giza-fortran.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [../lib/libpgplot.so] Error 1
make[1]: Leaving directory `/home/maria/moses/giza/build'
make: *** [install] Error 2 "
Googling did not help much. I would be very grateful for any tip of how to solve this problem. What should I do to recompile it with -fPIC?
This problem existed only with the giza check out from the svn. This one from tar.gz http://code.google.com/p/giza-pp/downloads/list installed without any problems. Whatever it was...