[root@localhost snappy-1.1.1]# sudo make install
source=‘snappy.cc’ object=‘snappy.lo’ libtool=yes
DEPDIR=.deps depmode=none /bin/sh ./depcomp
/bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -c -o snappy.lo snappy.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I. -c snappy.cc -o .libs/snappy.o
In file included from snappy-stubs-internal.h:35:0,
from snappy-internal.h:34,
from snappy.cc:30:
config.h:125:17: error: multiple types in one declaration
#define ssize_t int
^
config.h:125:17: error: declaration does not declare anything [-fpermissive]
snappy.cc: In function ‘unsigned int snappy::Compress(snappy::Source*, snappy::Sink*)’:
snappy.cc:874:45: error: new declaration ‘unsigned int snappy::Compress(snappy::Source*, snappy::Sink*)’
size_t Compress(Source* reader, Sink* writer) {
^
In file included from snappy.cc:29:0:
snappy.h:57:10: error: ambiguates old declaration ‘size_t snappy::Compress(snappy::Source*, snappy::Sink*)’
size_t Compress(Source* source, Sink* sink);
^
snappy.cc:891:49: error: no matching function for call to ‘min(unsigned int&, const size_t&)’
const size_t num_to_read = min(N, kBlockSize);
^
snappy.cc:891:49: note: candidates are:
In file included from /usr/include/c++/4.8.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.8.2/string:40,
from snappy.h:43,
from snappy.cc:29:
/usr/include/c++/4.8.2/bits/stl_algobase.h:193:5: note: template const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8.2/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed:
snappy.cc:891:49: note: deduced conflicting types for parameter ‘const _Tp’ (‘unsigned int’ and ‘size_t {aka long unsigned int}’)
const size_t num_to_read = min(N, kBlockSize);
^
In file included from /usr/include/c++/4.8.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.8.2/string:40,
from snappy.h:43,
from snappy.cc:29:
/usr/include/c++/4.8.2/bits/stl_algobase.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)
^
/usr/include/c++/4.8.2/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed:
snappy.cc:891:49: note: deduced conflicting types for parameter 'const Tp’ (‘unsigned int’ and ‘size_t {aka long unsigned int}’)
const size_t num_to_read = min(N, kBlockSize);
^
snappy.cc: In member function ‘bool snappy::SnappyIOVecWriter::Append(const char*, unsigned int)’:
snappy.cc:1021:72: error: no matching function for call to ‘min(unsigned int&, long unsigned int)’
len, output_iov[curr_iov_index].iov_len - curr_iov_written);
^
snappy.cc:1021:72: note: candidates are:
In file included from /usr/include/c++/4.8.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.8.2/string:40,
from snappy.h:43,
from snappy.cc:29:
/usr/include/c++/4.8.2/bits/stl_algobase.h:193:5: note: template const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& b)
^
/usr/include/c++/4.8.2/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed:
snappy.cc:1021:72: note: deduced conflicting types for parameter 'const Tp’ (‘unsigned int’ and ‘long unsigned int’)
len, output_iov[curr_iov_index].iov_len - curr_iov_written);
^
In file included from /usr/include/c++/4.8.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.8.2/string:40,
from snappy.h:43,
from snappy.cc:29:
/usr/include/c++/4.8.2/bits/stl_algobase.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)
^
/usr/include/c++/4.8.2/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed:
snappy.cc:1021:72: note: deduced conflicting types for parameter 'const Tp’ (‘unsigned int’ and ‘long unsigned int’)
len, output_iov[curr_iov_index].iov_len - curr_iov_written);
^
snappy.cc: In member function ‘bool snappy::SnappyIOVecWriter::AppendFromSelf(unsigned int, unsigned int)’:
snappy.cc:1081:16: error: no matching function for call to ‘min(long unsigned int, unsigned int&)’
len);
^
snappy.cc:1081:16: note: candidates are:
In file included from /usr/include/c++/4.8.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.8.2/string:40,
from snappy.h:43,
from snappy.cc:29:
/usr/include/c++/4.8.2/bits/stl_algobase.h:193:5: note: template const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8.2/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed:
snappy.cc:1081:16: note: deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘unsigned int’)
len);
^
In file included from /usr/include/c++/4.8.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.8.2/string:40,
from snappy.h:43,
from snappy.cc:29:
/usr/include/c++/4.8.2/bits/stl_algobase.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)
^
/usr/include/c++/4.8.2/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed:
snappy.cc:1081:16: note: deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘unsigned int’)
len);
^
snappy.cc:1092:38: error: no matching function for call to ‘min(long unsigned int, unsigned int&)’
len);
^
snappy.cc:1092:38: note: candidates are:
In file included from /usr/include/c++/4.8.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.8.2/string:40,
from snappy.h:43,
from snappy.cc:29:
/usr/include/c++/4.8.2/bits/stl_algobase.h:193:5: note: template const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8.2/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed:
snappy.cc:1092:38: note: deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘unsigned int’)
len);
^
In file included from /usr/include/c++/4.8.2/bits/char_traits.h:39:0,
from /usr/include/c++/4.8.2/string:40,
from snappy.h:43,
from snappy.cc:29:
/usr/include/c++/4.8.2/bits/stl_algobase.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)
^
/usr/include/c++/4.8.2/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed:
snappy.cc:1092:38: note: deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘unsigned int’)
len);
^
make: *** [snappy.lo] 错误 1
里面还有很多Error,详情见我加粗的地方。
出现这个问题的时候,我怀疑是不是我的版本有错误
然后我出现把版本给弄了下。重新下载了个版本,重新编译,发现没有出错了。
但是我有点怀疑是不是我在执行 ./configure
的时候,我前面没有加上sudo,我没有编译它导致出现这么多错误,当然,我也不可能在重新把我弄好的删掉, 就为了检验一下这个错误。告辞。