[GRASS-dev] [GRASS GIS] #1553: path settings to msys on wingrass

#1553: path settings to msys on wingrass
-------------------------+--------------------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Default | Version: unspecified
Keywords: | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Commandline environment is behaving strange on wingrass (likely because of
path setings):

e.g.
sort command ("sort -n -t ','") exits with error message:
"Input file specified two times"

It seems to be a problem of path-settings. See:
http://www.question-defense.com/2010/08/25/windows-7-cygwin-sort-input-
file-specified-two-times

Error occures both when installing GRASS through OSGeo4W-installer and
though QGIS-standalone installer (and with different GRASS versions (6.4.1
and 6.4.2)).

Probably, the path to msys/MINGW is hidden by some Windows settings...

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1553&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------
Changes (by hamish):

  * keywords: => wingrass, osgeo4w, qgis
  * priority: normal => major
  * version: unspecified => 6.4.2 RCs
  * component: Default => Packaging

Comment:

probably related to #1139. (v.report uses `sort`)

these scripts all use `sort`, and so may also have problems:
d.polar, d.vect.thematic, g.mlist, i.oif, i.spectral, r.in.wms,
r.univar.sh, v.colors, v.db.univar, v.in.e00, v.in.garmin, v.in.gpsbabel,
v.out.gpsbabel, v.univar.sh

what does "echo $PATH" say from the osgeo4w msys prompt?

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by sbl):

Here is the output from "echo $PATH"

.:/usr/local/bin:/mingw/bin:/bin:/c/PROGRA~1/QUANTU~2/bin:/c/PROGRA~1/GTK/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Program
Files/Intel/DMIX:/c/Program Files/NTRU Cryptosystems/NTRU TCG Software
Stack/bin/:/c/Program Files/Wave Systems Corp/Gemalto/Access
Client/v5/:/c/Program Files/Intel/WiFi/bin/:/c/Program Files/Common
Files/Roxio Shared/DLLShared/:/c/Program Files/Common Files/Roxio
Shared/10.0/DLLShared/:/c/Program Files/Windows
Imaging/:/c/WINDOWS/system32/WindowsPowerShell/v1.0:/c/WINDOWS/system32/WindowsPowerShell/v1.0:/c/Program
Files/TortoiseSVN/bin:/c/Program Files/R/R-2.11.1/bin:/c/Program
Files/PostgreSQL/8.4/bin:/c/Program Files/Quantum GIS
Wroclaw/bin:/c/Program Files/SSH Communications Security/SSH Secure
Shell:/bin

BTW: I also experienced issues regarding single and double quotation
marks. They are not allways recognised as usual/expected in the GRASS
windows-cmd. I post this here because I suspect it has the same
background. Hope thats O.K.:

echo "double > quotation marks" results in "double > quotation marks",
while
echo 'single > quotation marks' results in "" (an empty line)

v.db.select --verbose map=grid columns=cat where="cat>10" results in
Error:

"DBMI-DBF driver error:
SQL parser error: syntax error, unexpected $end processing
''
in statement:
SELECT cat FROM grid WHERE cat
Error in db_open_select_cursor()
ERROR: Unable to open select cursor"

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1553#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by hamish):

In #1139 [comment 16 hellik] wrote:
> tested above with a completely fresh downloaded osgeo4-stack
> (the old osgeo4-stack ,which my earlier tests above were based
> upon, was more than 2 years old). now also v.report invoked
> from the wx-gui is working.
>
> so for the original bug-reporter, please test again with a completely
fresh
> osgeo4w-stack/osgeo4w-wingrass.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by sbl):

I can confirm that:
v.db.select --verbose map=grid columns=cat where="cat>10"
works on a fresh installation of OSGeo4W, though, v.report and sort do
not.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1553#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by hamish):

Replying to [comment:4 sbl]:
> I can confirm that:
> v.db.select --verbose map=grid columns=cat where="cat>10"
> works on a fresh installation of OSGeo4W, though, v.report
> and sort do not.

what does `which sort` say? how about `which echo`?

do /bin/sort.exe and /bin/echo.exe exist?

are you running the commands from a MSys rxvt terminal prompt, a cmd.exe
DOS box, or the wxGUI command-line entry box?

In your $PATH /bin comes before /c/WINDOWS/system32, so I'm not sure why
it wouldn't pick up /bin/sort.exe if it was there.

thanks,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by sbl):

Replying to [comment:5 hamish]:
> Replying to [comment:4 sbl]:
> > I can confirm that:
> > v.db.select --verbose map=grid columns=cat where="cat>10"
> > works on a fresh installation of OSGeo4W, though, v.report
> > and sort do not.
>
> what does `which sort` say? how about `which echo`?
`which sort` says:
'which' is not recognized as an internal or external
command,
operable program or batch file.
Both, from the GRASS Text GUI, and the WX-GUI commandline interface
Invoked from Msys it says:
/bin/sort.exe

>
> do /bin/sort.exe and /bin/echo.exe exist?
Not in C:\OSGeo4W\bin, but in C:\OSGeo4W\apps\msys\bin
>
> are you running the commands from a MSys rxvt terminal prompt, a cmd.exe
DOS box, or the wxGUI command-line entry box?
I tried the DOS box (GRASS Text GUI), the Wx-GUIs commandline, and Msys.
The commands work only on Msys.
>
> In your $PATH /bin comes before /c/WINDOWS/system32, so I'm not sure why
it wouldn't pick up /bin/sort.exe if it was there.
Really strange, but when I write C:\OSGeo4W\apps\msys\bin\sort in GRASS
CMD it works also from there.

