Gnu Make Error 2
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have makefile error 2 Meta Discuss the workings and policies of this site About Us make error 2 linux Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with make all error 2 us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and
Gcc Error 1
other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Where can I find a list of 'make' error codes? up vote 14 down vote favorite 5 I am trying to compile makefile error 1 a program written in Fortran using make (I have a Makefile and, while in the directory containing the Makefile, I type the command $ make target, where "target" is a system-specific target specification is present in my Makefile. As I experiment with various revisions of my target specification, I often get a variety of error messages when attempting to call make. To give a few examples: make[1]: Entering directory /bin/sh: line 0: test: too many arguments ./dpp angfrc.f > angfrc.tmp.f /bin/sh: ./dpp: Permission denied make[1]: *** [angfrc.o] Error 126 make[1]: Leaving directory make: *** [cmu60] Error 2 and make[1]: Entering directory /bin/sh: line 0: test: too many arguments ./dpp -DSTRESS -DMPI -P -D'pointer=integer'-I/opt/mpich_intel/include angfrc.f > angfrc.tmp.f /bin/sh: ./dpp: Permission denied make[1]: *** [angfrc.o] Error 126 make[1]: Leaving directory make: *** [mpich-c2] Error 2 and make[1]: Entering directory /bin/sh: line 0: test: too many arguments ./dpp -DSTRESS -DMPI -P -D'pointer=integer' -I/opt/mpich_intel/include angfrc.f > angfrc.tmp.f /bin/sh: ./dpp: Permission denied make[1]: *** [angfrc.o] Error 126 make[1]: Leaving directory make: *** [mpi-intel] Error 2 Do
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and gcc error 2 policies of this site About Us Learn more about Stack Overflow the
Linux Make Error 1
company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
Makefile Error 2 Qt
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes http://unix.stackexchange.com/questions/18807/where-can-i-find-a-list-of-make-error-codes a minute: Sign up Make / gcc cryptic error 2: how to have more information? up vote 2 down vote favorite I have this C++ project which compiles using a Makefile, and sometimes when (my guess) there are some missing includes, I get a cryptic "error 2" message and the make process stops. I suspect the missing includes because this is http://stackoverflow.com/questions/5390081/make-gcc-cryptic-error-2-how-to-have-more-information the third times it happens when I included a non-existent header file. It looks like this: ---- Build tmp/foo.o ---- ---- Build tmp/bar.o ---- ---- Build tmp/toto.o ---- ---- Build tmp/tata.o ---- make: *** [build_Project] Error 2 This is driving me nuts, because even using verbose commands (where each g++ invocation is showed), I can't see anything. I expected the guy to throw up some erroneous messages like "can't find header X" or "undefined reference to Y", but there's nothing. My compiling options for gcc are -O0 -Wall -Werror -Wno-write-strings -fno-rtti -fno-exceptions, if this helps. Ah, and we use the Makefile trick of including dependencies: ifneq ($(strip $(DEPENDS)),) ifneq ($(MAKECMDGOALS),clean) -include $(DEPENDS) endif endif ( see here and here for more information ) Although this is documented stuff, I suspect my problem has something to do with this dependencies inclusion. If you already stumbled on this issue, feel free to comment on this... Thanks in advance. edit: Okay, after a bit of playing, suppressing the - in front of -include $(DEPENDS) gives me some more info (the makefile does stop on
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/908808/leaving-directory Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs https://www.safaribooksonline.com/library/view/managing-projects-with/0596006101/ch12.html Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Leaving directory…? up vote 6 down vote favorite 1 When i am compiling my code with makefiles(I have 12 makefiles) there is error 2 an error telling "make.exe[1]: Leaving directory Error 2" whats the reason for this..? Also what is the "Error 2 or Error 1 " mean...? Regards Renjith G makefile share|improve this question asked May 26 '09 at 3:28 Renjith G 1,15061523 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote When make prints "Error 2" in this context it just means that there was an error in a recursive make invocation. make error 2 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". share|improve this answ
Managing Projects with GNU Make, 3rd Edition by Robert Mecklenburg Published by O'Reilly Media, Inc. Dedication A Note Regarding Supplemental Files Other resources from O’Reilly Foreword Preface The Road to the Third Edition What’s New in This Edition Conventions Used in This Book Using Code Examples Comments and Questions Acknowledgments I. Basic Concepts 1. How to Write a Simple Makefile Targets and Prerequisites Dependency Checking Minimizing Rebuilds Invoking make Basic Makefile Syntax 2. Rules Explicit Rules Variables Finding Files with VPATH and vpath Pattern Rules The Implicit Rules Database Special Targets Automatic Dependency Generation Managing Libraries 3. Variables and Macros What Variables Are Used For Variable Types Macros When Variables Are Expanded Target- and Pattern-Specific Variables Where Variables Come From Conditional and include Processing Standard make Variables 4. Functions User-Defined Functions Built-in Functions Advanced User-Defined Functions 5. Commands Parsing Commands Which Shell to Use Empty Commands Command Environment Evaluating Commands Command-Line Limits II. Advanced and Specialized Topics 6. Managing Large Projects Recursive make Nonrecursive make Components of Large Systems Filesystem Layout Automating Builds and Testing 7. Portable Makefiles Portability Issues Cygwin Managing Programs and Files Working with Nonportable Tools Automake 8. C and C++ Separating Source and Binary Read-Only Source Dependency Generation Supporting Multiple Binary Trees Partial Source Trees Reference Builds, Libraries, and Installers 9. Java Alternatives to make A Generic Java Makefile Compiling Java Managing Jars Reference Trees and Third-Party Jars Enterprise JavaBeans 10. Improving the Performance of make Benchmarking Identifying and Handling Bottlenecks Parallel make Distributed make 11. Example Makefiles The Book Makefile The Linux Kernel Makefile 12. Debugging Makefiles Debugging Features of make Writing Code for Debugging Common Error Messages III. Appendixes A. Running make B. The Outer Limits Data Structures Arithmetic C. GNU Free Documentation License—GNU Project—Free Software Foundation (FSF) 0. Preamble 1. Applicability and Definitions 2. Verbatim Copying 3. Copying in Quantity 4. Modifications 5. Comb