PDA

View Full Version : make: command not found, Error: 127



ct
9th May 2007, 05:41
: command not found
make: *** [appname] Error 127


I am using a linux box and the same makefile and the srcs work in my local computer as root, but when I try to upload it to a server then I get this error for that particular set of sources, its a CGI application in C. Other similar makefiles work like charm and I am having problem with this particular folder only. Applying my commonsense I did
chmod -R 777 srcfolder

but this didn't help I keep getting the error. I can use gcc,g++ and plld a front-end compiler and linker of C-files for prolog from the command line so there isn't much problem int that.The very thing that is amusing me is that a similar makefile in other directory under the same username works like a charm. Aggghhhh...I am getting frustrated..

here is the makefile if it is due to any error on this one




#///////////////////////////////////////////////////////////////////////
# This makefile generates the final executable to be used as cgi
# from C/C++ and Prolog source files. The output is is stored in ../bin
# directory.


# additional include directory
INCLUDE=../include/


# prolog source files
PL=../../pl/Appname.pl

# CPP files
C_FILES=Interface.cpp Translator.cpp Utilities.cpp translitconverter.cpp lp.cpp

# install directory
INSTALL_DIR=../bin/appname

appname: $(C_FILES) $(PL)
@if [ -d "../bin" ]; \
then \
echo "Directory ../bin already exist!" ;\
else \
echo "Creating ../bin directory.";\
mkdir ../bin;\
fi;\
echo "Compiling and Generating executables.";\
plld -pl-options*-q -cc-options*-I$(INCLUDE) $(PL) $(C_FILES) -o $(INSTALL_DIR)




Any help would be appreciated...

ct
9th May 2007, 06:16
ahhh..I finally got it working I made the following changes to the make file...



#///////////////////////////////////////////////////////////////////////
# This makefile generates the final executable from C/C++ and Prolog source files.
# The output is is stored in ../bin directory.

# additional include directory
INCLUDE= ../include/

# prolog source files
PL=../../pl/Appname.pl

# CPP files
C_FILES=Interface.cpp Translator.cpp Utilities.cpp translitconverter.cpp lp.cpp

# install directory
INSTALL_DIR=../newAppname

Appname1: $(C_FILES) $(PL)

@echo "Compiling and Generating executables.Creating \"newAppname\" inside ../";\
plld -pl-options*-q -cc-options*-I$(INCLUDE) $(PL) $(C_FILES) -o $(INSTALL_DIR)



Now I don't see why the first makefile was not working . The amazing part is why did it work in the first place in the local machine ?

wysota
9th May 2007, 07:15
You probably used a different make. The problem might have been with some whitespace somewhere which you're not seeing right now.

Nileshvora441
21st April 2015, 08:19
I am getting this error in eclipse project. And My makefile is automatically generated, I am not allowed to change makefile.
How can I resolve Error 127 in this case?