mips gcc toolchain - gcc

I was trying to set up a toolchain for Mips on Ubuntu, as per the instructions here. However, when I do make CFLAGS="-Os -w", I get an error as follows :-
...
...
fi
echo timestamp > stmp-fixproto
make[2]: *** No rule to make target `/usr/local/bin/mips-elf-as', needed by `stamp-as'. Stop.
make[2]: Leaving directory `/home/mainuser/mips/gcc-obj/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/mainuser/mips/gcc-obj'
make: *** [all] Error 2
How could I go about correcting this error?

Which occurrence of make CFLAGS="-Os -w" is it failing on? From the error message, it looks like mips-elf-as has not been successfully built by the first stage of the process.

Related

how to install gdb 9.1 on debian from source code

I like to compile and use gdb 9.1. the source is here https://ftp.gnu.org/gnu/gdb/
Plus when I type make in config directory make says make: *** No targets specified and no makefile found. Stop. because there is not make file. on root folder there are Makefile.in and Makefile.tpl and Makefile.def. what are these files. and how can I install gdb 9 from source code.
Update
After the comment changes I made in command by G.M I am getting this error I think almost at the end of compiling process
mv GDBvn.new GDBvn.texi
/home/fawad/Desktop/gdb/gdb/gdb-9.1.1/missing makeinfo --split-size=5000000 --split-size=5000000 -I /home/fawad/Desktop/gdb/gdb
/gdb-9.1.1/gdb/doc/../../readline/readline/doc -I /home/fawad/Desktop
/gdb/gdb/gdb-9.1.1/gdb/doc/../mi -I /home/fawad/Desktop/gdb/gdb/gdb-9.1.1/gdb/doc
-o gdb.info /home/fawad/Desktop/gdb/gdb/gdb-9.1.1/gdb/doc/gdb.texinfo
/home/fawad/Desktop/gdb/gdb/gdb-9.1.1/missing: 81: makeinfo: not found
WARNING: 'makeinfo' is missing on your system.
You should only need it if you modified a '.texi' file, or
any other file indirectly affecting the aspect of the manual.
You might want to install the Texinfo package:
http://www.gnu.org/software/texinfo/
The spurious makeinfo call might also be the consequence of
using a buggy 'make' (AIX, DU, IRIX), in which case you might
want to install GNU make:
http://www.gnu.org/software/make/
make[4]: *** [Makefile:490: gdb.info] Error 127
make[4]: Leaving directory '/home/fawad/Desktop/gdb/gdb/gdb-9.1/build/build/gdb/doc'
make[3]: *** [Makefile:2010: subdir_do] Error 1
make[3]: Leaving directory '/home/fawad/Desktop/gdb/gdb/gdb-9.1/build/build/gdb'
make[2]: *** [Makefile:1655: all] Error 2
make[2]: Leaving directory '/home/fawad/Desktop/gdb/gdb/gdb-9.1/build/build/gdb'
make[1]: *** [Makefile:9564: all-gdb] Error 2
make[1]: Leaving directory '/home/fawad/Desktop/gdb/gdb/gdb-9.1/build/build'
make: *** [Makefile:852: all] Error 2

"No rule to make target" when compiling glib

I am currently trying to build a software. However during its compilation, it stops with the following error messages:
make[2]: *** No rule to make target `/glib-2.0/include/glibconfig.h', needed by `GLib-2.0.gir'. Stop.
make[2]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/gobject-introspection-1.30.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/gobject-introspection-1.30.0'
make: *** [all] Error 2
...
I read a thread about a similar error message here: gcc makefile error: "No rule to make target ..." however, I was not able to use it on my case. All I can say is that the dir where glibconfig.h is found, shows here:
$(GLIB_LIBDIR)/glib-2.0/include/glibconfig.h
I guess I have to edit the Makefile and add something, but what? Not sure what .gir files are

trying to building on OSX but got "No rule to make target antlr4_static" error

trying to build on OSX, got the following antlr error. Need to install antlr-runtime?
[ 43%] Built target antlr4_runtime
[ 43%] Built target csv_infer
[ 45%] Performing build_static step for 'antlr4_runtime'
make[4]: *** No rule to make target `antlr4_static'. Stop.
make[3]: *** [antlr4_runtime/src/antlr4_runtime-stamp/antlr4_runtime-build_static] Error 2
make[2]: *** [CMakeFiles/antlr4_runtime-build_static.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [dev] Error 2
This has now been fixed.
CMake 3.14 changed where the ExternalProject module builds the source. It was unable to find ANTLR's own CMake files, necessitating a change to the WORKING_DIRECTORY.

Trying to compile a script from github but getting errors

I'm trying to install https://github.com/xxorde/librekinect
but I'm running into the following issue:
$ make
make pc
make[1]: Entering directory '/home/pi/librekinect-master'
make -C /lib/modules/3.18.5+/build M= modules
make[2]: Entering directory '/home/pi/librekinect-master'
make[2]: *** /lib/modules/3.18.5+/build: No such file or directory. Stop.
make[2]: Leaving directory '/home/pi/librekinect-master'
Makefile:31: recipe for target 'pc' failed
make[1]: *** [pc] Error 2
make[1]: Leaving directory '/home/pi/librekinect-master'
Makefile:24: recipe for target 'default' failed
make: *** [default] Error 2
I tried searching for *** /lib/modules/3.18.5+/build: No such file or directory. Stop. on google but that produced nothing helpful.
What am I missing?
Since you are working on raspberry pi, you should follow the recipe here. Mostly, I think you miss parts of the toolchain (at least build-essentials and likely the headers). I would follow that example step by step.

unable to infer compiler target triple for clang

I have modified the clang. It was working properly. But then I had some git related issues so I cleaned the git and checked out again. Now when I try to run make clean in clang I am getting the following error. How can I fix this?
#A set of warnings here
make[5]: Entering directory `/home/test/llvm/projects/compiler-rt'
make/platform/clang_linux.mk:16: *** "unable to infer compiler target triple for clang". Stop.
make[5]: Leaving directory `/home/test/llvm/projects/compiler-rt'
make[4]: *** [CleanRuntimeLibraries] Error 2
make[4]: Leaving directory `/home/test/llvm/tools/clang/runtime/compiler-rt'
make[3]: *** [compiler-rt/.makeclean] Error 2
make[3]: Leaving directory `/home/test/llvm/tools/clang/runtime'
make[2]: *** [clean] Error 1
make[2]: Leaving directory `/home/test/llvm/tools/clang'
make[1]: *** [clang/.makeclean] Error 2
make[1]: Leaving directory `/home/test/llvm/tools'
make: *** [clean] Error 1
I had this problem, and solved it. My problem was the link for clang failed (error 9) because I didn't have enough memory. It needs about 4 gig of memory to link, and I only had 3.5 total real memory and swap available.
Look just before these errors and possibly, you'll see that the link for clang failed.
ls the clang executable at {your build directory}/Debug+Asserts/bin/clang mine was zero bytes (because of link failure).
It then generated the "unable to infer compiler target triple" because it didn't have a clang to execute.
My solution was to create a swap file (because I didn't have any space to expand my swap partition) following the instructions at geek swap definition
I solved this error by setting the LD_LIBRARY_PATH environment variable correctly. At first, I set it without the lib64.
I installed llvm on my $HOME/local so, the correct LD_LIBRARY_PATH would be.
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH”:$HOME/local/lib:$HOME/local/lib64

Resources