Hi,
just for the records. The simple attached patch solves the problem. It seems to
be an issue with template instantiation in the latest gcc compilers.
Cheers,
Michael
On Wed, Sep 06, 2006 at 03:55:46PM +0200, Michael Hanke wrote:
> Hi,
>
> I was about to update the Debian package of FSL (some images were
> missing), when I had to discover that FSLView does not compile anymore.
>
> I tried to figure out what the problem is, but I was unable to solve it.
> Here is the error that I get:
>
> - snip --------------
>
>
> [ 3%] Building CXX object src/fslview/CMakeFiles/ui.dir/moc_application.o
> /usr/bin/c++ -Wno-deprecated -O3 -DNDEBUG -I/tmp/buildd/fsl-3.3.7/src -I/usr/include/newmat -I/tmp/buildd/fsl-3.3.7/src/fslview/src -I/tmp/buildd/fsl-3.3.7/extras/include/zlib -I/usr/include/vtk-5.0 -I/usr/include/tcl8.4 -I/usr/include/python2.4 -I/usr/include/freetype2 -I/usr/share/qt3/include -I/usr/include/qwt -I/tmp/buildd/fsl-3.3.7/include -I/tmp/buildd/fsl-3.3.7/DEB_fslview_build/src/fslview -DQT_SHARED -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -D_REENTRANT -DHAVE_VTK -o src/fslview/CMakeFiles/ui.dir/moc_application.o -c /tmp/buildd/fsl-3.3.7/DEB_fslview_build/src/fslview/moc_application.cxx
> /tmp/buildd/fsl-3.3.7/src/utils/options.h: In member function 'bool Utilities::Option<T>::set_value(const std::string&) [with T = std::pair<float, float>]':
> /tmp/buildd/fsl-3.3.7/DEB_fslview_build/src/fslview/moc_application.cxx:222: instantiated from here
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:268: error: no matching function for call to 'string_to_T(std::pair<float, float>&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:79: note: candidates are: bool Utilities::string_to_T(bool&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:80: note: bool Utilities::string_to_T(std::string&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:81: note: bool Utilities::string_to_T(int&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:82: note: bool Utilities::string_to_T(float&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:83: note: bool Utilities::string_to_T(std::vector<int, std::allocator<int> >&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:84: note: bool Utilities::string_to_T(std::vector<float, std::allocator<float> >&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h: In member function 'bool Utilities::Option<T>::set_value(const std::string&, char**, int, int) [with T = std::pair<float, float>]':
> /tmp/buildd/fsl-3.3.7/DEB_fslview_build/src/fslview/moc_application.cxx:222: instantiated from here
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:278: error: no matching function for call to 'string_to_T(std::pair<float, float>&, const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:79: note: candidates are: bool Utilities::string_to_T(bool&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:80: note: bool Utilities::string_to_T(std::string&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:81: note: bool Utilities::string_to_T(int&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:82: note: bool Utilities::string_to_T(float&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:83: note: bool Utilities::string_to_T(std::vector<int, std::allocator<int> >&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:84: note: bool Utilities::string_to_T(std::vector<float, std::allocator<float> >&, const std::string&)
> /tmp/buildd/fsl-3.3.7/DEB_fslview_build/src/fslview/moc_application.cxx:222: instantiated from here
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:289: error: no matching function for call to 'string_to_T(std::pair<float, float>&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:79: note: candidates are: bool Utilities::string_to_T(bool&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:80: note: bool Utilities::string_to_T(std::string&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:81: note: bool Utilities::string_to_T(int&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:82: note: bool Utilities::string_to_T(float&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:83: note: bool Utilities::string_to_T(std::vector<int, std::allocator<int> >&, const std::string&)
> /tmp/buildd/fsl-3.3.7/src/utils/options.h:84: note: bool Utilities::string_to_T(std::vector<float, std::allocator<float> >&, const std::string&)
> make[2]: *** [src/fslview/CMakeFiles/ui.dir/moc_application.o] Error 1
> make[2]: Leaving directory `/tmp/buildd/fsl-3.3.7/DEB_fslview_build'
> make[1]: *** [src/fslview/CMakeFiles/ui.dir/all] Error 2
> make[1]: Leaving directory `/tmp/buildd/fsl-3.3.7/DEB_fslview_build'
> make: *** [all] Error 2
>
>
> ---------------------
>
> I have no idea what is going on here. There IS a string_to_T() function for the
> required datatype and it is in the same namespace. it should work, but it does
> not.
>
> I'd be glad if anyone could point me to a solution.
>
>
> Thanks,
>
> Michael
>
>
>
> --
> GPG key: 1024D/3144BE0F Michael Hanke
> http://apsy.gse.uni-magdeburg.de/hanke
> ICQ: 48230050
--
GPG key: 1024D/3144BE0F Michael Hanke
http://apsy.gse.uni-magdeburg.de/hanke
ICQ: 48230050
#! /bin/sh /usr/share/dpatch/dpatch-run
## 25-fslview_ftbfs_template.dpatch by Michael Hanke <[log in to unmask]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad fsl-3.3.7~/src/fslview/src/fslview/options.h fsl-3.3.7/src/fslview/src/fslview/options.h
--- fsl-3.3.7~/src/fslview/src/fslview/options.h 2005-08-17 15:36:10.000000000 +0200
+++ fsl-3.3.7/src/fslview/src/fslview/options.h 2006-09-07 20:17:44.000000000 +0200
@@ -9,17 +9,17 @@
#if !defined(FSLVIEWOPTIONS_H)
#define FSLVIEWOPTIONS_H
-#include "utils/options.h"
-#include "fslio/fslio.h"
-
-#include <qfileinfo.h>
-
namespace Utilities {
- extern bool string_to_T(std::pair<float,float>&, const string&);
+ extern bool string_to_T(std::pair<float,float>&, const std::string&);
}
+#include "utils/options.h"
+#include "fslio/fslio.h"
+
+#include <qfileinfo.h>
+
class OverlayOption
{
public:
|