rocksdb v3.4 compilation failure, ::abs has not been declared

30 views Asked by At

Try to compile rocksdb v3.4 with follow instructions on centOS7:

git checkout v3.4
make

Error:

...
g++ -g -Wall -Werror -Wsign-compare -I. -I./include -std=c++11  -DROCKSDB_PLATFORM_POSIX  -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_ATOMIC_PRESENT -DROCKSDB_FALLOCATE_PRESENT -DZLIB   -DHAVE_JEMALLOC -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -Woverloaded-virtual -c util/build_version.cc -o util/build_version.o 
g++ -g -Wall -Werror -Wsign-compare -I. -I./include -std=c++11  -DROCKSDB_PLATFORM_POSIX  -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_ATOMIC_PRESENT -DROCKSDB_FALLOCATE_PRESENT -DZLIB   -DHAVE_JEMALLOC -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -Woverloaded-virtual -c port/stack_trace.cc -o port/stack_trace.o 
In file included from /opt/rh/devtoolset-9/root/usr/include/c++/9/cstdlib:77,
                 from /opt/rh/devtoolset-9/root/usr/include/c++/9/stdlib.h:36,
                 from port/stack_trace.cc:23:
/opt/rh/devtoolset-9/root/usr/include/c++/9/bits/std_abs.h:52:11: error: '::abs' has not been declared
   52 |   using ::abs;
      |           ^~~
In file included from /opt/rh/devtoolset-9/root/usr/include/c++/9/stdlib.h:36,
                 from port/stack_trace.cc:23:

My c++ version:

g++ --version g++ (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

0

There are 0 answers