Building source code on Manjaro 18

Hi,

I’m trying to build YugaByteDB source code on Manjaro Linux 18.0.4. But I got the following error.

$ ./yb_build.sh release
(snip)
[cassandra-cpp-driver (uninstrumented)] make[2]: *** [CMakeFiles/cassandra.dir/build.make:89: CMakeFiles/cassandra.dir/src/auth.cpp.o] Error 1
[cassandra-cpp-driver (uninstrumented)] + ccache compiler -Dcassandra_EXPORTS -I/home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/include -I/home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src -I/home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-dr
iver-2.9.0-yb-4/src/ssl -I/home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/third_party/rapidjson -I/home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/third_party/sparsehash/src -I/usr/include -I/home/masahiko/.linuxbrew-yb-build/linuxbrew-20181203T161
736-xxxxxxxxxxxxxxxxxxxxxxxx/Cellar/openssl/1.0.2o_2/include -fno-omit-frame-pointer -fPIC -O2 -I/home/masahiko/work/yugabyte-db/thirdparty/installed/common/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -L/home/masahiko/work/yugabyte-db/thirdparty/installed/common/lib -Wl,-rpath,/tmp/making_sure_we_have_enough_room_
to_set_rpath_later__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________end_of_rpath -Wl,-rpath,/home/masahiko/wo
rk/yugabyte-db/thirdparty/installed/uninstrumented/lib -O3 -DNDEBUG -fPIC -fno-omit-frame-pointer -fPIC -O2 -I/home/masahiko/work/yugabyte-db/thirdparty/installed/common/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -L/home/masahiko/work/yugabyte-db/thirdparty/installed/common/lib -Wl,-rpath,/tmp/making_sure_we_have
enough_room_to_set_rpath_later__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________end_of_rpath -Wl,-rpath,/hom
e/masahiko/work/yugabyte-db/thirdparty/installed/uninstrumented/lib -std=c++11 -Wall -pedantic -Wextra -Wno-long-long -Wno-unused-parameter -Wno-variadic-macros -Wno-unused-local-typedefs -Werror -DCASS_BUILDING '-DLOG_FILE
=“src/abstract_data.cpp”’ -o CMakeFiles/cassandra.dir/src/abstract_data.cpp.o -c /home/masahi
ko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/abstract_data.cpp
[cassandra-cpp-driver (uninstrumented)] In file included from /usr/include/sys/param.h:26:0,
[cassandra-cpp-driver (uninstrumented)] from /usr/include/uv/unix.h:41,
[cassandra-cpp-driver (uninstrumented)] from /usr/include/uv.h:62,
[cassandra-cpp-driver (uninstrumented)] from /home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/ref_counted.hpp:25,
[cassandra-cpp-driver (uninstrumented)] from /home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/buffer.hpp:20,
[cassandra-cpp-driver (uninstrumented)] from /home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/abstract_data.hpp:20,
[cassandra-cpp-driver (uninstrumented)] from /home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/abstract_data.cpp:17:
[cassandra-cpp-driver (uninstrumented)] /usr/include/limits.h:124:3: error: #include_next is a GCC extension [-Werror]
[cassandra-cpp-driver (uninstrumented)] # include_next <limits.h>
[cassandra-cpp-driver (uninstrumented)] ^
[cassandra-cpp-driver (uninstrumented)] In file included from /usr/include/bits/fcntl.h:61:0,
[cassandra-cpp-driver (uninstrumented)] from /usr/include/fcntl.h:35,
[cassandra-cpp-driver (uninstrumented)] from /usr/include/uv/unix.h:27,
[cassandra-cpp-driver (uninstrumented)] from /usr/include/uv.h:62,
[cassandra-cpp-driver (uninstrumented)] from /home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/ref_counted.hpp:25,
[cassandra-cpp-driver (uninstrumented)] from /home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/buffer.hpp:20,
[cassandra-cpp-driver (uninstrumented)] from /home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/abstract_data.hpp:20,
[cassandra-cpp-driver (uninstrumented)] from /home/masahiko/work/yugabyte-db/thirdparty/src/cassandra-cpp-driver-2.9.0-yb-4/src/abstract_data.cpp:17:
[cassandra-cpp-driver (uninstrumented)] /usr/include/bits/fcntl-linux.h:355:27: error: ISO C++ forbids zero-size array ‘f_handle’ [-Werror=pedantic]
[cassandra-cpp-driver (uninstrumented)] unsigned char f_handle[0];
[cassandra-cpp-driver (uninstrumented)] ^
[cassandra-cpp-driver (uninstrumented)] cc1plus: all warnings being treated as errors
[cassandra-cpp-driver (uninstrumented)] make[2]: *** [CMakeFiles/cassandra.dir/build.make:63: CMakeFiles/cassandra.dir/src/abstract_data.cpp.o] Error 1

My environment is,

uname -r 4.19.49-1-MANJARO cat /etc/lsb-release
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=18.0.4
DISTRIB_CODENAME=Illyria
DISTRIB_DESCRIPTION=“Manjaro Linux”

Could please someone advise me how to solve it?

@oleg - can you take a look at the above?

@masahiko- would you mind opening a github issue for this please? [https://github.com/YugaByte/yugabyte-db/issues/new] Thanks a lot!

Thank you for your reply. I’ve opened a issue on github.

Hi @masahiko.

Unfortunately at the moment YB should be built by GCC-7 or GCC-5.5 only. GCC-8 is not supported yet.
You can try to install GCC-7 on your system and try to rebuild YB.

Regarding the failed ‘cassandra-cpp-driver’ I can suggest a workaround how to disable the component building (this library is not really used by YB core processes) - edit 3 files in the YB source tree. The details are here: https://github.com/YugaByte/yugabyte-db/issues/1720