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?
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
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
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
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
Related
I'm running Debian on Windows 10 (Windows Subsystem for Linux) and installed Rust using the command:
curl https://sh.rustup.rs -sSf | sh
There were no errors in the install, but when I tried to compile with rustc I got the error linker 'cc' not found.
The Linux Rust installer doesn't check for a compiler toolchain, but seems to assume that you've already got a C linker installed! The best solution is to install the tried-and-true gcc toolchain.
sudo apt install build-essential
If you need to target another architecture, install the appropriate toolchain and target the compilation as follows:
rustc --target=my_target_architecture -C linker=target_toolchain_linker my_rustfile.rs
I ran the following 2 commands and it worked.
sudo apt-get update
sudo apt install build-essential
You have to install some dependencies
for Arch Linux sudo pacman -S base-devel
for Ubuntu sudo apt install build-essential
for Centos sudo yum install gcc
for Solus sudo eopkg it -c system.devel
Solution for CentOS:
yum -y install gcc
if u are on wsl2 - ubuntu try to update the pacakges with following cmds:
sudo apt-get update
sudo apt install build-essential
Solution for Solus:
sudo eopkg it -c system.devel
Please do an "Update and Upgrade" before installing setup tools.
You can fix this problem by adding build essential package in linux
sudo apt install -y build-essential
IF ABOVE IS NOT WORKING: cc is included in the "GCC" package. You need to uninstall GCC and then reinstall it if you have accidentally replaced or removed the cc binary.
I ran the following commands in wsl1, it worked
sudo apt-get update
sudo apt install build-essential
I have installed GrADS on my Ubuntu 16.04.4 LTS system (x86_64) and after following all the INSTALL steps, I am getting the following error in my terminal:
/usr/local/bin/grads: error while loading shared libraries:
libssl.so.10: wrong ELF class: ELFCLASS64
What have done wrong? I definitely have OpenSSL installed on my system.
Ok, I have determined why I was having so many issues installing the latest version of GrADS (v2.2.1) the other day... My system is 64-bit and I was trying to install the 32-bit version... Doh!
Here are the commands that I used for v2.2.1:
cd /usr/local/lib/grads
wget ftp://cola.gmu.edu/grads/data2.tar.gz
tar -zxvf data2.tar.gz
cd
clear
wget ftp://cola.gmu.edu/grads/Supplibs/2.2/builds/supplibs-centos7.4-x86_64.tar.gz
tar -zxvf supplibs-centos7.4-x86_64.tar.gz
sudo apt-get install libcurl4-openssl-dev libssl1.0.0 libssl-dev libjpeg62-dev libgeotiff-dev
sudo apt-get install libtiff-dev
sudo apt-get install libcurl4-openssl-dev libssl1.0.0 libssl-dev libjpeg62-dev libgeotiff-dev
sudo ln -s /usr/local/lib/grads/supplibs/libpng15.so.15 /usr/lib/
sudo ln -s /usr/local/lib/grads/supplibs/libhdf5.so.8 /usr/lib/
sudo ln -s /usr/local/lib/grads/supplibs/libnetcdf.so.7 /usr/lib/
sudo ln -s /usr/local/lib/grads/supplibs/libhdf5_hl.so.8 /usr/lib/
sudo ln -s /usr/local/lib/grads/supplibs/libtiff.so.3 /usr/lib/
sudo ln -s /usr/local/lib/grads/supplibs/libgeotiff.so /usr/lib/
sudo ln -s /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.10
sudo apt-get install libjpeg62-dev
I am trying to compile C++ code for ARM architecture. I don't know exactly the full name of processor (waiting for information from some hardware guy), I know only it is some ARM.
The problem which I have.
I use command in order to compile my resource files for ARM architecture:
arm-linux-gnueabi-g++ myApp.cpp -g -Wall -o myApp
and also
arm-linux-gnueabi-gcc myApp.cpp -g -Wall -lstdc++ -o myApp
and gets output:
-bash: arm-linux-gnueabi-g++: command not found
and
-bash: arm-linux-gnueabi-gcc: command not found
In linux which I used I am not sure if there is installed gcc,g++ arm package...
There is:
locate arm-none-linux-gnueabi-
locate arm-linux-gnueabihf-g++
locate arm-linux-gnueabihf-gcc
, there is none:
locate arm-linux-gnueabi-g++
locate arm-linux-gnueabi-gcc
I am not allowed to do some tries and install arm package, because this linux is running on some server to which many developers are attached.
setting PATH in shell:
PATH=$PATH:/opt/eds/x86_64/13.1-2/embedded/ds-5/bin/arm-linux-gnueabihf-g++
or with gcc
doesn't solve the issue.
Setting it in:
~/.bashrc
also doesn't solve the issue because additional problems occurs, I cannot connect to linux server.
Thanks in advance for any help.
for kernel or uboot cross compiling below commands are enough:
sudo apt-get install -y gcc-arm-linux-gnueabihf
sudo apt-get install -y libncurses-dev
sudo apt-get install -y libqt4-dev pkg-config
sudo apt-get install -y u-boot-tools
sudo apt-get install -y device-tree-compiler
but for c++ cross compiling you should install g++ using below command:
sudo apt-get install g++-arm-linux-gnueabihf
I'm getting this error when I try to compile a small helloworld c file:
/opt/crosstool/arm-none-linux-gnueabi-4.4.0_ARMv5TE/bin/arm-none-linux-gnueabi-gcc -DARCH_ARM -o hello.c.o -c hello.c
arm-none-linux-gnueabi-gcc: error trying to exec '/opt/crosstool/arm-none-linux-gnueabi-4.4.0_ARMv5TE/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.0/../../../../arm-none-linux-gnueabi/bin/as': execv: No such file or directory
I am running ubuntu 14.04 lts ... I see that I have exec command but there is no execv on my ubuntu. what is execv ?
Thanks
The issue was caused by missing 32 bit libraries from my Ubuntu 14.04 64 bit.
To solve this I had to install:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
What are the .deb packages needed to run these commands on a debian wheezy Linux?
cd software_that_builds_with_autotools
autoreconf --install &&\
./configure --prefix=/opt/foo/bar &&\
make && make install
I tried installing the following, but it still says it is lacking aclocal:
apt-get install binutils make csh g++ sed gawk autoconf autotools-dev
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
Just use
sudo apt-get install binutils make csh g++ sed gawk autoconf automake autotools-dev