Linux Ubuntu make command error 127 - c++

Whenever I try to run the make-command, It gives me following error.
make: powerpc-fsl-linux-g++: Command not found
make: *** [main.o] Error 127
The obvious conclusion would be:
The command 'g++' was not found on your system, install it.
(sudo apt-get install g++)
However, the g++ command works perfectly, and is installed.
Also, my system does not have an active Internet connection, so I can't run any apt-get command successfully.
The make-command creates an output file, but I'm not sure if it's complete and working, since there is an error.
Also, the make install command displays the exact same error.
Any help, on how I can solve this Error?

You need to install the package powerpc-fsl-linux-g++.

Related

Problem with Ocaml and make: "Error: the file ____.cmxa is not a compilation unit description"

I'm running make in the top level of the UniMath directory and make keeps returning errors. I'm working on fedora 35 and I'm using Ocaml version 4.11.2.
Here is a print out of the errors
make[2]: Entering directory '/home/rymndbkr/UniMath/sub/coq'
OCAMLBEST -o bin/coqdep_boot
File "_none_", line 1:
Error: tools/coqdep_boot.cmx is not a compilation unit description.
OCAMLBEST -o bin/ocamllibdep
File "_none_", line 1:
Error: tools/ocamllibdep.cmx is not a compilation unit description.
COQMKTOP -o bin/coqtop.opt
File "topbin/coqtop_bin.ml", line 11, characters 20-32:
11 | let drop_setup () = Mltop.remove ()
^^^^^^^^^^^^
Error: Unbound module Mltop
make[2]: *** [Makefile.build:422: bin/coqtop.opt] Error 2
make[2]: Leaving directory '/home/rymndbkr/UniMath/sub/coq'
make[1]: *** [Makefile.make:178: submake] Error 2
make[1]: Leaving directory '/home/rymndbkr/UniMath/sub/coq'
Makefile:76: .coq_makefile_output.conf: No such file or directory
make: *** [Makefile:247: sub/coq/bin/coq_makefile] Error 2
I'll describe the process I went through in hopes that it is reproducible. I was following the UniMath installation instructions on their github (https://github.com/UniMath/UniMath/blob/master/INSTALL.md). They did not have any installation instructions for fedora so I attempted to convert their Debian instructions. The main thing they wanted Debian users to do was run the command
sudo apt-get install build-essential git ocaml ocaml-nox ocaml-native-compilers camlp5 libgtk2.0 libgtksourceview2.0 liblablgtk-extras-ocaml-dev ocaml-findlib libnum-ocaml-dev emacs
To convert this, I made sure I had Ocaml version 4.11.2. I just followed the steps on Ocaml's site (https://ocaml.org/docs/install.html). There was a script which prompted me to modify ~/.bash_profile. I said yes. I also said yes when it prompted me to add a hook.
I also installed ocaml-num via the command dnf since this was required for later versions of ocaml.
I also installed #development-tools via dnf since another stack exchange post recommended it as the best fedora equivalent of build-essentials, the latter of which is part of the downloads for prepping a Debian computer for UniMath.
There are some things I did not mention that the UniMath site said to install to prep a Debian computer. I either had these things (or their equivalents installed) or could not figure out if they had equivalents.
I decided to just go ahead and try to finish the installation. I simply ran
git clone https://github.com/UniMath/UniMath
cd \UniMath
make BUILD_COQIDE=yes
It is on the last of these commands that the errors arose.
P.S. - Please let me know if there is information I should add to this question, or any way to improve it.
The error message not a compilation unit description is likely due to a mismatch between the Ocaml version that compiled the file and the one that is trying to read it.
You can use ocamlobjinfo to check that hypothesis.
A possible fix is to use make clean to reinitialize the state, and then rebuild it after ensuring that the environment is consistent with a call to eval $(opam env).

Can't install local-build gcc-4.9.0 because of libgmp.so.3

