lzip-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lzip-bug] Building lzip 1.20 with DJGPP 2.05


From: Robert Riebisch
Subject: [Lzip-bug] Building lzip 1.20 with DJGPP 2.05
Date: Sun, 04 Nov 2018 21:33:24 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0

Hi,

I'm trying to build lzip 1.20 with GCC 8.20 (or 4.85) for DOS.
GCC spits an error on me. See error.log attached.

I can fix the error by changing encoder_base.cc to:
***
    for( int i = 0; i < num_prev_positions; ++i )
      prev_positions[i] -= std::min<int32_t>( prev_positions[i], offset );
    for( int i = 0; i < pos_array_size; ++i )
      pos_array[i] -= std::min<int32_t>( pos_array[i], offset );
***
or
***
    for( int i = 0; i < num_prev_positions; ++i )
      prev_positions[i] -= std::min<int>( prev_positions[i], offset );
    for( int i = 0; i < pos_array_size; ++i )
      pos_array[i] -= std::min<int>( pos_array[i], offset );
***
but I'm not sure, which is the correct one. If any... I'm no C++ guy.

Last lzip to build with no such error is 1.15.

Would be nice to get some help from you. :-)

Cheers,
Robert
-- 
              +++ BTTR Software +++
     Home page:  http://www.bttr-software.de/
DOS ain't dead:  http://www.bttr-software.de/forum/
gpp  -O2 -c -o encoder_base.o encoder_base.cc
encoder_base.cc: In member function 'void Matchfinder_base::normalize_pos()':
encoder_base.cc:63:64: error: no matching function for call to 'min(int32_t&, 
const int&)'
       prev_positions[i] -= std::min( prev_positions[i], offset );
                                                                ^
encoder_base.cc:63:64: note: candidates are:
In file included from c:/djgpp/include/cxx/4.85/algorithm:61:0,
                 from encoder_base.cc:20:
c:/djgpp/include/cxx/4.85/bits/stlalgobase.h:193:5: note: template<class _Tp> 
const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
c:/djgpp/include/cxx/4.85/bits/stlalgobase.h:193:5: note:   template argument 
deduction/substitution failed:
encoder_base.cc:63:64: note:   deduced conflicting types for parameter 'const 
_Tp' ('long int' and 'int')
       prev_positions[i] -= std::min( prev_positions[i], offset );
                                                                ^
In file included from c:/djgpp/include/cxx/4.85/algorithm:61:0,
                 from encoder_base.cc:20:
c:/djgpp/include/cxx/4.85/bits/stlalgobase.h:239:5: note: template<class _Tp, 
class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
c:/djgpp/include/cxx/4.85/bits/stlalgobase.h:239:5: note:   template argument 
deduction/substitution failed:
encoder_base.cc:63:64: note:   deduced conflicting types for parameter 'const 
_Tp' ('long int' and 'int')
       prev_positions[i] -= std::min( prev_positions[i], offset );
                                                                ^
encoder_base.cc:65:54: error: no matching function for call to 'min(int32_t&, 
const int&)'
       pos_array[i] -= std::min( pos_array[i], offset );
                                                      ^
encoder_base.cc:65:54: note: candidates are:
In file included from c:/djgpp/include/cxx/4.85/algorithm:61:0,
                 from encoder_base.cc:20:
c:/djgpp/include/cxx/4.85/bits/stlalgobase.h:193:5: note: template<class _Tp> 
const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^
c:/djgpp/include/cxx/4.85/bits/stlalgobase.h:193:5: note:   template argument 
deduction/substitution failed:
encoder_base.cc:65:54: note:   deduced conflicting types for parameter 'const 
_Tp' ('long int' and 'int')
       pos_array[i] -= std::min( pos_array[i], offset );
                                                      ^
In file included from c:/djgpp/include/cxx/4.85/algorithm:61:0,
                 from encoder_base.cc:20:
c:/djgpp/include/cxx/4.85/bits/stlalgobase.h:239:5: note: template<class _Tp, 
class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
c:/djgpp/include/cxx/4.85/bits/stlalgobase.h:239:5: note:   template argument 
deduction/substitution failed:
encoder_base.cc:65:54: note:   deduced conflicting types for parameter 'const 
_Tp' ('long int' and 'int')
       pos_array[i] -= std::min( pos_array[i], offset );
                                                      ^
make.exe: *** [Makefile:50: encoder_base.o] Error 1

reply via email to

[Prev in Thread] Current Thread [Next in Thread]