Error compiling branch 2.6 in RHEL5 with 32bit mode #753

Closed
mezzatto opened this Issue Nov 5, 2012 · 2 comments

Projects

None yet

3 participants

@mezzatto
mezzatto commented Nov 5, 2012

make 32bit

zmalloc.o: In function zmalloc_used_memory': /tmp/redis-2.6/src/zmalloc.c:223: undefined reference to__sync_add_and_fetch_4'
collect2: ld returned 1 exit status
make[2]: *** [redis-server] Error 1
make[2]: Leaving directory /tmp/redis-2.6/src' make[1]: *** [32bit] Error 2 make[1]: Leaving directory/tmp/redis-2.6/src'
make: *** [32bit] Error 2

root@procdist-lar-01 redis-2.6]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)

[root@procdist-lar-01 redis-2.6]# uname -a
Linux procdist-lar-01.grupo-buscape.com.br 2.6.18-238.9.1.el5 #1 SMP Fri Mar 18 12:42:39 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@procdist-lar-01 redis-2.6]# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)

@NanXiao
Contributor
NanXiao commented Nov 6, 2012

Add CFLAGS= -march=i686 in Makefile, and you can refer this issue:#736.

@antirez
Owner
antirez commented Jul 17, 2013

Sorry I'm not going to fix this if I can't use -march=native, and this is not supported by the old version of gcc in RHEL5, so for now people that want to use such an old system will google, find the many issues about it, and compile with the different flags, or will read the README that now has instructions about this issue.

Hopefully RHEL5 eventually will not be an issue as it's damn old at this point. Closing, thanks for reporting.

@antirez antirez closed this Jul 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment