basho / riak

Riak is a decentralized datastore from Basho Technologies.
http://docs.basho.com
Apache License 2.0
3.92k stars 534 forks source link

Build fails riak from develop branch on fedora 36 #1111

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hello! When I am compiling build a see the nex error message:

[grigoriy@fedora riak]$ make rel

==> Verifying dependencies...

===> Generated /home/grigoriy/riak/_build/default/lib/riak_pb/src/riak_pb_messages.erl

gmake[1]: вход в каталог «/home/grigoriy/riak/_build/default/lib/eleveldb/c_src/snappy-1.0.4»

gmake all-am

gmake[2]: вход в каталог «/home/grigoriy/riak/_build/default/lib/eleveldb/c_src/snappy-1.0.4»

source='snappy-test.cc' object='snappy_unittest-snappy-test.o' libtool=no \

DEPDIR=.deps depmode=none /bin/sh ./depcomp \

g++ -DHAVE_CONFIG_H -I. -I /home/grigoriy/riak/_build/default/lib/eleveldb/c_src/system/include -c -o snappy_unittest-snappy-test.o test -f 'snappy-test.cc' || echo './'snappy-test.cc

snappy-test.cc:82:15: ошибка: агрегатный тип «snappy::rusage snappy::benchmark_start_cpu» неполон и не может быть определён

82 | struct rusage benchmark_start_cpu;

  |               ^~~~~~~~~~~~~~~~~~~

snappy-test.cc: В функции «void snappy::StartBenchmarkTiming()»:

snappy-test.cc:93:17: ошибка: нет декларации «RUSAGE_SELF» в этой области видимости

93 | if (getrusage(RUSAGE_SELF, &benchmark_start_cpu) == -1) {

  |                 ^~~~~~~~~~~

snappy-test.cc:93:7: ошибка: «getrusage» was not declared in this scope; did you mean «rusage»?

93 | if (getrusage(RUSAGE_SELF, &benchmark_start_cpu) == -1) {

  |       ^~~~~~~~~

  |       rusage

snappy-test.cc: В функции «void snappy::StopBenchmarkTiming()»:

snappy-test.cc:139:17: ошибка: агрегатный тип «snappy::rusage benchmark_stop_cpu» неполон и не может быть определён

139 | struct rusage benchmark_stop_cpu;

  |                 ^~~~~~~~~~~~~~~~~~

snappy-test.cc:140:17: ошибка: нет декларации «RUSAGE_SELF» в этой области видимости

140 | if (getrusage(RUSAGE_SELF, &benchmark_stop_cpu) == -1) {

  |                 ^~~~~~~~~~~

snappy-test.cc:140:7: ошибка: «getrusage» was not declared in this scope; did you mean «rusage»?

140 | if (getrusage(RUSAGE_SELF, &benchmark_stop_cpu) == -1) {

  |       ^~~~~~~~~

  |       rusage

gmake[2]: *** [Makefile:440: snappy_unittest-snappy-test.o] Ошибка 1

gmake[2]: выход из каталога «/home/grigoriy/riak/_build/default/lib/eleveldb/c_src/snappy-1.0.4»

gmake[1]: *** [Makefile:286: all] Ошибка 2

gmake[1]: выход из каталога «/home/grigoriy/riak/_build/default/lib/eleveldb/c_src/snappy-1.0.4»

===> Hook for compile failed!

make: *** [Makefile:29: compile] Ошибка 1

What I'am doing wrong?

Thank you.

martinsumner commented 2 years ago

I suspect there are issues with Snappy v 1.0.4 (which is very old) and Fedora 36.

There is a PR ready to upgrade snappy - https://github.com/basho/eleveldb/pull/266 - but it has not been reviewed yet.

The snappy version is stored here - https://github.com/basho/eleveldb/blob/develop/c_src/build_deps.sh#L13 - if you want to try bodging it to a higher version prior to the PR being accepted.

ghost commented 2 years ago

Thank you very much! I removed Fedora 36 and installed Arch Linux. And now It works!