On Dec 9, 2015, at 11:53 AM, Martin Landa <landa.mar...@gmail.com> wrote:
> 
> I am trying
> to compile GRASS GIS program on cygwin using *mingw32-w64* toolchain.

MinGW isn’t really on topic here.  Although these are Cygwin packages, build 
problems using them are typically not Cygwin problems.

Cygwin GNU make and MinGW GNU make behave quite differently, even though 
they’re built from the same source code.  The two key differences are that 
MinGW make uses cmd.exe for shell commands instead of /bin/sh, and that MinGW 
make can’t understand Cygwin’s POSIX paths.

Consequently, a package that supports building under both Cygwin and MinGW must 
have two different build systems.  The makefiles must differ.

GIS is a pretty specialized field, and GRASS is huge, so you’ll be lucky if 
anyone on the list has even tried what you’re proposing.  (Which is why I’m 
bothering to respond in the first place, even though I am not a GRASS user, and 
the closest I’ve gotten to GIS is the “ooo, maps” level of spectator 
appreciation.)

> First of all tried to launch this command from terminal:

Good, you’ve already tried the first thing I thought of asking.

Not everyone would even recognize that monstrosity as a single command, much 
less know enough to try and run it to see what happens.  Good job.

> and it failed with Segmentation fault.
> 
> Then I tried to launch it via gdb (so I changed last line to `gdb
> --args /home/landa/grass_trunk/dist.x86_64-w64-mingw32/bin/db.columns.exe
> --html-description` and type `run`:

You should prefix “gdb” with the PATH and LC_ALL environment overrides to fully 
match what GNU make is doing.

I don’t know if it matters, but let’s not introduce unnecessary variables.

> if I change path to this file from posix to win32 then the program
> run successfully without any error and produce desired output.

That sounds like the GRASS build process detected a POSIX-like environment, so 
it assumed that the resulting executables would also understand POSIX paths, 
which they won’t if built by MinGW GCC.

That means that either GRASS requires a POSIX environment, or it has a separate 
build process for MinGW, which you aren’t using by building under Cygwin.

Have you read this?

  https://trac.osgeo.org/grass/wiki/CompileOnWindows
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to