Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Problem with "make" in SuSE?

  1. #1
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,191

    Unhappy Problem with "make" in SuSE?

    Thanks very much in advance for any help! I've been trying to compile someone else's fortran software that's written for many different platforms using old-style "make" scripts (i.e., not automake). I'm hoping someone can spot a syntax problem because it dies claiming there's no rule to make PREPRC.f, though I see the rule in the makefile - I suspect there's a format problem in the makefile that SuSE's make has trouble with: (this is all in tcsh)


    make[1]: Entering directory `/home/patti/vulk/Ver_6.0.2/Source_code'
    make[1]: *** No rule to make target `/home/patti/vulk/Ver_6.0.2/Source_code/PREPRC.F', needed by `/home/patti/Vulk/Ver_6.0.2/Source_code/PREPRC.o'. Stop.
    make[1]: Leaving directory `/home/patti/vulk/Ver_6.0.2/Source_code'
    make: *** [inpre] Error 2

    Ver_6.0.2/Scripts>


    But here's the makefile where it's dying... it looks to me like there IS a rule defined to make PREPRC.F - but for some reason, make is not picking it up. The console output above seems to suggest it gets part-way through this makefile until trying to build PREPRC.f - but I do see a "rule" for building ".f" files... so I'm stuck...

    #SRC = $(vulkpath)/Source_code
    #EXC = $(vulkpath)/Executable
    #CPP = cpp
    #CPPFLAGS = -P -C

    .SUFFIXES: .F $(FSFXFLG)

    OBJS= $(SRC)/PREPRC.o \
    $(SRC)/GBFESI.o \
    $(SRC)/GENERIC.o \
    $(SRC)/READ.o \
    $(SRC)/RDDATA.o \
    $(SRC)/RDQBC.o \
    $(SRC)/THERMO.o \
    $(SRC)/TRANPRT.o \
    $(SRC)/vulk_MPP.o \
    $(SRC)/WPARAM.o

    $(EXC)/vulk_preprc: $(OBJS)
    $(FC) $(FFLAGS) -o $(EXC)/vulk_preprc $(OBJS) $(FLFLAGS)

    $(OBJS):
    cd $(SRC);\
    $(CPP) $(CPPFLAGS) $*.F > $*$(FSFXFLG);\
    $(FC) $(FFLAGS) -c $*$(FSFXFLG);\
    /bin/rm -f $*$(FSFXFLG)

    .F$(FSFXFLG):
    cd $(SRC);\
    $(CPP) $(CPPFLAGS) $*.F > $*$(FSFXFLG)

    .F.o:
    cd $(SRC);\
    $(CPP) $(CPPFLAGS) $*.F > $*$(FSFXFLG);\
    $(FC) $(FFLAGS) -c $*$(FSFXFLG);\
    /bin/rm -f $*$(FSFXFLG)

    $(FSFXFLG).o:
    cd $(SRC);\
    $(FC) $(FFLAGS) -c $*$(FSFXFLG)

    .F:
    cd $(SRC);\
    $(CPP) $(CPPFLAGS) $*.F > $*$(FSFXFLG);\
    $(FC) $(FFLAGS) -c $*$(FSFXFLG)

    $(FSFXFLG):
    cd $(SRC);\
    $(FC) $(FFLAGS) -c $*$(FSFXFLG)

    $(SRC)/PREPRC.o : $(SRC)/PREPRC.F
    $(SRC)/GBFESI.o : $(SRC)/GBFESI.F
    $(SRC)/GENERIC.o : $(SRC)/GENERIC.F
    $(SRC)/READ.o : $(SRC)/READ.F
    $(SRC)/RDDATA.o : $(SRC)/RDDATA.F


    Can any experts in MAKE help me with this? I'm totally stuck and know almost nothing about this syntax - I just need to compile it.
    THANK YOU!!!!!!!!!!!!!
    Patti
    Last edited by PattiMichelle; 15-Jun-2008 at 10:18. Reason: syntax

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Problem with "make" in SuSE?

    Where is the rule for creating .F files? Please indicate the paragraph that you think applies.

  3. #3
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,191

    Default Re: Problem with "make" in SuSE?

    Hi:
    I was told this is the rule for all ".f" files:

    .F:
    cd $(SRC);\
    $(CPP) $(CPPFLAGS) $*.F > $*$(FSFXFLG);\
    $(FC) $(FFLAGS) -c $*$(FSFXFLG)


    ...and here is the list of ".f" files to process by that rule:

    $(SRC)/PREPRC.o : $(SRC)/PREPRC.F
    $(SRC)/GBFESI.o : $(SRC)/GBFESI.F
    $(SRC)/GENERIC.o : $(SRC)/GENERIC.F
    $(SRC)/READ.o : $(SRC)/READ.F
    $(SRC)/RDDATA.o : $(SRC)/RDDATA.F


    But I don't know "make" syntax and was hoping someone would spot the problem for me.
    Thanks!
    Patti

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Problem with "make" in SuSE?

    It's not a rule for making .f files from some other suffix. That sort of rule would look like this:

    Code:
    .something.f:
        command
        command
    So if you don't already have the file PREPRC.f, then you have to have the precursor to it, perhaps PREPRC.something.

    Also remember the rules are case-sensitive, so it makes a difference if your file is FOO.F and your rule uses .f.

  5. #5
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,191

    Default Re: Problem with "make" in SuSE?

    I do have preprc.f already which is why I think there's a problem with the MAKEfile syntax - I'm assuming it's a problem specific to SuSE from whatever system the developer is using. Can it really be a case problem in MAKE? I know the code's author works on a *nix system so he couldn't have made that error - unless there is a flavor of *nix that is not case-sensitive?

  6. #6
    Kevin Nathan NNTP User

    Default Re: Problem with "make" in SuSE?

    On Sun, 29 Jun 2008 16:16:04 GMT
    PattiMichelle <PattiMichelle@no-mx.forums.opensuse.org> wrote:

    >
    >I do have PREPRC.f already which is why I think there's a problem with
    >the syntax - perhaps specific to suse. I don't think it's a case
    >problem in MAKE?
    >


    Yes, 'make' is case-sensitive as well. It's one of the bigger 'gotchas'
    when moving from a case-insensitive system to one that is
    case-sensitive. Just make sure all of the rules and commands match.


    --
    Kevin Nathan (Arizona, USA)
    Linux is not a destination, it's a journey -- enjoy the trip!

    Linux 2.6.22.18-0.2-default
    9:29am up 11:36, 21 users, load average: 0.49, 0.47, 0.58


  7. #7
    Join Date
    Jun 2008
    Posts
    42

    Default Re: Problem with "make" in SuSE?

    There is a rule how to make an object from fortran source '.o.F:', but I cannot see where the fortran compiler is defined. There should be a line like '#FC = gfortran' or equivalent somewhere near top of the file.

  8. #8
    Join Date
    Jun 2008
    Posts
    42

    Default Re: Problem with "make" in SuSE?

    Just ignore my above post. Have not used makefile for years.

  9. #9
    Kevin Nathan NNTP User

    Default Re: Problem with "make" in SuSE?

    On Wed, 02 Jul 2008 07:06:04 GMT
    hro1 <hro1@no-mx.forums.opensuse.org> wrote:

    >
    >Just ignore my above post. Have not used makefile for years.
    >
    >


    Just FYI, if you *do* need the Fortan compiler, it is usually
    'gcc-fortran' or something similar. Sometimes has the version number
    like: 'gcc42-fortran' . . .


    --
    Kevin Nathan (Arizona, USA)
    Linux is not a destination, it's a journey -- enjoy the trip!

    Linux 2.6.22.18-0.2-default
    10:07pm up 3 days 0:44, 21 users, load average: 1.11, 1.09, 1.23


  10. #10
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: Problem with "make" in SuSE?

    Quote Originally Posted by PattiMichelle View Post
    I do have preprc.f already which is why I think there's a problem with the MAKEfile syntax - I'm assuming it's a problem specific to SuSE from whatever system the developer is using. Can it really be a case problem in MAKE? I know the code's author works on a *nix system so he couldn't have made that error - unless there is a flavor of *nix that is not case-sensitive?
    BTW, Linuxes use GNU make. The code's author may have been using traditional Unix make. It is possible that GNU make clarifies some of the ambiguous parts of the make specification that may have worked by accident in Unix make. So you have to examine the Makefile rules and not assume that they were correct to start with.

    There may be some debugging options you can turn on to see what make is "thinking" as it tries to make a target.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •