[GRASS5] [bug #812] (grass) [cygwin] r.out.tiff dumps core

this bug's URL: http://intevation.de/rt/webrt?serial_num=812
-------------------------------------------------------------------------

Subject: [cygwin] r.out.tiff dumps core

Platform: Cygwin/Win2k
Xwindows version: Xfree 4.0.x
Xwindows manager: twm
TclTk version: tcl/tk 8.0.5
grass downloaded at: Hannover site
grass sources source: no, I got a source code package from the server, 5.0.0.pre2
c compiler name: gcc

Running r.out.tiff dumps core for my rasterfile on the cygwin platform.
The same operation (identical file, same GRASS release) works fine on
SuSE Linux.

The stackdump file reports a STATUS_ACCESS_VIOLATION.

-------------------------------------------- Managed by Request Tracker

Request Tracker wrote:

Subject: [cygwin] r.out.tiff dumps core

Running r.out.tiff dumps core for my rasterfile on the cygwin platform.
The same operation (identical file, same GRASS release) works fine on
SuSE Linux.

The stackdump file reports a STATUS_ACCESS_VIOLATION.

We would need to see the actual backtrace in order to resolve this
issue. The backtrace would need to contain function names, which means
that the binaries need to have not been stripped.

To the list: can we remove the "-s" flag from the default LDFLAGS
setting? I can understand wanting to reduce the size of binary
distributions, but developers shouldn't (IMHO) be running stripped
binaries.

You should be able to force the use of "-s" with e.g.

  LDFLAGS=-s ./configure ...

But disabling it is more awkward (modify src/CMD/head.<platform> after
running configure).

--
Glynn Clements <glynn.clements@virgin.net>

On Fri, Nov 09, 2001 at 02:07:17PM +0000, Glynn Clements wrote:
[...]

To the list: can we remove the "-s" flag from the default LDFLAGS
setting? I can understand wanting to reduce the size of binary
distributions, but developers shouldn't (IMHO) be running stripped
binaries.

You should be able to force the use of "-s" with e.g.

  LDFLAGS=-s ./configure ...

But disabling it is more awkward (modify src/CMD/head.<platform> after
running configure).

... well, why not. But what about the "-g" flag? It also
increases the size of the binaries. The treatment of "-s" and
"-g" should be synchronized somehow. Recently I saw a
configure having a test for that (unfortunately I can't
remember the program).

Markus

Markus Neteler wrote:

> To the list: can we remove the "-s" flag from the default LDFLAGS
> setting? I can understand wanting to reduce the size of binary
> distributions, but developers shouldn't (IMHO) be running stripped
> binaries.
>
> You should be able to force the use of "-s" with e.g.
>
> LDFLAGS=-s ./configure ...
>
> But disabling it is more awkward (modify src/CMD/head.<platform> after
> running configure).

... well, why not. But what about the "-g" flag? It also
increases the size of the binaries. The treatment of "-s" and
"-g" should be synchronized somehow. Recently I saw a
configure having a test for that (unfortunately I can't
remember the program).

Some quick tests with Linux/gcc suggest that using "-s" (or
subsequently using "strip") removes everything which "-g" adds.

Also, note that use of "-g" is automated by autoconf's AC_PROG_CC
macro:

- Macro: AC_PROG_CC
     Determine a C compiler to use. If `CC' is not already set in the
     environment, check for `gcc', and use `cc' if that's not found.
     Set output variable `CC' to the name of the compiler found.

     If using the GNU C compiler, set shell variable `GCC' to `yes',
     empty otherwise. If output variable `CFLAGS' was not already set,
     set it to `-g -O2' for the GNU C compiler (`-O2' on systems where
     GCC does not accept `-g'), or `-g' for other compilers.

Probably the simplest approach to stripping is to have a "make strip"
target which runs "strip" on everything in $GISBASE/etc/bin/{cmd,inter}.

BTW, there are a few files which should probably be moved to
$GISBASE/scripts:

  etc/bin/cmd/r.combine
  etc/bin/inter/r.weight
  etc/bin/inter/v.sdts.meta

--
Glynn Clements <glynn.clements@virgin.net>