AIXThis forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am facing the problem related to different Makefile in different directory. In linux environment $MAKE -C AGRIF FC="$CFT1" CPP="$CPP1" FFLAGS="$FFLAGS1" is working, but in AIX system $MAKE -C is not recognised flag. In AGRIF directory has multiple subdirectiory with.
When I have tried with cd AGRIF; make FC="$CFT1" CPP="$CPP1" FFLAGS="$FFLAGS1" option. Then the error is as
"Makefile", line 26: make: 1254-057 Shell command needs a leading tab.
"Makefile", line 109: make: 1254-057 Shell command needs a leading tab.
make: 1254-058 Fatal errors encountered -- cannot continue.
Please help to solve this problem.
Thanks in advance.
Surja
Makefile syntax requires a real TAB in lieu of a bunch of SPACES which match the same distance on the screen. This is a very common problem. Search for a string of SPACES and see if they fall in front of a command. Example:
Before all those indented lines are TABS.
If ANY of them are spaces, there will be build problems.
This INCLUDES the gap between "myapp:" and "$(OBJS)", that must also be a TAB or there will be complaints.
Same for between "%.o:" and "%.c", that must also be a TAB
However do note that within each command such as "make clean", "make myapp", THOSE are spaces.
Thanks for reply,
The Makefile I have used is as follows
#- Creation des elements relatifs a AGRIF (lib, config)
#---------------------------------------------------------------------
SHELL = /bin/sh
#---------------------------------------------------------------------
I have changed the red mark flag.
The error is coming as
"Makefile", line 26: make: 1254-057 Shell command needs a leading tab.
"Makefile", line 109: make: 1254-057 Shell command needs a leading tab.
"Makefile", line 112: make: 1254-057 Shell command needs a leading tab.
"Makefile", line 113: make: 1254-057 Shell command needs a leading tab.
make: 1254-058 Fatal errors encountered -- cannot continue.
mv: 0653-401 Cannot rename AGRIF/conv to ROMSFILES/./conv:
A file or directory in the path name does not exist.
make: 1254-004 The error code from the last command is 127
You need to put the Makefile in code blocks so that indentation would not be lost.
It might also help to attach the file so that individual characters within that file that could be causing problems (such as using spaces instead of tabs) could be checked.
please use [code]your code comes here[/code] to keep original formatting (try to edit your post)
as it was reported, shell command lines need a leading tab, probably you used spaces or maybe your editor replaced them. You must start those lines with a tab.
"Makefile", line 26: make: 1254-057 Shell command needs a leading tab. "Makefile", line 109: make: 1254-057 Shell command needs a leading tab. "Makefile", line 112: make: 1254-057 Shell command needs a leading tab. "Makefile", line 113: make: 1254-057 Shell command needs a leading tab.
make: 1254-058 Fatal errors encountered -- cannot continue.
That's pretty much definitive explanation what the problem is, especially when a bunch of people tell you what to look for. EDIT your Makefile and put in leading TAB characters, recommend you start with lines 26, 109, 112, and 113. Read my original recommendations about where TAB characters should be, and heed the notation that TAB is NOT 4, or 8 SPACES together, but an actual TAB.
Keep fixing it and running it until these particular errors are gone. If you find additional errors, then post those in code markers as jpollard and pan64 have mentioned.
Thank you all,
The problem is solved using tab before starting line.
Now new problem is coming as
The Makefile is in attached file and in bellow
#- Creation des elements relatifs a AGRIF (lib, config)
#---------------------------------------------------------------------
SHELL = /bin/sh
#---------------------------------------------------------------------
I think the red coloured line part is not working. After working LIB directory it leaving Makefile.
The detail error is as
( cd LIB; make conv)
cc -O -c main.c
cc -O -c WriteInFile.c
cc -O -c toamr.c
cc -O -c fortran.c
1500-030: (I) INFORMATION: fortran_lex: Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
cc -O -c dependfile.c
cc -O -c SubLoopCreation.c
cc -O -c WorkWithlistvarindoloop.c
cc -O -c WorkWithvarofsubroutineliste.c
cc -O -c WorkWithParameterlist.c
cc -O -c Writedeclarations.c
cc -O -c WorkWithglobliste.c
cc -O -c UtilFortran.c
cc -O -c UtilNotGridDep.c
cc -O -c WorkWithlistdatavariable.c
cc -O -c DiversListe.c
cc -O -c UtilAgrif.c
cc -O -c WorkWithAllocatelist.c
cc -O -c UtilCharacter.c
cc -O -c UtilListe.c
cc -O -c UtilFile.c
cc -O -c WorkWithlistofmodulebysubroutine.c
cc -O -c WorkWithlistmoduleinfile.c
cc -O -c WorkWithlistofcoupled.c
cc -O main.o WriteInFile.o toamr.o fortran.o dependfile.o SubLoopCreation.o WorkWithlistvarindoloop.o WorkWithvarofsubroutineliste.o WorkWithParameterlist.o Writedeclarations.o WorkWithglobliste.o UtilFortran.o UtilNotGridDep.o WorkWithlistdatavariable.o DiversListe.o UtilAgrif.o WorkWithAllocatelist.o UtilCharacter.o UtilListe.o UtilFile.o WorkWithlistofmodulebysubroutine.o "Lime"]WorkWithlistmoduleinfile.o WorkWithlistofcoupled.o -o conv
mv -f LIB/conv .
mkdir -p AGRIF_YOURFILES
mkdir -p AGRIF_OBJS
ar -r libagrif.a
ar: Creating an archive file libagrif.a.
ranlib libagrif.a
Thank you for reply,
You are suggesting me in main.F 1n 115 line has syntax error, but I have checked the code there is no error. I think it is not compiling *.F90 file. So the problem is coming.
You might be smarter than the compiler, but it is more stubborn than you... Perhaps you should quote the line in question.
PS: the problem has nothing to do with Makefile
PS2: Please use [code] and [/code] tags, can't you?
1. quote the line in question (main.F line 115)
2. the problem has nothing to do with Makefile
3. Please use [code] and [/code] tags
Which of these three sentences is problematic?
Are NSUB_X and NSUB_E defined at this point?
What command did you use to compile?
(You don't have to use [code] tag in your Makefile; you have to use in this forum, when you quote source code. See #2 in this topic.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.