error: globaldefs.h: No such file or directory

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
ac412
Posts: 9
Joined: Mon Sep 30, 2013 4:28 pm
Location: Tongji University

error: globaldefs.h: No such file or directory

#1 Unread post by ac412 »

dear all,

I am new to ROMS.
I want to run a South China Sea case and I have prepared ncfiels.
But when I run ./build.bash I met the problem as below:

Code: Select all

In file included from Compilers/../ROMS/Include/cppdefs.h:617,
                 from Compilers/make_macros.h:16:
/share/home/my/ROMS/myTest/wmscs/wmscs.h:73:24: error: globaldefs.h: No such file or directory
/share/home/my/make_macros.mk:1: *** missing separator.  Stop.
If I copy the golbaldefs.h to the current folder, the error will be like this:

Code: Select all

/share/home/my/make_macros.mk:1: *** missing separator.  Stop.
Could anyone tell me why and how to solve it? Many thanks~~

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: error: globaldefs.h: No such file or directory

#2 Unread post by kate »

Have you looked at that make_macros.mk file? Mine looks like:

Code: Select all

  USE_ADJOINT :=
  USE_TANGENT :=
  USE_REPRESENTER :=
  USE_SEAICE := on
  USE_WRF :=
  USE_SWAN :=
  USE_REFDIF :=
  USE_ARPACK :=
  USE_MCT :=
  USE_ESMF :=
Don't worry if you don't have the SEAICE line. Which version of make are you using? I've got:

Code: Select all

pacman3 710% make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-redhat-linux-gnu

ac412
Posts: 9
Joined: Mon Sep 30, 2013 4:28 pm
Location: Tongji University

Re: error: globaldefs.h: No such file or directory

#3 Unread post by ac412 »

kate wrote:Have you looked at that make_macros.mk file? Mine looks like:

Code: Select all

  USE_ADJOINT :=
  USE_TANGENT :=
  USE_REPRESENTER :=
  USE_SEAICE := on
  USE_WRF :=
  USE_SWAN :=
  USE_REFDIF :=
  USE_ARPACK :=
  USE_MCT :=
  USE_ESMF :=
Don't worry if you don't have the SEAICE line. Which version of make are you using? I've got:

Code: Select all

pacman3 710% make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-redhat-linux-gnu
dear Kate,

thank you for your kindly reply.
I've got the same version of GNU as yours:

Code: Select all

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-redhat-linux-gnu
but I don't have the build folder under the current folder. It also fails when I try to "make" or "make clean".

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: error: globaldefs.h: No such file or directory

#4 Unread post by kate »

Code: Select all

/share/home/my/make_macros.mk:1: *** missing separator.  Stop.
This is in your home directory, right? It has nothing to do with where your build directory is. If your file looks like mine, look for hidden characters in there.

ETA: a web search on that error brings up the make issue of spaces instead of tabs. However, there should be no tabs in that file.

ac412
Posts: 9
Joined: Mon Sep 30, 2013 4:28 pm
Location: Tongji University

Re: error: globaldefs.h: No such file or directory

#5 Unread post by ac412 »

kate wrote:

Code: Select all

/share/home/my/make_macros.mk:1: *** missing separator.  Stop.
This is in your home directory, right? It has nothing to do with where your build directory is. If your file looks like mine, look for hidden characters in there.

ETA: a web search on that error brings up the make issue of spaces instead of tabs. However, there should be no tabs in that file.
dear Kate,

thank you for your kindly reply.

My mistake. I changed everything but the casename in the first line of *.h file. So the system didn't find this *.h. Now the problem has been solved.
But I still don't understand why my Makefile.config would be located at my home directory?

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: error: globaldefs.h: No such file or directory

#6 Unread post by kate »

The makefile puts that file in your home directory, then copies it to the build directory:

Code: Select all

MAKE_MACROS := $(shell echo ${HOME} | sed 's| |\\ |g')/make_macros.mk

ifneq "$(MAKECMDGOALS)" "clean"
 MACROS := $(shell cpp -P $(ROMS_CPPFLAGS) Compilers/make_macros.h > \
                $(MAKE_MACROS); $(CLEAN) $(MAKE_MACROS))

Code: Select all

       cp -p $(MAKE_MACROS) $(SCRATCH_DIR)

Post Reply