I am trying to install gcc-4.9.0 in local-build on linux along with gmp-4.3.2, mpfr-3.1.4 and mpc-1.0.3 (I am following this tutorial).
But when I run make install in the gcc build directory, I get this error :
test -z "/home/k.masson/gcc-4.9.0/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0" || /usr/bin/mkdir -p "/home/k.masson/gcc-4.9.0/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0"
Installing dummy lib libgcj_bc.so.1.0.0
/home/k.masson/build/gcc-4.9.0/host-x86_64-unknown-linux-gnu/gcc/cc1:
Mainly this :
error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory
It seems that libgmp.so.3 is not correctly installed but it is ('make install'didn't failed for gmp) and I checked many times if the links were correct but nothing to do, I don't know why the make file don't find it.
Before running make install, I run these commands in the following order :
LD_LIBRARY_PATH=/home/k.masson/gmp-4.3.2/lib:/home/k.masson/mpfr-2.4.2/lib:/home/k.masson/mpc-0.8.1/lib ./configure --prefix=/home/k.masson/gcc-4.9.0 --with-gmp=/home/k.masson/gmp-4.3.2 --with-mpfr=/home/k.masson/mpfr-2.4.2 --with-mpc=/home/k.masson/mpc-0.8.1 --disable-multilib
And this (I don't know why but this is in the tutorial):
LD_LIBRARY_PATH=/home/k.masson/gmp-4.3.2/lib:/home/k.masson/mpfr-2.4.2/lib:/home/k.masson/mpc-0.8.1/lib nice -n 19 time make -j8
libgmp.so.3 is in /home/k.masson/gmp-4.3.2/lib as well as libgmp.so.3.5.2. I even tried to create the link myself with ln -s libgmp.so.3.5.2 libgmp.so.3 but it doesn't fix the problem.
To install gmp in local-build, I used these commands :
./configure --prefix=/home/k.masson/gmp-4.3.2 --enable-cxx
nice -n 19 time make -j8
make install
make check
echo $? # Returns 2
But one test fail :
====================================
1 of 58 tests failed
Please report to gmp-bugs#gmplib.org
====================================
make[4]: *** [check-TESTS] Error 1
make[4]: Leaving directory `/home/k.masson/build/gmp-4.3.2/tests/mpz'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/home/k.masson/build/gmp-4.3.2/tests/mpz'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/home/k.masson/build/gmp-4.3.2/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/k.masson/build/gmp-4.3.2'
make: *** [check] Error 2
Also, I got these few lines above when I'm running the tests:
/bin/sh: line 4: 20956 Segmentation fault (core dumped) ${dir}$tst
So I tried to install gmp-6.1.0 to avoid this test issue and it works, all tests are Ok but now, this is a gcc issue, I can't run make install anymore because the make file doesn't exists.. Should I keep the new gmp ? And change my gcc ? Or not at all ?
Thanks for your help
The short way
To fix the test issue when installing gmp, I just choosed a newer version to install, it looked as a compatibility issue. So I picked up gmp-6.1.0 and install and test processes were successful.
But this brought a new problem when installing gcc-4.9.0, the ./configure wasn't able to generate a make file with a install procedure. So I had to get a newer version, I chose gcc-4.9.3 instead of gcc-4.9.0 and everything works perfectly.
The clean way
As #piyush made me noticed, the short way is not recommended at all. See Installing GCC.
If you want to do a local-build, the best is to download the gcc version you want here and before installing it, run the ./contrib/download_prerequisites script in the gcc source.
If not, you can use your package manager, which is much better.

makefile compilation error for compiling on Arm board

I wanted to install rt8192cu driver on my ubuntu 12.0.4 LTS based OS (xillinux) running on an ARM processor (microzed board, zynq processor).
git clone https://github.com/dz0ny/rt8192cu.git
After I enter the above command and enter into the directory, and type make , i get the following error.
make[1]: Entering directory `/usr/src/kernels/3.12.0-xillinux-1.3'
Makefile:579: /usr/src/kernels/3.12.0-xillinux-1.3/arch/armv7l/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/kernels/3.12.0-xillinux-1.3/arch/armv7l/Makefile'. Stop.
make[1]: Leaving directory `/usr/src/kernels/3.12.0-xillinux-1.3'
make: *** [modules] Error 2
The makefile can be found at https://github.com/dz0ny/rt8192cu/blob/master/Makefile
The ubuntu based OS I am using is, http://xillybus.com/downloads/doc/xillybus_getting_started_zynq.pdf
How do I modify the makefile to compile directly on my platform ?
even with linux-headers installed sometimes it fails, a quick workaround is this:
ln -s /lib/modules/`uname -r`/build/arch/arm /lib/modules/`uname -r`/build/arch/armv7l
a long workaround is to compile your own config from source with the same dot-config file and install all the stuff.
If I understand correctly you are trying to compile a Linux Kernel Module for the RT8192CU Wi-Fi IC.
Moreover, you are running Ubuntu directly on the Zynq and you are trying to compile in place.
The error you receive is given by the lack of the Kernel headers, namely '3.12.0-xillinux-1.3', which should be the same kernel version you are using (try write uname -r in terminal).
The quickest way to solve is to let Ubuntu install the required sources/headers (provided the Kernel Module is targeting distribution-provided sources and you are running that specific kernel when issuing the following command) with
$ sudo apt-get install linux-headers-$(uname -r)

Error installing pyMPI on CentOS 5.9

I'm trying to make a local install of pyMPI on a server running CentOS 5.9 (i.e. I don't have sudo privileges). The ./configure step completes successfully, however there a lot of "no"s. When i try running make i get a lot of "deprecated" error messages and the process exits with error code 2. Can anyone help me with this please?
The results of running
./configure --prefix=/inside/home/aarjunrao/apps/py_modules/pyMPI
are as follows
./configure output
I then run make, which gives the output
make output
Thanks in advance,
Arjun
From your make output, line 305:
pyMPI_util.c:22:31: error: numpy/arrayobject.h: No such file or directory
Is NumPy installed on this system? If not, that's probably your problem...
You can use this option in the configure process
./configure --prefix=/inside/home/aarjunrao/apps/py_modules/pyMPI --with-includes='-I/[path_to_numpy]/core/include'
In my case, it is
--with-includes='-I/usr/local/lib/python2.7/site-packages/numpy/core/include'
Doing that, you don't need to modify the system PATH.

linux/videodev.h : no such file or directory - OpenCV on ubuntu 11.04

I tried to install OpenCV2.2 on Ubuntu 11.04. But OpenCV compilation fails stating an error related to linux/videodev.h file.
File available in /user/includes/linux is named videodev2.h.
/home/user/OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp:217:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_v4l.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
Is there a solution for this ?
thank you.
The current answer is incomplete. Installing libv4l-dev creates a /usr/include/linux/videodev2.h but doesn't solve the stated problem of not being able to find linux/videodev.h. The library does ship header files for compatibility, but fails to put them where applications will look for them.
sudo apt-get install libv4l-dev
cd /usr/include/linux
sudo ln -s ../libv4l1-videodev.h videodev.h
This provides a linux/videodev.h, and of the right version (1).
sudo apt-get install libv4l-dev
Editing for RH based systems :
On a Fedora 16 to install pygame 1.9.1 (in a virtualenv):
sudo yum install libv4l-devel
sudo ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
v4l support has been dropped in recent kernel versions (including the one shipped with Ubuntu 11.04).
EDIT: Your question is connected to a recent message that was sent to the OpenCV users group, which has instructions to compile OpenCV 2.2 in Ubuntu 11.04. Your approach is not ideal.
The patch is here: https://code.ros.org/trac/opencv/attachment/ticket/862/OpenCV-2.2-nov4l1.patch
By adding #ifdef HAVE_CAMV4L around
#include <linux/videodev.h>
in OpenCV-2.2.0/modules/highgui/src/cap_v4l.cpp and removing || defined (HAVE_CAMV4L2) from line 174 allowed me to compile.
for CMake remove/disable with_libv4l with_v4l variables if you do not need this lib.