WebFaction
Community site: login faq

I'm trying to install redis http://redis.io/download.

Standing in my home directory I did:

$ wget http://redis.googlecode.com/files/redis-2.6.7.tar.gz
$ tar xzf redis-2.6.7.tar.gz
$ cd redis-2.6.7
$ make

The last command, make, fails:

zmalloc.o: In function `zmalloc_used_memory':
/home/me/redis-2.6.7/src/zmalloc.c:223: undefined reference to `__sync_add_and_fetch_4'

asked 09 Jan '13, 03:39

tpip
4111021
accept rate: 0%

edited 09 Jan '13, 03:39


A lot of customers are running a redis instance on our servers.

That said, there's a known bug on CentOS 5, 32-bit machines. According to this bug, you can either export the CFLAGS variable using the -march=i686 value or edit src/Makefile and append that on line 214, next to the -m32 part, and run make 32bit. If you've already tried make once, please run make clean to clean up the failed installation.

You should then able to use the binary at src/redis-server.

permanent link

answered 09 Jan '13, 05:09

iliasr ♦♦
1.9k14
accept rate: 36%

1

Awesome, that worked. Changed line 214 to

$(MAKE) CFLAGS="-m32 -march=i686" LDFLAGS="-m32 -march=i686"

(25 Feb '13, 05:12) tpip
1

Thank you iliasr for pointing out that 32-bit bug. I mentioned your solution and also other things related to installing Redis on Webfaction in a tutorial.

(04 Sep '13, 15:08) Akseli Palén

Thanks for sharing!

(04 Sep '13, 16:08) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×12

question asked: 09 Jan '13, 03:39

question was seen: 4,502 times

last updated: 04 Sep '13, 16:08

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM