This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: posix vs. win32 paths (segfault vs. gdb)


On Dec 9, 2015, at 11:53 AM, Martin Landa <landa.martin@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]