Package: thuban
Severity: normal
Tags: patch

When building 'thuban' on amd64 with gcc-4.0,
I get the following error:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes 
-fPIC -I/usr/include -Ilibraries/thuban/ -I/usr/include/python2.3 -c 
libraries/thuban/gdalwarp.cpp -o 
build/temp.linux-x86_64-2.3/libraries/thuban/gdalwarp.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
In file included from /usr/include/python2.3/Python.h:8,
                 from libraries/thuban/gdalwarp.cpp:113:
/usr/include/python2.3/pyconfig.h:856:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/stdio.h:28,
                 from /usr/include/cpl_port.h:151,
                 from /usr/include/gdal.h:177,
                 from /usr/include/gdal_alg.h:95,
                 from libraries/thuban/gdalwarp.cpp:94:
/usr/include/features.h:150:1: warning: this is the location of the previous 
definition
libraries/thuban/gdalwarp.cpp: In function 'PyObject* 
ProjectRasterFile(PyObject*, PyObject*)':
libraries/thuban/gdalwarp.cpp:217: error: cast from 'MFILEReceiver*' to 'int' 
loses precision
libraries/thuban/gdalwarp.cpp:217: warning: field width should have type 'int', 
but argument 4 has type 'long unsigned int'
libraries/thuban/gdalwarp.cpp:217: warning: field width should have type 'int', 
but argument 4 has type 'long unsigned int'
error: command 'gcc' failed with exit status 1
make: *** [build-stamp] Error 1

With the attached patch 'thuban' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/thuban-1.0.0/libraries/thuban/gdalwarp.cpp 
./libraries/thuban/gdalwarp.cpp
--- ../tmp-orig/thuban-1.0.0/libraries/thuban/gdalwarp.cpp      2003-08-19 
23:32:24.000000000 +0200
+++ ./libraries/thuban/gdalwarp.cpp     2005-03-07 12:30:42.486778091 +0100
@@ -106,7 +106,7 @@
  */
 #define MFILENAME(name, ptr) \
 char name[ 8 + 2 * sizeof( void* ) + 1]; \
-{snprintf( name, sizeof(name), "\3\1\4MFILE%0*x", 2*sizeof(void*), 
(int)(ptr)); \
+{snprintf( name, sizeof(name), "\3\1\4MFILE%0*lx", 2*sizeof(void*), 
(long)(ptr)); \
  memset( ptr, 0, sizeof( ptr ) );}
 
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to