【问题标题】:how to "gmake 32bit USE_JEMALLOC=yes" for redis work on FreeBSD 8.1 64 bit如何“使 32 位 USE JEMALLOC=yes”在 FreeBSD 8.1 64 位上运行 redis
【发布时间】:2011-08-09 10:52:46
【问题描述】:

我无法在 FreeBSD 64 位上编译 2.4 redis 32 位。我已经完成了:

cd /usr/lib32
ftp ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/8.1-RELEASE/lib32/
prompt
mget *.*
quit
sh install.sh
csup -h cvsup.freebsd.org /usr/share/examples/cvsup/standard-supfile
cd /usr/src; make build32 install32; ldconfig -v -m -R /usr/lib32

但是当尝试编译redis时我得到:

#gmake 32bit USE_JEMALLOC=yes
.....

MAKE linenoise
gmake[3]: Entering directory `/usr/home/7k7ktest/redis/deps/linenoise'
cc -m32 -c -Wall -W -Os -g linenoise.c
cc -m32 -c -Wall -W -Os -g example.c
cc -m32 -Wall -W -Os -g -o linenoise_example linenoise.o example.o
/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
gmake[3]: *** [linenoise_example] Error 1
gmake[3]: Leaving directory `/usr/home/7k7ktest/redis/deps/linenoise'
gmake[2]: *** [dependencies] Error 2
gmake[2]: Leaving directory `/usr/home/7k7ktest/redis/src'
gmake[1]: *** [32bit] Error 2
gmake[1]: Leaving directory `/usr/home/7k7ktest/redis/src'
gmake: *** [32bit] Error 2

【问题讨论】:

    标签: gcc 64-bit redis freebsd gnu-make


    【解决方案1】:

    您需要将编译器指向 32 位库才能解决此问题。您可以通过在 gmake 命令前加上:

    CC="cc -B/usr/lib32"

    编译Redis会成功,但是bug非常多。在许多情况下测试失败和 Redis 段错误。我建议在 amd64 FreeBSD 上坚持使用 64 位 Redis,或者在 i386 上坚持使用 32 位 Redis。

    另一条评论:Redis 使用的独立 jemalloc 库不是基于 FreeBSD 构建的。您可以在 FreeBSD 和 NetBSD 中使用默认分配器,因为它们默认使用早期版本的 jemalloc。

    【讨论】:

      猜你喜欢
      • 2012-11-03
      • 2012-03-12
      • 2011-05-13
      • 2019-12-23
      • 2010-09-16
      • 2014-07-02
      • 2017-06-29
      • 1970-01-01
      • 2014-12-16
      相关资源
      最近更新 更多