Here's the last few lines from the output of running "make install" at root level /home/gm/TEST/:
make[3]: Leaving directory `/home/gm/TEST/tppf/tm/ipmgt'
ld ipfac.o ipfacV.o ipfac_rset.o ipfac_args.o ipfac_d2a.o ipfac_a2d.o ipfac_modr.o ipfac_mod.o ipfac_read.o ipfac_add.o ipfac_del.o ipfac_list.o ipfac_unlk.o ipfac_lock.o ipfac_util.o ipfac_lkid.o -r -o /home/gm/TEST/tppf/lib/ipfac_tppf.o
make[3]: Leaving directory `/home/gm/TEST/tppf/tm/ipfac'
make[2]: Leaving directory `/home/gm/TEST/tppf/tm'
make[1]: *** [i_tm] Error 2
make[1]: Leaving directory `/home/gm/TEST/tppf'
make: *** [i_tppf] Error 2
And the Makefile under /home/gm/TEST/tppf/tm/ipfac contains this rule:
install: ipfac.h $(TPPLIB)/ipfac_tppf.o
$(TPPLIB)/ipfac_tppf.o: $(PROPOBJS)
ld $(PROPOBJS) -r -o $(TPPLIB)/ipfac_tppf.o
Is there something wrong with the linking process? Make should've told me what the error actually is, but it didn't.
BTW, I think /home/gm/TEST/tppf/lib/ipfac_tppf. O was linked and created successfully, or at least it was there in directory /home/gm/TEST/tppf/lib/ after make failed and exited.
That line is not the error line. You can tell that it succeeded because there was no error message there, for building the target /home/gm/TEST/tppf/lib/ipfac_tppf.o.
The error is here:
make[1]: *** [i_tm] Error 2
The [1] means that it was the first level of makefile (note the recipe you are quoting here was in the 3rd level of makefile) and the [i_tm] means that the build of the target i_tm failed. You need to look back up further in the output of make, earlier than what you've shown us, and find the *** error line for building the i_tm target and see what errors were generated there.
Related
G'day all. Just to preface this, I'm not an experienced programmer, so I might not use the correct jargon.
I'm in the process of installing GnuPG 2.2.19 on a Windows 10 machine (build no. 18363.628). I have installed MinGW (version 2013072300 according to mingw-get), as well as npth 1.6 and libgpg-error 1.37. I'm now attempting to install libgcrypt 1.8.5. Running ./autogen.sh --build-w32 works, but running make fails with the following output (I am using msys.bat as my shell):
$ make
make all-recursive
make[1]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5'
Making all in compat
make[2]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/compat'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/compat'
Making all in mpi
make[2]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/mpi'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/mpi'
Making all in cipher
make[2]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/cipher'
cc -o gost-s-box ./gost-s-box.c
make[2]: cc: Command not found
make[2]: *** [gost-s-box] Error 127
make[2]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/cipher'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5'
make: *** [all] Error 2
Unfortunately I accidentally closed the shell window after the first time I ran make, so this is from when I ran it a second time, hence the "Nothing to be done" stuff.
I have checked the Makefile for libgcrypt; it contains the following:
CC = mingw32-gcc
CCAS = mingw32-gcc
CCASDEPMODE = depmode=gcc3
CCASFLAGS = -g -O2
CCDEPMODE = depmode=gcc3
CC_FOR_BUILD = cc
I've checked the MinGW root folder, and gcc.exe and mingw32-gcc.exe are both present in the bin folder. I've also tried changing the first of those lines above to CC=gcc; no change.
Anyone have any suggestions as to what the problem is? Thanks in advance.
Ok, so I managed to solve it myself; after some research, I found that creating a symlink "CC.exe" to "mingw32-gcc.exe" in MinGW's bin did the trick.
I installed OCaml 4.01.0 from http://protz.github.io/ocaml-installer/. I am now trying to build camlp5-6.11. When I run ./configure && make world.opt in cygwin, I get
...
sed -e "s|#VERSION#|6.11|" -e "s|#CAMLP5DIR#|D:\OCaml\lib/camlp5|" META.tpl > META
make[2]: Leaving directory '/cygdrive/d/Downloads/camlp5-6.11/etc'
make[2]: Entering directory '/cygdrive/d/Downloads/camlp5-6.11/top'
ocamlrun.exe ../boot/camlp5r.exe -nolib -I ../boot -mode S -o camlp5_top.ppo camlp5_top.ml
ocamlc.opt -warn-error A -I ../main -I ../boot -I ../ocaml_stuff/4.01.0/utils -I ../ocaml_stuff/4.01.0/parsing -I D:OCamllib/compiler-libs -c -impl camlp5_top.ppo
File "camlp5_top.ml", line 51, characters 14-32:
Error: Unbound module Toploop
../config/Makefile:20: recipe for target 'camlp5_top.cmo' failed
make[2]: *** [camlp5_top.cmo] Error 2
make[2]: Leaving directory '/cygdrive/d/Downloads/camlp5-6.11/top'
Makefile:26: recipe for target 'out' failed
make[1]: *** [out] Error 2
make[1]: Leaving directory '/cygdrive/d/Downloads/camlp5-6.11'
Makefile:141: recipe for target 'world.opt' failed
make: *** [world.opt] Error 2
How do I fix this?
I suspect the Makefile of Camlp5 hasn't been tested on Windows. It probably doesn't deal properly with backslashes: indeed, in your output, I can see D:OCamllib/compiler-libs which leads me to think that the error lies on the Camlp5 side: the path should obviously be D:\OCaml\lib....
Little-known fact about windows: / works as a path separator just as well, so if that's an option, you could probably try to hardcode d:/ocaml/ somewhere in the Makefile as the root dir for your OCaml installation, but you'd also have to fix the Makefile to generate d:/ocaml/lib as the library directory.
I need to do some business on coreutils as a part of a project for school, but I am stuck right at the beginning of README-hacking, I have done all things and they were successful until make. It failed and gave me this kind of response:
$ make
make all-recursive
make[1]: Entering directory `/home/andrej/Projects/coreutils'
Making all in lib
make[2]: Entering directory `/home/andrej/Projects/coreutils/lib'
make all-recursive
make[3]: Entering directory `/home/andrej/Projects/coreutils/lib'
make[4]: Entering directory `/home/andrej/Projects/coreutils/lib'
CC printf-frexp.o
In file included from printf-frexp.c:27:0:
./math.h:558:5: error: token "#" is not valid in preprocessor expressions
./math.h:634:5: error: token "#" is not valid in preprocessor expressions
./math.h:657:5: error: token "#" is not valid in preprocessor expressions
./math.h:743:5: error: token "#" is not valid in preprocessor expressions
./math.h:814:5: error: token "#" is not valid in preprocessor expressions
make[4]: *** [printf-frexp.o] Error 1
make[4]: Leaving directory `/home/andrej/Projects/coreutils/lib'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/andrej/Projects/coreutils/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/andrej/Projects/coreutils/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/andrej/Projects/coreutils'
make: *** [all] Error 2
and now I am stuck here, because I dont want to touch the code in this state, dont you know whats is wrong, I mean I know that there is something wrong with my machine, but where and how to solve this one?
Thanks a lot for your responses
Andrej
When "make check" for GCC4.5.0, such error was occured:
make[1]: Entering directory `/home/username/tool/gcc-4.5.0'
/bin/sh: line 0: cd: host-x86_64-unknown-linux-gnu/fixincludes: No such file or directory
make[1]: *** [check-fixincludes] Error 1
make[1]: Leaving directory `/home/username/tool/gcc-4.5.0'
make: *** [do-check] Error 2
How to solve this problem? please....... & Thanks~~~~~
I had a same problem as you; the reason which fixincludes doesn't exist is because you never finished running "make"(+).
Apparently the check failed. The makefile tried to enter a directory that doesn't exist. What this means depends on the project you are trying to build.
When I am compiling my code with makefiles (I have 12 makefiles) there is an error telling
make.exe[1]: Leaving directory Error 2 what is the reason for this?
Also what does the "Error 2 or Error 1 " mean?
When make prints "Error 2" in this context it just means that there was an error in a recursive make invocation. You have to look at the error messages preceeding that message to determine what the real problem was, in the submake. For example, given a Makefile like this:
all:
$(MAKE) -f sub.mk
... and a sub.mk like this:
all:
#exit 1
When I run GNU make, it prints the following:
gmake -f sub.mk
gmake[1]: Entering directory `/tmp/foo'
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/tmp/foo'
gmake: *** [all] Error 2
Error 2 tells me that there was an error of some sort in the submake. I have to look above that message, to the Error 1 message from the submake itself. There I can see that some command invoked while trying to build all exited with exit code 1. Unfortunately there's not really a standard that defines exit codes for applications, beyond the trivial "exit code 0 means OK". You have to look at the particular command that failed and check its documentation to determine what the specific exit code means.
These error messages have nothing to do with Unix errno values as others have stated. The outermost "2" is just the error code that make itself assigns when a submake has an error; the inner "1" is just the exit code of a failed command. It could just as easily be "7" or "11" or "42".