Skip to content

Does not compile #2

Description

@jonsneyers

At least not on my particular configuration. I changed the Makefile to use g++ and gcc, and I added some missing includes. It then starts compiling quite a bit, until this:

$ make
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c ./gcif.cpp
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/lodepng.cpp
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/Log.cpp
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/Mutex.cpp
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/Clock.cpp
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/Thread.cpp
gcc  -c encoder/lz4hc.c
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/HuffmanEncoder.cpp
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/PaletteOptimizer.cpp
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/SystemInfo.cpp
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/ImageWriter.cpp
encoder/ImageWriter.cpp: In member function 'int cat::ImageWriter::init(int, int)':
encoder/ImageWriter.cpp:118:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   xsize > MAX_X || ysize > MAX_Y) {
         ^
encoder/ImageWriter.cpp:118:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   xsize > MAX_X || ysize > MAX_Y) {
                          ^
g++ -Wall -fstrict-aliasing -O3 -fomit-frame-pointer -funroll-loops -DCAT_COMPILE_MMAP -c encoder/SmallPaletteWriter.cpp
In file included from encoder/MonoWriter.hpp:33:0,
                 from encoder/SmallPaletteWriter.hpp:38,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/MonoReader.hpp: In member function 'cat::MonoReader::ReadDelegate cat::MonoReader::getReadDelegate(bool)':
encoder/../decoder/MonoReader.hpp:183:82: error: no matching function for call to 'cat::Delegate2<unsigned char, short unsigned int, cat::ImageReader& __restrict__>::FromMember(cat::MonoReader*)'
    return ReadDelegate::FromMember<MonoReader, &MonoReader::read_row_filter>(this);
                                                                                  ^
In file included from encoder/Log.hpp:32:0,
                 from encoder/ImageWriter.hpp:35,
                 from encoder/SmallPaletteWriter.hpp:35,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/Delegates.hpp:389:30: note: candidate: template<class T, unsigned char (T::* F)(short unsigned int, cat::ImageReader& __restrict__)> static cat::Delegate2<ret_type, arg1_type, arg2_type>::this_type cat::Delegate2<ret_type, arg1_type, arg2_type>::FromMember(T*) [with T = T; ret_type (T::* F)(arg1_type, arg2_type) = F; ret_type = unsigned char; arg1_type = short unsigned int; arg2_type = cat::ImageReader& __restrict__]
  static CAT_INLINE this_type FromMember(T *object)
                              ^
encoder/../decoder/Delegates.hpp:389:30: note:   template argument deduction/substitution failed:
In file included from encoder/MonoWriter.hpp:33:0,
                 from encoder/SmallPaletteWriter.hpp:38,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/MonoReader.hpp:183:82: error: could not convert template argument '&cat::MonoReader::read_row_filter' to 'unsigned char (cat::MonoReader::*)(short unsigned int, cat::ImageReader& __restrict__)'
    return ReadDelegate::FromMember<MonoReader, &MonoReader::read_row_filter>(this);
                                                                                  ^
encoder/../decoder/MonoReader.hpp:186:85: error: no matching function for call to 'cat::Delegate2<unsigned char, short unsigned int, cat::ImageReader& __restrict__>::FromMember(cat::MonoReader*)'
     return ReadDelegate::FromMember<MonoReader, &MonoReader::read_tile_safe_lz>(this);
                                                                                     ^
In file included from encoder/Log.hpp:32:0,
                 from encoder/ImageWriter.hpp:35,
                 from encoder/SmallPaletteWriter.hpp:35,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/Delegates.hpp:389:30: note: candidate: template<class T, unsigned char (T::* F)(short unsigned int, cat::ImageReader& __restrict__)> static cat::Delegate2<ret_type, arg1_type, arg2_type>::this_type cat::Delegate2<ret_type, arg1_type, arg2_type>::FromMember(T*) [with T = T; ret_type (T::* F)(arg1_type, arg2_type) = F; ret_type = unsigned char; arg1_type = short unsigned int; arg2_type = cat::ImageReader& __restrict__]
  static CAT_INLINE this_type FromMember(T *object)
                              ^
encoder/../decoder/Delegates.hpp:389:30: note:   template argument deduction/substitution failed:
In file included from encoder/MonoWriter.hpp:33:0,
                 from encoder/SmallPaletteWriter.hpp:38,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/MonoReader.hpp:186:85: error: could not convert template argument '&cat::MonoReader::read_tile_safe_lz' to 'unsigned char (cat::MonoReader::*)(short unsigned int, cat::ImageReader& __restrict__)'
     return ReadDelegate::FromMember<MonoReader, &MonoReader::read_tile_safe_lz>(this);
                                                                                     ^
encoder/../decoder/MonoReader.hpp:188:87: error: no matching function for call to 'cat::Delegate2<unsigned char, short unsigned int, cat::ImageReader& __restrict__>::FromMember(cat::MonoReader*)'
     return ReadDelegate::FromMember<MonoReader, &MonoReader::read_tile_unsafe_lz>(this);
                                                                                       ^
In file included from encoder/Log.hpp:32:0,
                 from encoder/ImageWriter.hpp:35,
                 from encoder/SmallPaletteWriter.hpp:35,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/Delegates.hpp:389:30: note: candidate: template<class T, unsigned char (T::* F)(short unsigned int, cat::ImageReader& __restrict__)> static cat::Delegate2<ret_type, arg1_type, arg2_type>::this_type cat::Delegate2<ret_type, arg1_type, arg2_type>::FromMember(T*) [with T = T; ret_type (T::* F)(arg1_type, arg2_type) = F; ret_type = unsigned char; arg1_type = short unsigned int; arg2_type = cat::ImageReader& __restrict__]
  static CAT_INLINE this_type FromMember(T *object)
                              ^
encoder/../decoder/Delegates.hpp:389:30: note:   template argument deduction/substitution failed:
In file included from encoder/MonoWriter.hpp:33:0,
                 from encoder/SmallPaletteWriter.hpp:38,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/MonoReader.hpp:188:87: error: could not convert template argument '&cat::MonoReader::read_tile_unsafe_lz' to 'unsigned char (cat::MonoReader::*)(short unsigned int, cat::ImageReader& __restrict__)'
     return ReadDelegate::FromMember<MonoReader, &MonoReader::read_tile_unsafe_lz>(this);
                                                                                       ^
encoder/../decoder/MonoReader.hpp:192:82: error: no matching function for call to 'cat::Delegate2<unsigned char, short unsigned int, cat::ImageReader& __restrict__>::FromMember(cat::MonoReader*)'
     return ReadDelegate::FromMember<MonoReader, &MonoReader::read_tile_safe>(this);
                                                                                  ^
In file included from encoder/Log.hpp:32:0,
                 from encoder/ImageWriter.hpp:35,
                 from encoder/SmallPaletteWriter.hpp:35,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/Delegates.hpp:389:30: note: candidate: template<class T, unsigned char (T::* F)(short unsigned int, cat::ImageReader& __restrict__)> static cat::Delegate2<ret_type, arg1_type, arg2_type>::this_type cat::Delegate2<ret_type, arg1_type, arg2_type>::FromMember(T*) [with T = T; ret_type (T::* F)(arg1_type, arg2_type) = F; ret_type = unsigned char; arg1_type = short unsigned int; arg2_type = cat::ImageReader& __restrict__]
  static CAT_INLINE this_type FromMember(T *object)
                              ^
encoder/../decoder/Delegates.hpp:389:30: note:   template argument deduction/substitution failed:
In file included from encoder/MonoWriter.hpp:33:0,
                 from encoder/SmallPaletteWriter.hpp:38,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/MonoReader.hpp:192:82: error: could not convert template argument '&cat::MonoReader::read_tile_safe' to 'unsigned char (cat::MonoReader::*)(short unsigned int, cat::ImageReader& __restrict__)'
     return ReadDelegate::FromMember<MonoReader, &MonoReader::read_tile_safe>(this);
                                                                                  ^
encoder/../decoder/MonoReader.hpp:194:84: error: no matching function for call to 'cat::Delegate2<unsigned char, short unsigned int, cat::ImageReader& __restrict__>::FromMember(cat::MonoReader*)'
     return ReadDelegate::FromMember<MonoReader, &MonoReader::read_tile_unsafe>(this);
                                                                                    ^
In file included from encoder/Log.hpp:32:0,
                 from encoder/ImageWriter.hpp:35,
                 from encoder/SmallPaletteWriter.hpp:35,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/Delegates.hpp:389:30: note: candidate: template<class T, unsigned char (T::* F)(short unsigned int, cat::ImageReader& __restrict__)> static cat::Delegate2<ret_type, arg1_type, arg2_type>::this_type cat::Delegate2<ret_type, arg1_type, arg2_type>::FromMember(T*) [with T = T; ret_type (T::* F)(arg1_type, arg2_type) = F; ret_type = unsigned char; arg1_type = short unsigned int; arg2_type = cat::ImageReader& __restrict__]
  static CAT_INLINE this_type FromMember(T *object)
                              ^
encoder/../decoder/Delegates.hpp:389:30: note:   template argument deduction/substitution failed:
In file included from encoder/MonoWriter.hpp:33:0,
                 from encoder/SmallPaletteWriter.hpp:38,
                 from encoder/SmallPaletteWriter.cpp:29:
encoder/../decoder/MonoReader.hpp:194:84: error: could not convert template argument '&cat::MonoReader::read_tile_unsafe' to 'unsigned char (cat::MonoReader::*)(short unsigned int, cat::ImageReader& __restrict__)'
     return ReadDelegate::FromMember<MonoReader, &MonoReader::read_tile_unsafe>(this);
                                                                                    ^
Makefile:201: recipe for target 'SmallPaletteWriter.o' failed
make: *** [SmallPaletteWriter.o] Error 1

$ g++ --version
g++ (Debian 5.2.1-22) 5.2.1 20151010

$ uname -a
Linux localhost 3.10.18 #1 SMP Thu Oct 15 04:39:34 PDT 2015 armv7l GNU/Linux

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions