#1803: GRASS 6.4.3RC1 on Win 7: grass64.bat fails due to UNIX line endings in
Init.bat
----------------------------+-----------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Startup | Version: 6.4.3 RCs
Keywords: Init.bat, CRLF | Platform: MSWindows 7
Cpu: x86-64 |
----------------------------+-----------------------------------------------
There's a following error at GRASS 6.4.3RC1 startup in text mode on Win 7
64bit:
{{{
C:\>"C:\Program Files (x86)\GRASS GIS 6.4.3RC1\grass64.bat" -text
The system cannot find the batch label specified - aftertextcheck
}}}
The problem is in the etc\Init.bat where the "aftertextcheck" label is
used - looks like Windows expects "\r\n" at the end of the label name
rather than "\n".
Are the Windows builds done on Linux? If so, I guess the root cause is
eol-style=native on lib/init/init.bat in the GRASS repo. The solution
would be to set eol-style=CRLF, or maybe to tweak the makefile to run
tr/unix2dos/... on etc/Init.bat.
Opinions?
There are plenty of *.bat with LF instead of CRLF in the GRASS
installation dir. Shouldn't they all have CRLF line endings?:
#1803: GRASS 6.4.3RC1 on Win 7: grass64.bat fails due to UNIX line endings in
Init.bat
----------------------------+-----------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Startup | Version: 6.4.3 RCs
Keywords: Init.bat, CRLF | Platform: MSWindows 7
Cpu: x86-64 |
----------------------------+-----------------------------------------------
Description changed by martinl:
Old description:
There's a following error at GRASS 6.4.3RC1 startup in text mode on Win 7
64bit:
{{{
C:\>"C:\Program Files (x86)\GRASS GIS 6.4.3RC1\grass64.bat" -text
The system cannot find the batch label specified - aftertextcheck
}}}
The problem is in the etc\Init.bat where the "aftertextcheck" label is
used - looks like Windows expects "\r\n" at the end of the label name
rather than "\n".
Are the Windows builds done on Linux? If so, I guess the root cause is
eol-style=native on lib/init/init.bat in the GRASS repo. The solution
would be to set eol-style=CRLF, or maybe to tweak the makefile to run
tr/unix2dos/... on etc/Init.bat.
Opinions?
There are plenty of *.bat with LF instead of CRLF in the GRASS
installation dir. Shouldn't they all have CRLF line endings?:
#1803: GRASS 6.4.3RC1 on Win 7: grass64.bat fails due to UNIX line endings in
Init.bat
----------------------------+-----------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Startup | Version: 6.4.3 RCs
Keywords: Init.bat, CRLF | Platform: MSWindows 7
Cpu: x86-64 |
----------------------------+-----------------------------------------------
Old description:
Are the Windows builds done on Linux? If so, I guess the root cause
winGRASS are built on Windows, of course - in MinGW/MSys environment.
New description:
There's a following error at GRASS 6.4.3RC1 startup in text mode on Win 7
64bit:
{{{
C:\>"C:\Program Files (x86)\GRASS GIS 6.4.3RC1\grass64.bat" -text
The system cannot find the batch label specified - aftertextcheck
}}}
The problem is in the etc\Init.bat where the "aftertextcheck" label is
used - looks like Windows expects "\r\n" at the end of the label name
rather than "\n".
Are the Windows builds done on Linux? If so, I guess the root cause is
eol-style=native on lib/init/init.bat in the GRASS repo. The solution
would be to set eol-style=CRLF, or maybe to tweak the makefile to run
tr/unix2dos/... on etc/Init.bat.
Opinions?
There are plenty of *.bat with LF instead of CRLF in the GRASS
installation dir. Shouldn't they all have CRLF line endings?:
Replying to [ticket:1803 msieczka]:
> Are the Windows builds done on Linux? If so, I guess the root cause
>
> winGRASS are built on Windows, of course - in MinGW/MSys environment.
#1803: GRASS 6.4.3RC1 on Win 7: grass64.bat fails due to UNIX line endings in
Init.bat
----------------------------+-----------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Startup | Version: 6.4.3 RCs
Keywords: Init.bat, CRLF | Platform: MSWindows 7
Cpu: x86-64 |
----------------------------+-----------------------------------------------
Comment(by msieczka):
I assume that the svn checkout from GRASS repo is done on Windows too.
In that case, lib/init/init.bat (having eol-style=native) should have CRLF
line endings after an svn checkout on Win. So why does etc/Init.bat (made
from lib/init/init.bat during the build) have LF instead?
And BTW - should the other 111 *.bat have LF rather than CRLF like they
do?
Same issue is present in GRASS 6.4.3RC1 provided by the OSGeo4W installer.
#1803: GRASS 6.4.3RC1 on Win 7: grass64.bat fails due to UNIX line endings in
Init.bat
----------------------------+-----------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Startup | Version: 6.4.3 RCs
Keywords: Init.bat, CRLF | Platform: MSWindows 7
Cpu: x86-64 |
----------------------------+-----------------------------------------------
Comment(by neteler):
Replying to [ticket:1803 msieczka]:
>
>
> There's a following error at GRASS 6.4.3RC1 startup in text mode on Win
7 64bit:
>
> {{{
> C:\>"C:\Program Files (x86)\GRASS GIS 6.4.3RC1\grass64.bat" -text
> The system cannot find the batch label specified - aftertextcheck
> }}}
>
> The problem is in the etc\Init.bat where the "aftertextcheck" label is
used - looks like Windows expects "\r\n" at the end of the label name
rather than "\n".
It is surprising that this has never been reported before.
#1803: GRASS 6.4.3RC1 on Win 7: grass64.bat fails due to UNIX line endings in
Init.bat
----------------------------+-----------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Startup | Version: 6.4.3 RCs
Keywords: Init.bat, CRLF | Platform: MSWindows 7
Cpu: x86-64 |
----------------------------+-----------------------------------------------
Comment(by martinl):
Replying to [comment:4 msieczka]:
> I assume that the svn checkout from GRASS repo is done on Windows too.
>
> In that case, lib/init/init.bat (having eol-style=native) should have
CRLF line endings after an svn checkout on Win. So why does etc/Init.bat
(made from lib/init/init.bat during the build) have LF instead?
I have changed `eol-style` for `init.bat` to `CRLF` in r54365 (devbr6).
The source code in devb6 contains 24 bat files (other bat files are
generated during compilation process - for shell scripts).
#1803: GRASS 6.4.3RC1 on Win 7: grass64.bat fails due to UNIX line endings in
Init.bat
--------------------------------------+-------------------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Startup | Version: 6.4.3 RCs
Keywords: Init.bat, CRLF, wingrass | Platform: MSWindows 7
Cpu: x86-64 |
--------------------------------------+-------------------------------------
Comment(by hamish):
Retesting with the 6.4.3svn r55185 nightly build; the svn prop change
didn't help.
I assume that's because the Init.bat script is not copied, it is made from
init.bat(?).
note that msys nicely provides unix2dos.exe, if we need it at build or
install time.
Once resaving Init.bat with DOS newlines, "GRASS Command Line" in the
cmd.exe window starts, but after esc-enter an error message pops up saying
"set_data.exe has stopped working (segfault afaict "APPCRASH") do you want
to check for an online solution or close the program?". If you press
cancel you get the usual GRASS welcome text but no ascii art, and g.gisenv
all seems to be ok.
not sure where to go from here, but the nightly build scripts?
#1803: GRASS 6.4.3RC1 on Win 7: grass64.bat fails due to UNIX line endings in
Init.bat
--------------------------------------+-------------------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Startup | Version: 6.4.3 RCs
Keywords: Init.bat, CRLF, wingrass | Platform: MSWindows 7
Cpu: x86-64 |
--------------------------------------+-------------------------------------
Comment(by neteler):
Replying to [comment:12 hamish]:
> Retesting with the 6.4.3svn r55185 nightly build; the svn prop change
didn't help.
>
> I assume that's because the Init.bat script is not copied, it is made
from init.bat(?).
>
> note that msys nicely provides unix2dos.exe, if we need it at build or
install time.
Wouldn't it be sufficient then to add a unix2dos.exe call in:
Replying to [comment:17 neteler]:
> Replying to [comment:16 martinl]:
> > tested the last build (no.517) and GRASS 6.5 CLI starts. Please
backport to `relbr64`.
>
> Done in r55304.