[GRASS-dev] diglib test.c fails on 64bit win

Markus Metz wrote:
[...]

In summary, it seems that grass libraries have no access to a 64-bit
off_t when compiled in MINGW32, also with ./configure
--enable-largefile.

maybe FYI:

"GCC for both x64 & x86 Windows:

The project's goal is to deliver runtime, headers, and libs for
developing 64 bit (x64), as well as 32 bit (x86), windows
applications using gcc-4.4 or newer versions.

The current state: It is already possible to generate
applications using these headers, libs and runtime together with gcc-4.4 and up
[...]"

http://mingw-w64.sourceforge.net/

AFAIK the R-project uses MinGW-w64 for their windows-64bit-binaries. and for the the next
R-release there seems to be planned one dual-installer with 32/64bit-binaries.

best regards
Helmut

___________________________________________________________
NEU: WEB.DE DSL für 19,99 EUR/mtl. und ohne Mindest-Laufzeit!
http://produkte.web.de/go/02/

Helmut Kudrnovsky wrote:

>In summary, it seems that grass libraries have no access to a 64-bit
>off_t when compiled in MINGW32, also with ./configure
>--enable-largefile.

maybe FYI:

"GCC for both x64 & x86 Windows:

This is unrelated to Win64.

Win32 has a 64-bit version of off_t and functions which use it.
However, there isn't any equivalent of _FILE_OFFSET_BITS=64, which (on
Unix) causes off_t and any relevant functions to be "redirected" to
the 64-bit equivalents.

The problem with using 64-bit offsets is that they have to be used
consistently. If code using a 64-bit off_t passes it to code expecting
a 32-bit off_t, you lose.

--
Glynn Clements <glynn@gclements.plus.com>

On Fri, May 14, 2010 at 8:39 PM, Glynn Clements
<glynn@gclements.plus.com> wrote:

Helmut Kudrnovsky wrote:

>In summary, it seems that grass libraries have no access to a 64-bit
>off_t when compiled in MINGW32, also with ./configure
>--enable-largefile.

maybe FYI:

"GCC for both x64 & x86 Windows:

This is unrelated to Win64.

Win32 has a 64-bit version of off_t and functions which use it.
However, there isn't any equivalent of _FILE_OFFSET_BITS=64, which (on
Unix) causes off_t and any relevant functions to be "redirected" to
the 64-bit equivalents.

The problem with using 64-bit offsets is that they have to be used
consistently. If code using a 64-bit off_t passes it to code expecting
a 32-bit off_t, you lose.

All this refers to grass7 because only grass7 has different diglib
tests for 32-bit off_t and 64-bit off_t. Sometime last year I
successfully compiled grass7 with MINGW64, but without GUI because at
that time
http://downloads.sourceforge.net/wxpython/wxPython2.8-win64-devel-2.8.10.1-msvc9x64.tar.bz2
was not yet available. So I had to compile wxpython for MINGW64 from
source. Problem was that wxpython insisted on sizeof(long) ==
sizeof(void *), and on Windows 64-bit, sizeof(long) == 4 and
sizeof(void *) == 8. I spent a lot of time hacking wxpython but
eventually gave up. I don't know if grass7 will compile using the new
wxpython-devel package since it was apparently compiled with MSVC 9.
Testing welcome. I recommend a lot of patience and a lot of coffee
while waiting;-)