Package: mercator
Version: 0.2.5-2
Usertags: ftbfs-gcc-4.3

Your package fails to build with GCC 4.3.  Version 4.3 has not been
released yet but I'm building with a snapshot in order to find errors
and give people an advance warning.

Problem 1)  In GCC 4.3, the C++ header dependencies have been cleaned up.  The
advantage of this is that programs will compile faster.  The downside is that
you actually need to directly #include everything you use (but you really
should do this anyway, otherwise your program won't work with any compiler
other than GCC).

Problem 2) two parameters have the same name

There's some more information about this at
http://gcc.gnu.org/gcc-4.3/porting_to.html

You can reproduce this problem with gcc-4.3 or gcc-snapshot from
unstable.

> Automatic build of mercator_0.2.5-2 on em64t by sbuild/amd64 0.53
...
> /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H  -I.. -I..  
> -I/usr/include/wfmath-0.3    -g -Wall -O2 -Wall -DNDEBUG -c -o Forest.lo 
> Forest.cpp
>  g++ -DHAVE_CONFIG_H -I.. -I.. -I/usr/include/wfmath-0.3 -g -Wall -O2 -Wall 
> -DNDEBUG -c Forest.cpp  -fPIC -DPIC -o .libs/Forest.o
> In file included from ../Mercator/Forest.h:8,
>                  from Forest.cpp:11:
> ../Mercator/RandCache.h: In member function 'virtual size_t 
> ZeroSpiralOrdering::operator()(int, int)':
> ../Mercator/RandCache.h:61: error: call of overloaded 'abs(int&)' is ambiguous
> /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cmath:99:
>  note: candidates are: double std::abs(double)
> /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cmath:103:
>  note:                 float std::abs(float)
> /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cmath:107:
>  note:                 long double std::abs(long double)
> ../Mercator/RandCache.h:61: error: call of overloaded 'abs(int&)' is ambiguous
> /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cmath:99:
>  note: candidates are: double std::abs(double)
> /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cmath:103:
>  note:                 float std::abs(float)
> /usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.3.0/../../../../include/c++/4.3.0/cmath:107:
>  note:                 long double std::abs(long double)
> make[3]: *** [Forest.lo] Error 1

and another one like that and then:

>  /usr/lib/gcc-snapshot/bin/g++ -DHAVE_CONFIG_H -I.. -I.. 
> -I/usr/include/wfmath-0.3 -g -Wall -O2 -Wall -DNDEBUG -c AreaShader.cpp  
> -fPIC -DPIC -o .libs/AreaShader.o
> In file included from AreaShader.cpp:9:
> ../Mercator/AreaShader.h:25: error: multiple parameters named 's'
> make: *** [AreaShader.lo] Error 1

--- Mercator/RandCache.h~       2008-01-21 17:19:05.000000000 +0000
+++ Mercator/RandCache.h        2008-01-21 17:20:04.000000000 +0000
@@ -6,6 +6,7 @@
 #define MERCATOR_RANDCACHE_H
 
 #include <vector>
+#include <cstdlib>
 #include <wfmath/MersenneTwister.h>
 
 // construct with something like:
--- Mercator/AreaShader.cpp~    2008-01-21 17:20:24.000000000 +0000
+++ Mercator/AreaShader.cpp     2008-01-21 17:22:42.000000000 +0000
@@ -12,6 +12,7 @@
 #include "Mercator/Segment.h"
 #include "Mercator/Surface.h"
 
+#include <algorithm>
 #include <set>
 #include <iostream>
 
--- Mercator/AreaShader.h~      2008-01-21 17:21:02.000000000 +0000
+++ Mercator/AreaShader.h       2008-01-21 17:22:52.000000000 +0000
@@ -22,7 +22,7 @@
     virtual bool checkIntersect(const Segment &) const;
 private:
     /// helper to shader a single area into the surface
-    void shadeArea(Surface& s, const Area* const s) const;
+    void shadeArea(Surface& s, const Area* const ar) const;
     
     int m_layer;
 };


-- 
Martin Michlmayr
http://www.cyrius.com/



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

Reply via email to