Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在编译redis的时候出现jemalloc相关的问题 #17

Open
kelify opened this issue Aug 9, 2016 · 1 comment
Open

在编译redis的时候出现jemalloc相关的问题 #17

kelify opened this issue Aug 9, 2016 · 1 comment

Comments

@kelify
Copy link

kelify commented Aug 9, 2016

单独编译jemalloc位置:
[root@localhost jemalloc]# pwd
/root/bdrp/redis/redis-2.6.16/deps/jemalloc
[root@localhost jemalloc]#
./configure
.....
checking for _Bool... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/html.xsl
config.status: creating doc/manpages.xsl
config.status: creating doc/jemalloc.xml
config.status: creating include/jemalloc/jemalloc.h
config.status: creating include/jemalloc/internal/jemalloc_internal.h
config.status: error: cannot find input file: test/jemalloc_test.h.in

直接编译:
[root@localhost redis-2.6.16]# make
cd src && make all
make[1]: Entering directory /root/bdrp/redis/redis-2.6.16/src' CC adlist.o In file included from zmalloc.h:50, from adlist.c:34: ../deps/jemalloc/include/jemalloc/jemalloc.h:17:27: error: jemalloc_defs.h: No such file or directory In file included from zmalloc.h:50, from adlist.c:34: ../deps/jemalloc/include/jemalloc/jemalloc.h:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘const’ ../deps/jemalloc/include/jemalloc/jemalloc.h:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ ../deps/jemalloc/include/jemalloc/jemalloc.h:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:52: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’ ../deps/jemalloc/include/jemalloc/jemalloc.h:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ ../deps/jemalloc/include/jemalloc/jemalloc.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ ../deps/jemalloc/include/jemalloc/jemalloc.h:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ ../deps/jemalloc/include/jemalloc/jemalloc.h:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory/root/bdrp/redis/redis-2.6.16/src'
make: *** [all] Error 2
[root@localhost redis-2.6.16]#
请问应该如何解决该问题呢?

@kelify kelify changed the title 在编译redis的时候出现jemalloc先关的问题 在编译redis的时候出现jemalloc相关的问题 Aug 9, 2016
@luckywarrior
Copy link

试试make加上MALLOC=libc,这应该是合并了2.8版本的REDIS引起的

vi build.sh

cd redis-2.6.16
make clean
make MALLOC=libc
cp src/redis-server ../output/redis
cd -

cd nutcracker-0.2.4
./configure --enable-debug=full
make clean
make
cp src/nutcracker ../output/nutcracker
cd -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants