Doubled output in `spatialite` CLI (MSYS2)

34 views
Skip to first unread message

Konstantin Podsvirov

unread,
Apr 13, 2021, 2:45:09 PM4/13/21
to SpatiaLite Users
For `spatialite` CLI from MSYS2 I get doubled output:
```
spatialite> SELECT id, AsText(location) AS location FROM towns;
SELECT id, AsText(location) AS location FROM towns;
id          location
----------  ------------
1           1           POINT(33 44)
POINT(33 44)
```

But with `sqlite3` with `mod_spatialite` all as aspected:
```
sqlite> SELECT id, AsText(location) AS location FROM towns;
SELECT id, AsText(location) AS location FROM towns;
id  location
--  ------------
1   POINT(33 44)
```

Alessandro Furieri

unread,
Apr 19, 2021, 11:02:27 AM4/19/21
to SpatiaLite Users
Hi Konstantin,

I'm unable to confirm your problem, however I can confirm that
MSYS2 surely has many troubles in correctly supporting the
CLI tool.

this is what I can see on my own mingw32.exe / mingw64.exe shells:

a. spatialite_cli.exe is unable to show any output at all on   
   the console's screen
b. and the same is for sqlite3.exe from the canonical "pacman"
   distribution in -/mingw64/bin
   
both the stdout and stderr files work nicely when redirected 
as e.g. in
 
spatialite >out1 2> out2

they correctly work on the MS cmd.exe command shell, and the
same code works nicely on Linux.

my personal conclusion is that MSYS2 has some obscure 
idiosynchrasy forbidding to correctly hanlde stdout
and stderr in the same way supported by native cmd.exe

bye Sandro
Reply all
Reply to author
Forward
0 new messages