>
>
> thanks,
> Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by martinl):

Replying to [comment:6 sbl]:
> I tried the DOS box (GRASS Text GUI), the Wx-GUIs commandline, and Msys.
> The commands work only on Msys.

right, extra unix-like tools have been recently moved from `extrabin` to
`msys/bin` (standalone installer). This was not reflected in `PATH`.
Speaking about GRASS OSGeo4W package I am not sure if the original `msys`
package from OSGeo4W framework contains all required unix-like tools.

Ideally standalone installer should contain original `msys` package from
OSGeo4W framework with all required tools, not locally extended msys
installation, see
[wiki:CompileOnWindows#InstalltheenvironmentforcompilationMingW here].

It requires to collect list of required unix-line tools for GRASS and add
`grass-msys` or update `msys` package in OSGeo4W framework.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by martinl):

Replying to [comment:7 martinl]:
> (standalone installer). This was not reflected in `PATH`. Speaking about
GRASS OSGeo4W package

not right, seems to be OK for standalone and osgeo4w installer. Anyway for
OSGeo4W `msys/bin` is the last item in `PATH`.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by jef):

Replying to [comment:7 martinl]:
> It requires to collect list of required unix-line tools for GRASS and
add `grass-msys` or update `msys` package in OSGeo4W framework.

GRASS is the only dependant on `msys`. So `msys` should either be
extended or replaced by `grass-msys`.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by martinl):

Replying to [comment:9 jef]:
> Replying to [comment:7 martinl]:
> > It requires to collect list of required unix-line tools for GRASS and
add `grass-msys` or update `msys` package in OSGeo4W framework.
>
> GRASS is the only dependant on `msys`. So `msys` should either be
extended or replaced by `grass-msys`.

right, also long-term
[wiki:CompileOnWindows#InstalltheenvironmentforcompilationMingW bug] (1.)
could be fixed. Any volunteer for collecting list of required unix-like
tools (see bash scripts in GRASS 6)?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by hamish):

Replying to [comment:10 martinl]:
> Any volunteer for collecting list of required unix-like tools
> (see bash scripts in GRASS 6)?

as long as we are shipping a msys environment (grass6) all supplied SUS
unix power tools should be included, whether used in grass scripts
(currently/yet) or not. their usefulness to size ratio is incredible, and
we must consider the countless end-user scripts we know nothing about, and
will never see.

if there are a few problematic or huge executables in there of course they
should be reviewed on a case by case basis, but the default collection
needs to be there in full.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by hamish):

(since we are a supplier of basic building blocks, we must be very careful
in everything we do not to let a failure of imagination on our part
artificially limit the end-users' or some future developers' ability to
invent and expand in ways we never thought of.)

thanks,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by hamish):

is this now fixed with the latest osgeo4w pkg updates?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1553#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by sbl):

No, unfortunately not. I tested both on Windows XP and a Windows 7 (wher
no OSGeo was installed earlier)...
The 'sort' command does not show up in the list of osgeo-shell-commands in
the startup either...

These are the path-setttings on my Windows XP computer (having the path to
msys at last position...):
C:\OSGeo4W\bin;C:\PROGRA~1\GTK\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Intel\DMIX;C:\Program Files\NTRU Cryptosystems\NTRUTCG Software
Stack\bin\;C:\Program Files\Wave Systems Corp\Gemalto\Access
Client\v5\;C:\Program Files\Intel\WiFi\bin\;c:\Program Files\Common
Files\Roxio Shared\DLLShared\;c:\Program Files\Common Files\Roxio
Shared\10.0DLLShared\;C:\Program Files\Windows
Imaging\;C:\WINDOWS\system32WindowsPowerShell\v1.0;C:\WINDOWS\system32WindowsPowerShell\v1.0;C:\Program
Files\TortoiseSVN\bin;C:\Program Files\R\R-2.11.1\bin;C:\Program
iles\PostgreSQL\8.4\bin;C:\Program Files\Quantum GIS
Wroclaw\bin;C:\Program Files\SSH Communications Security\SSH Secure
Shell;C:\OSGeo4W\apps\msys\bin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1553#comment:14&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------

Comment(by neteler):

It seems to be there now:

{{{
GRASS 6.4.3svn (nc_spm_08)> sort --version
sort (GNU coreutils) 5.97
}}}

Can you confirm?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1553#comment:15&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
-------------------------------------+--------------------------------------
Reporter: sbl | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Packaging | Version: 6.4.2 RCs
Keywords: wingrass, osgeo4w, qgis | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------------------+--------------------------------------
Changes (by neteler):

  * milestone: 6.4.2 => 6.4.3

Comment:

Tested ok once more on Win8 with winGRASS standalone.

Does it persist in the GRASS-OSGeo4W-installer?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1553#comment:16&gt;
GRASS GIS <http://grass.osgeo.org>

#1553: osgeo4w and qgis builds: path settings to msys on wingrass find wrong
'sort'
---------------------------+------------------------------------------------
  Reporter: sbl | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.3
Component: Packaging | Version: 6.4.2 RCs
Resolution: fixed | Keywords: wingrass, osgeo4w, qgis
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Changes (by sbl):

  * status: new => closed
  * resolution: => fixed

Comment:

Tested ok on Win7 with GRASS 6.4.3svnthrough OSGeo4w-installer...

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1553#comment:17&gt;
GRASS GIS <http://grass.osgeo.org>