Error messages in Cygwin

Added by Jonathan 8 months ago

Hello, I am using GMT5 on Cygwin on my Windows 8.1 machine (64-bit). I have been using it successfully for a couple months now, but I have never been able to get it to produce error messages, no matter what verbosity level I use. I initially just assumed it was part of the sacrifice for using it on Cygwin rather than a true linux system and was able to work around it, but I'm having a few issues that I am unable to trouble-shoot and it'd be nice to have some guidance from the error messages. I looked through the forums and couldn't see anything specifically about error messages in Cygwin, so it may be an issue with my machine specifically. Do you know of any reason that error messages might not be working on my installation? Is it a common Cygwin issue? Any advice you can provide would be appreciated as always, thanks!
- Jonathan


Replies (6)

RE: Error messages in Cygwin - Added by Paul 8 months ago

Cannot check from home but last time I tried Cygwin (1+ year) there were certainly error messages printing to the terminal. If you just type

gmt

then presumably you see something like this:

GMT - The Generic Mapping Tools, Version 6.0.0_r19684 [64-bit] [8 cores]
(c) 1991-2018 Paul Wessel, Walter H. F. Smith, Remko Scharroo, Joaquim Luis, and Florian Wobbe

Then, if you try

gmt psxy -

you should see

psxy(core) 6.0.0_r19684 [64-bit] - Plot lines, polygons, and symbols on maps

usage: psxy [<table>] -J<args> -R<west>/<east>/<south>/<north>[/<zmin>/<zmax>][+r] [-A[m|p|x|y]]
[-B<args>] [-C<cpt>] [-D<dx>/<dy>] [-E[x|y|X|Y][+a][+c[l|f]][+n][+p<pen>][+w<width>]] [-F<arg>] [-G<fill>]
[-I<intens>] [-K] [-L[+b|d|D][+xl|r|x0][+yb|t|y0][+p<pen>]] [-N[c|r]] [-O] [-P]
...

If you are getting no error messages, are you seeing any of these outputs?

RE: Error messages in Cygwin - Added by Joaquim 8 months ago

I can't even run GMT from my Cygwin's desktop machine. It says it can't load some shared lib but doesn't say which and I don't know how to debug this type of things in Cygwin.
I lost patience for it long time ago. For a unix experience I find MinGW/Msys a better experience.

RE: Error messages in Cygwin - Added by Jonathan 8 months ago

Sorry, just now had a chance to look back at this again. I actually do not get any output if I just type gmt, but I do get the output you show if I type gmt psxy, hopefully that is a clue. If there isn't an obvious resolution, I could try installing MinGW as Joaquim suggested, or just deal with having no error messages. Would I have to re-install GMT if I switched to MinGW? Does it function in a similar manner (i.e., opening a command window on the Windows desktop)? Thanks for your help.
- Jonathan

RE: Error messages in Cygwin - Added by Joaquim 8 months ago

Typing only gmt prints nothing, you must at least type gmt -. Regarding the Cygwin issue, I don't know what is your use of it. If you only use it to have a bash shell (i.e. no need of gcc). MinGW/MSys is a friendlier alternative that does not try to force Windows to be a posix environment. All command line programs that run on windows should run there as well with no further modifications (it inherits the Win path).
But there are even simpler alternatives. I have not yet explored the terminal (https://conemu.github.io/) but it looks very nice and quick tests just shows that I can immediately call GMT from a bash shell.

RE: Error messages in Cygwin - Added by Paul 8 months ago

No, typing just gmt should print something like this (depending on version)

    GMT - The Generic Mapping Tools, Version 6.0.0_r19681 [64-bit] [24 cores]
(c) 1991-2018 Paul Wessel, Walter H. F. Smith, Remko Scharroo, Joaquim Luis, and Florian Wobbe

Supported in part by the US National Science Foundation (http://www.nsf.gov/)
and volunteers from around the world (see http://gmt.soest.hawaii.edu/).

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the
GNU Lesser General Public License (http://www.gnu.org/licenses/lgpl.html).
For more information about legal matters, see the file named LICENSE.TXT.

usage: gmt [options]
       gmt <module name> [<module-options>]

Session management:
  gmt begin         Initiate a new GMT session using modern mode [classic].
  gmt end           Terminate the current GMT modern mode session.
  gmt figure        Set figure format specifics under a GMT modern mode session.
  gmt subplot       Initiate a multi-panel figure.
  gmt clear history | conf | cache | all
                    Deletes gmt.history, gmt.conf, the user cache dir, or all of them

options:
  --help            List descriptions of available GMT modules.
  --show-bindir     Show directory with GMT executables.
  --show-cores      Print number of available cores.
  --show-datadir    Show directory/ies with user data.
  --show-modules    List all module names.
  --show-library    Show path of the shared GMT library.
  --show-plugindir  Show directory for plug-ins.
  --show-sharedir   Show directory for shared GMT resources.
  --version         Print GMT version number.

if <module-options> is '=' we call exit (0) if module exist and non-zero otherwise.

RE: Error messages in Cygwin - Added by Joaquim 8 months ago

Oops, don't know what happened. Didn't print the first time but perhaps I was to impatient and hit Ctr-C right away. Now it does.

(1-6/6)