Package: libterralib
Version: 3.0.3b2-1
Severity: serious
Tags: patch
When building 'libterralib' on amd64/unstable,
I get the following error:
make[2]: Entering directory `/libterralib-3.0.3b2/terralibx/terralib'
g++ -c -pipe -Wall -W -g -fPIC -DQT_SHARED -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-I/usr/share/qt3/mkspecs/default -I. -I../../src/terralib/kernel
-I../../src/terralib/functions -I../../src/tiff -I../../src/zlib
-I/usr/include/qt3 -o .obj/lexTemporal.o
../../src/terralib/kernel/lexTemporal.cpp
../../src/terralib/kernel/lexTemporal.cpp: In function 'int my_yyinput(char*,
int)':
../../src/terralib/kernel/lexTemporal.cpp:653: error: cast from 'const char*'
to 'int' loses precision
../../src/terralib/kernel/lexTemporal.cpp: At global scope:
../../src/terralib/kernel/lexTemporal.cpp:1888: warning: 'void*
yy_flex_realloc(void*, yy_size_t)' defined but not used
../../src/terralib/kernel/lexTemporal.cpp:1367: warning: 'void yyunput(int,
char*)' defined but not used
make[2]: *** [.obj/lexTemporal.o] Error 1
make[2]: Leaving directory `/libterralib-3.0.3b2/terralibx/terralib'
With the attached patch 'libterralib' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN
../tmp-orig/libterralib-3.0.3b2/src/terralib/kernel/TeDecoderMemoryMap.cpp
./src/terralib/kernel/TeDecoderMemoryMap.cpp
--- ../tmp-orig/libterralib-3.0.3b2/src/terralib/kernel/TeDecoderMemoryMap.cpp
2005-02-21 19:23:35.000000000 +0000
+++ ./src/terralib/kernel/TeDecoderMemoryMap.cpp 2005-09-05
05:22:46.000000000 +0000
@@ -591,7 +591,7 @@
m_dwSize = aux.st_size;
m_lpszFile = mmap(0, m_dwSize, PROT_READ|PROT_WRITE , MAP_PRIVATE,
m_hFile, 0);
- if ( ((int) m_lpszFile) == -1 )
+ if ( ((long) m_lpszFile) == -1 )
return;
}
@@ -631,7 +631,7 @@
m_dwSize = aux.st_size;
m_lpszFile = mmap(0, m_dwSize, PROT_READ|PROT_WRITE , MAP_PRIVATE,
m_hFile, 0);
- if ( ((int) m_lpszFile) == -1 )
+ if ( ((long) m_lpszFile) == -1 )
return false;
// Writes the default values
diff -urN ../tmp-orig/libterralib-3.0.3b2/src/terralib/kernel/lexTemporal.cpp
./src/terralib/kernel/lexTemporal.cpp
--- ../tmp-orig/libterralib-3.0.3b2/src/terralib/kernel/lexTemporal.cpp
2004-11-12 18:32:46.000000000 +0000
+++ ./src/terralib/kernel/lexTemporal.cpp 2005-09-05 05:21:14.000000000
+0000
@@ -650,11 +650,11 @@
int my_yyinput(char* buf, int max_size)
{
int n = max_size;
- int s = myinputlim - (int)myinputptr;
+ long s = myinputlim - (long)myinputptr;
if(max_size>s)
n = s;
- //int n = min(max_size, myinputlim - (int)myinputptr);
+ //int n = min(max_size, myinputlim - (long)myinputptr);
if(n>0)
{
initLexOut();
diff -urN ../tmp-orig/libterralib-3.0.3b2/src/terralib/kernel/yyTemporal.cpp
./src/terralib/kernel/yyTemporal.cpp
--- ../tmp-orig/libterralib-3.0.3b2/src/terralib/kernel/yyTemporal.cpp
2004-05-12 12:45:13.000000000 +0000
+++ ./src/terralib/kernel/yyTemporal.cpp 2005-09-05 05:26:11.000000000
+0000
@@ -74,7 +74,7 @@
myinputptr_aux = strIn;
myinputptr = myinputptr_aux.c_str();
- myinputlim = (int)myinputptr + strIn.size ();
+ myinputlim = (long)myinputptr + strIn.size ();
database_ = db;
return 1;
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]