Hi,
I'm following "Tutorial: Installing ROMS in Windows XP / Vista (via Cygwin)" to make the Upwelling test using build.bash. When it goes on to
$./build.bash
erros appears:
./build.bash: line 40: $'\r': command not found
./build.bash: line 43: $'\r': command not found
./build.bash: line 46: syntax error near unexpected token `$'in\r''
'/build.bash: line 46: ` case "$1" in
According some guys' suggestion, I use cat build.bash | tr -d "\r" > build.bash2 and mv build.bash2 build.bash to do the equally functional dos2unix.
however,errors appears as followings:
makefile:381: *** target pattern contains no '%'. Stop.
makefile:230: INCLUDING FILE Compilers/make_macros.mk WHICH CONTAINS APPLICATION-DEPENDENT MAKE DEFINITIONS
COMPILERS/CYGWIN-g95.mk:97 *** target pattern contains no '%'. Stop.
many thanks for your help
makefile:381: *** target pattern contains no '%'. Stop.
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
The problem with build.bash was that it had PC line terminators (\r\n) instead of Unix terminators (\n). Perhaps your makefile has the same problem.
How did you download ROMS? If you're compiling with Cygwin you should manage the source with Cygwin tools (svn or tar or whatever) and make sure your mounts are binary. Then it shouldn't be too hard to keep yourself totally \r-free.
How did you download ROMS? If you're compiling with Cygwin you should manage the source with Cygwin tools (svn or tar or whatever) and make sure your mounts are binary. Then it shouldn't be too hard to keep yourself totally \r-free.
hi,mark, i appreciate your help.
I did the same thing on makefile (cat build.bash | tr -d "\r" > build.bash2 and mv build.bash2 build.bash) as that on the file build.bash, but, the errors are the same as well.
firstly, download and install "TortoiseSVN-1.4.5.10425-win32-svn-1.4.5.msi"
secondly, In Windows Explorer, create a folder for ROMS .Then, using Windows Explorer, get into the folder just created and right-click and choose 'SVN Checkout...' .Type the URL where ROMS lives: https://www.myroms.org/svn/src/trunk
furthermore,i update the ROMS downloaded by "SVN update".
is that fully right?
thanks for your time and kindness.
Perhaps your makefile has the same problem.
I did the same thing on makefile (cat build.bash | tr -d "\r" > build.bash2 and mv build.bash2 build.bash) as that on the file build.bash, but, the errors are the same as well.
How did you download ROMS?
firstly, download and install "TortoiseSVN-1.4.5.10425-win32-svn-1.4.5.msi"
secondly, In Windows Explorer, create a folder for ROMS .Then, using Windows Explorer, get into the folder just created and right-click and choose 'SVN Checkout...' .Type the URL where ROMS lives: https://www.myroms.org/svn/src/trunk
furthermore,i update the ROMS downloaded by "SVN update".
is that fully right?
thanks for your time and kindness.
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
If you're going to build ROMS with Cygwin tools, I think you'd be wise to manage the source with the Cygwin command-line svn: this is available as an optional package via Cygwin setup. By using this version of svn, you will get all your text files in Unix form. (Does the tutorial suggest otherwise? Then it needs to be changed.)
By the way, you can convert the line terminators with the dos2unix utility, also available in a Cygwin package. The command would be
It's simple, hence there is a lower probability of error.
Now, back to the make problem. I'm afraid I didn't look very carefully at your error
This indicates that the problem is in COMPILERS/CYGWIN-g95.mk, which is brought into the make process by an include statement in makefile. And, again, I strongly suspect the problem is that it is has DOS/Windows line terminators. So process that file with dos2unix and try again. If there's a file called macros.mk, you should also convert that, but if there's not, don't worry. Once you've converted all the files processed by make you might be OK, as the Cygwin compilers are \r-tolerant.
But in the medium term I strongly suggest getting all your files into Unix format.
By the way, you can convert the line terminators with the dos2unix utility, also available in a Cygwin package. The command would be
Code: Select all
dos2unix makefile
Now, back to the make problem. I'm afraid I didn't look very carefully at your error
Code: Select all
COMPILERS/CYGWIN-g95.mk:97 *** target pattern contains no '%'. Stop.
But in the medium term I strongly suggest getting all your files into Unix format.
The ROMS/Cygwin tutorial in the wiki has been changed to suggest using the command line subversion client within cygwin. Hopefully this will limit \r problems in the future.
https://www.myroms.org/wiki/index.php/ROMS_Cygwin
https://www.myroms.org/wiki/index.php/ROMS_Cygwin
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: makefile:381: *** target pattern contains no '%'. Stop.
Alternatively, you can use TortoiseSVN but tell it to put Unix (LF) line terminators on all text files. You do this by adding the following lines to the configuration file:
I'm checking out some code (not ROMS) right now with TortoiseSVN and this setting seems to have worked. We'll see.
PS: on Windows the SVN configuration file normally has a name like this
C:\Documents and Settings\<user>\Application Data\Subversion\config
There's button that will open it in a text editor in the TortoiseSVN Settings dialogue, on the General pane.
Code: Select all
[miscellany]
enable-auto-props = yes
[auto-props]
* = svn:eol-style=LF
PS: on Windows the SVN configuration file normally has a name like this
C:\Documents and Settings\<user>\Application Data\Subversion\config
There's button that will open it in a text editor in the TortoiseSVN Settings dialogue, on the General pane.
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: makefile:381: *** target pattern contains no '%'. Stop.
Actually, this doesn't work, because svn:eol-style is a property of the files on the repository, not of the client. So please ignore this suggestion and follow the simple advice: if you're building ROMS with Cygwin tools on Windows, use the Cygwin Subversion client to manage the source code.m.hadfield wrote:Alternatively, you can use TortoiseSVN but tell it to put Unix (LF) line terminators on all text files.
You do this by adding the following lines to the configuration file:Code: Select all
[miscellany] enable-auto-props = yes [auto-props] * = svn:eol-style=LF