pmem / pmem-redis

A version of Redis that uses persistent memory
BSD 3-Clause "New" or "Revised" License
113 stars 47 forks source link

Compile Fail In Fedora 31 #15

Closed jrgruher closed 4 years ago

jrgruher commented 4 years ago

Hi, trying to see if I can run this one Fedora 31. I noticed a similar issue reported to mine, but I have tried the fixes from that issue, and I still get this failure.

After installing and updating Fedora 31, I used these steps to try and install and build:

git clone https://github.com/pmem/pmem-redis.git
cd pmem-redis/
git submodule init
git submodule update
Remove -Werror from deps/pmdk/src/examples/Makefile.inc
make clean
make distclean
make USE_NVM=yes

I notice 'make distclean' doesn't seem to run quite right, in a way similar to one of the errors in the final compile:

[root@jrgruher-nc1-f31 pmem-redis]# make distclean
cd src && make distclean
make[1]: Entering directory '/root/pmem-redis/src'
rm -rf redis-server redis-sentinel redis-cli redis-benchmark redis-benchmark-seq redis-check-rdb redis-check-aof *.o *.gcda *.gcno *.gcov redis.info lcov-html Makefile.dep dict-benchmark
(cd ../deps && make distclean)
make[2]: Entering directory '/root/pmem-redis/deps'
(cd hiredis && make clean) > /dev/null || true
(cd linenoise && make clean) > /dev/null || true
(cd lua && make clean) > /dev/null || true
(cd memkind/jemalloc/obj && make distclean) > /dev/null || true
/bin/sh: line 0: cd: memkind/jemalloc/obj: No such file or directory
(cd memkind && make distclean) > /dev/null || true
make[3]: *** No rule to make target 'distclean'.  Stop.
(cd jemalloc && make clean) > /dev/null || true
make[3]: *** No rule to make target 'clean'.  Stop.
(cd pmdk && make clobber) > /dev/null || true
(cd jemallocat && make clean) > /dev/null || true
(cd aofguard && make clean) > /dev/null || true
(rm -f .make-*)
make[2]: Leaving directory '/root/pmem-redis/deps'
(rm -f .make-*)
make[1]: Leaving directory '/root/pmem-redis/src'

This is the error I get after trying 'make USE_NVM=yes':

cc: error: ../deps/memkind/jemalloc/obj/lib/libjemalloc.a: No such file or directory
cc: error: ../deps/memkind/.libs/libmemkind.a: No such file or directory
cc: error: ../deps/jemallocat/lib/libjemallocat.a: No such file or directory
cc: error: ../deps/aofguard/lib/libaofguard.a: No such file or directory
make[1]: *** [Makefile:244: redis-server] Error 1
make[1]: Leaving directory '/root/pmem-redis/src'
make: *** [Makefile:8: all] Error 2

I will attach a full log of the make attempt.

jrgruher commented 4 years ago

redis-pmem-build-fail-fedora31.txt

jrgruher commented 4 years ago

By the way I believe I do have all necessary packages installed:

[root@jrgruher-nc1-f31 pmem-redis]# dnf install vim make gcc gcc-c++ git cmake kernel-devel kernel-headers tcl autoconf automake pkg-config pcre-devel zlib-devel libmemcached-devel libevent libevent-devel numactl numactl-devel libtool ndctl ndctl-libs ndctl-devel daxctl daxctl-libs daxctl-devel ipmctl libipmctl libipmctl-devel
Last metadata expiration check: 0:31:38 ago on Sat 18 Apr 2020 02:45:10 PM PDT.
Package vim-enhanced-2:8.2.525-1.fc31.x86_64 is already installed.
Package make-1:4.2.1-15.fc31.x86_64 is already installed.
Package gcc-9.3.1-2.fc31.x86_64 is already installed.
Package gcc-c++-9.3.1-2.fc31.x86_64 is already installed.
Package git-2.25.3-1.fc31.x86_64 is already installed.
Package cmake-3.17.1-1.fc31.x86_64 is already installed.
Package kernel-devel-5.3.11-100.fc29.x86_64 is already installed.
Package kernel-devel-5.4.15-200.fc31.x86_64 is already installed.
Package kernel-devel-5.5.17-200.fc31.x86_64 is already installed.
Package kernel-headers-5.5.17-200.fc31.x86_64 is already installed.
Package tcl-1:8.6.8-2.fc31.x86_64 is already installed.
Package autoconf-2.69-31.fc31.noarch is already installed.
Package automake-1.16.1-13.fc31.noarch is already installed.
Package pkgconf-pkg-config-1.6.3-2.fc31.x86_64 is already installed.
Package pcre-devel-8.44-1.fc31.x86_64 is already installed.
Package zlib-devel-1.2.11-20.fc31.x86_64 is already installed.
Package libmemcached-devel-1.0.18-16.fc31.x86_64 is already installed.
Package libevent-2.1.8-7.fc31.x86_64 is already installed.
Package libevent-devel-2.1.8-7.fc31.x86_64 is already installed.
Package numactl-2.0.12-3.fc31.x86_64 is already installed.
Package numactl-devel-2.0.12-3.fc31.x86_64 is already installed.
Package libtool-2.4.6-31.fc31.x86_64 is already installed.
Package ndctl-68-1.fc31.x86_64 is already installed.
Package ndctl-libs-68-1.fc31.x86_64 is already installed.
Package ndctl-devel-68-1.fc31.x86_64 is already installed.
Package daxctl-68-1.fc31.x86_64 is already installed.
Package daxctl-libs-68-1.fc31.x86_64 is already installed.
Package daxctl-devel-68-1.fc31.x86_64 is already installed.
Package ipmctl-01.00.00.3474-1.fc31.x86_64 is already installed.
Package libipmctl-01.00.00.3474-1.fc31.x86_64 is already installed.
Package libipmctl-devel-01.00.00.3474-1.fc31.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
jrgruher commented 4 years ago

Trying

make USE_NVM=yes EXTRA_CFLAGS="-Wno-error"

Succeeds however!

make USE_NVM=yes AEP_COW=yes SUPPORT_PBA=yes USE_AOFGUARD=yes EXTRA_CFLAGS="-Wno-error"

Also succeeds!

Then ran:

make install USE_NVM=yes AEP_COW=yes SUPPORT_PBA=yes USE_AOFGUARD=yes EXTRA_CFLAGS="-Wno-error"
sed -i s/pointer-based-aof yes/#pointer-based-aof yes/g tests/assets/default.conf
make test USE_NVM=yes AEP_COW=yes SUPPORT_PBA=yes USE_AOFGUARD=yes EXTRA_CFLAGS="-Wno-error

Server starts manually as well:

[root@jrgruher-nc1-f31 pmem-redis]# redis-server --nvm-maxcapacity 1000 --nvm-dir /mnt/pmem0
380188:C 18 Apr 16:04:22.663 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
380188:C 18 Apr 16:04:22.663 # Redis version=4.0.0, bits=64, commit=cc54b551, modified=1, pid=380188, just started
380188:C 18 Apr 16:04:22.663 # Configuration loaded
380188:M 18 Apr 16:04:22.665 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 4.0.0 (cc54b551/1) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 380188
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

380188:M 18 Apr 16:04:22.808 # Server initialized
380188:M 18 Apr 16:04:22.808 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
380188:M 18 Apr 16:04:22.808 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
380188:M 18 Apr 16:04:22.808 * DB loaded from disk: 0.000 seconds
380188:M 18 Apr 16:04:22.808 * Ready to accept connections