2.6 RC5 make 32 bit target is failing on Ubuntu Precise 12.04 LTS.
Linux 3mik-node2 3.2.0-24-virtual #39-Ubuntu SMP Mon May 21 18:44:18 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
lsb-base/ lsb-base-logging.sh lsb-release
rjha@3mik-node2:~/nuke/redis-2.6.0-rc5$ cat /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"
../deps/jemalloc/lib/libjemalloc.a(jemalloc.o): In function prof_sample_threshold_update': jemalloc.c:(.text+0x2cdc): undefined reference tolog'
jemalloc.c:(.text+0x2d29): undefined reference to log' collect2: ld returned 1 exit status make: *** [redis-cli] Error 1 make: Leaving directory/home/rjha/nuke/redis-2.6.0-rc5/src'
make: *** [32bit] Error 2
make: Leaving directory `/home/rjha/nuke/redis-2.6.0-rc5/src'
prof_sample_threshold_update': jemalloc.c:(.text+0x2cdc): undefined reference to
log' collect2: ld returned 1 exit status make: *** [redis-cli] Error 1 make: Leaving directory
Please let me know if you need more data from me.
I've managed to get it builds, I'm not able to say who introduced the problem (ubuntu/debian or jemalloc),
but my workaround is simple:
add an "#include <math.h>" inside the file "deps/jemalloc/src/jemalloc.c"
NOTE: you need to do an explicit "make clean && make" inside "deps/jemalloc"
and then a "make clean && make 32bit" in the root redis dir.
I have the same problem and I have simply done following: cd deps/jemalloc, make, cd ../.. and make 32bit. It looks like all binaries are working.
@daliusd I will create a fresh 12.04 VM and try your trick.
@daliusd there is no makefile in deps/jemalloc directory. How did you do a make there? Here is the error from my terminal
make: *** No targets specified and no makefile found. Stop.
There is Makefile there. I have not done clean-up after ./configure and make in the root folder. Maybe that's the reason why I have Makefile in there. I'm using 2.6.0-rc5. I have not looked deeper into this. I have simply run "make tests" in addition and one test for a command I'm not using fails but overall everything works fine for me.
so to be clear - you are not sure if your method works with a clean install? whatever workaround we have should work with a clean install.
Not clean "install" but clean "build". I have tested it and it is not working with clean build (e.g. cd debs... ./configure, make, cd ../.., make 32bit). There must be some problem how jemalloc build is called from 32bit build.
I'm not sure why are you so picky for workaround. Workaround is temporary solution and there is no need to care about correctness of it. Fix meanwhile should be clean. Maybe my proposed workaround will give ideas where to look for problem. I'm not familiar with redis code therefore I can't propose fix.