chnaghong1990 / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[HELP] How to "make 32bit" without errors in Freebsd 8.1 64 bit #628

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of Redis you are using, in what kind of Operating System?
redis : 2.4

What is the problem you are experiencing?
i cannot "make 32bit"

What steps will reproduce the problem?
on FreeBSD 8.1
clone & checkout 2.4
gmake 32bit USE_JEMALLOC=yes

Do you have an INFO output? Please past it here.
gmake 32bit USE_JEMALLOC=yes
cd src && gmake 32bit
gmake[1]: Entering directory `/usr/home/7k7ktest/redis/src'

WARNING: if it fails under Linux you probably need to install libc6-dev-i386

gmake ARCH="-m32" JEMALLOC_CFLAGS='CFLAGS="-std=gnu99 -Wall -pipe -g3 
-fvisibility=hidden -O3 -funroll-loops -m32"'
gmake[2]: Entering directory `/usr/home/7k7ktest/redis/src'
MAKE hiredis
gmake[3]: Entering directory `/usr/home/7k7ktest/redis/deps/hiredis'
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings 
-m32   -g -ggdb  net.c
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings 
-m32   -g -ggdb  hiredis.c
hiredis.c: In function 'redisvFormatCommand':
hiredis.c:724: warning: format '%zu' expects type 'size_t', but argument 3 has 
type 'long unsigned int'
hiredis.c: In function 'redisFormatCommandArgv':
hiredis.c:783: warning: format '%zu' expects type 'size_t', but argument 3 has 
type 'long unsigned int'
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings 
-m32   -g -ggdb  sds.c
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings 
-m32   -g -ggdb  async.c
In file included from async.c:37:
dict.c: In function '_dictNextPower':
dict.c:309: warning: comparison is always false due to limited range of data 
type
dict.c:309: warning: large integer implicitly truncated to unsigned type
async.c: In function '__redisAsyncCommand':
async.c:462: warning: 'cstr' may be used uninitialized in this function
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
gmake[3]: Leaving directory `/usr/home/7k7ktest/redis/deps/hiredis'
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

If it is a crash, can you please paste the stack trace that you can find in
the log file or on standard output? This is really useful for us!

Please provide any additional information below.

Original issue reported on code.google.com by salim...@gmail.com on 8 Aug 2011 at 8:13

GoogleCodeExporter commented 8 years ago
It looks like you are missing 32 bit compatibility libraries here. A quick 
search learns that you should try installing this: 
ftp://ftp-archive.freebsd.org:21/pub/FreeBSD/releases/amd64/8.1-RELEASE/lib32/ 

Original comment by pcnoordh...@gmail.com on 8 Aug 2011 at 10:08

GoogleCodeExporter commented 8 years ago
yep i've installed lib32 but still i can't "gmake 32bit USE_JEMALLOC=yes"

Original comment by salim...@gmail.com on 9 Aug 2011 at 9:28

GoogleCodeExporter commented 8 years ago
Issue 630 has been merged into this issue.

Original comment by pcnoordh...@gmail.com on 11 Aug 2011 at 11:53

GoogleCodeExporter commented 8 years ago
You need to point the compiler to the 32 bit libraries for this to work out. 
You can do so by prefixing the gmake command with:

CC="cc -B/usr/lib32"

Compiling Redis will be successful, but it is very buggy. Tests fail and Redis 
segfaults in numerous situations. I took me some time to get it to build in the 
first place, and I'm not continuing investigation because I don't have a clue 
how deep the rabbit hole goes. I'd advise just to stick with 64-bit Redis on 
amd64 FreeBSD, or 32-bit Redis on i386.

Another comment: the standalone jemalloc library that Redis uses doesn't build 
on FreeBSD. You can use the default allocator in both FreeBSD and NetBSD, since 
they use an earlier version of jemalloc by default.

Cheers,
Pieter

Original comment by pcnoordh...@gmail.com on 11 Aug 2011 at 12:01