unable to compile redis unstable

4,501 views
Skip to first unread message

Raghava Mutharaju

unread,
Mar 29, 2012, 12:03:40 AM3/29/12
to redi...@googlegroups.com
Hello all,

When I try to compile the unstable version of redis on a linux machine, I get the following error

-----------------------------------
rm -rf redis-server redis-benchmark redis-cli redis-check-dump redis-check-aof *.o *.gcda *.gcno *.gcov
(echo jemalloc > .make-malloc)
    CC ae.o
In file included from ae.c:41:
zmalloc.h:51:31: error: jemalloc/jemalloc.h: No such file or directory
zmalloc.h:56:2: error: #error "Newer version of jemalloc required"
-----------------------------------

I tried by compiling jemalloc in the deps/ folder. Since I don't have root permissions, I would have to install it in a user folder. How do I specify this folder in redis make? I tried with "not specifying" this and I got the following error

-----------------------------------
../deps/hiredis/libhiredis.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make[1]: *** [redis-benchmark] Error 1
-----------------------------------

I got the same error if I run with "make MALLOC=libc" option.

How can I correct this? Please let me know.

Thank you.

Regards,
Raghava.

Raghava Mutharaju

unread,
Mar 29, 2012, 9:34:09 AM3/29/12
to redi...@googlegroups.com
I am able to compile other versions of redis on this machine though. Also, I am able to compile redis unstable on my mac laptop.

Regards,
Raghava.

Pieter Noordhuis

unread,
Mar 29, 2012, 10:55:41 AM3/29/12
to redi...@googlegroups.com
Which exact sha1 of unstable do you use? Which version of GCC and
make? Did you try running `make distclean` before trying to compile
(this should remove all compilation artifacts, including those of
dependencies)?

Cheers,
Pieter

On Thu, Mar 29, 2012 at 6:34 AM, Raghava Mutharaju

> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.

Raghava Mutharaju

unread,
Mar 29, 2012, 11:12:01 AM3/29/12
to redi...@googlegroups.com
geez!!! running 'make distclean' before make did the trick. I thought I tried that before but apparently I didn't.

Thank you for the response and for the suggestions. 

Regards,
Raghava.

Nathan Fritz

unread,
Mar 29, 2012, 1:53:46 PM3/29/12
to redi...@googlegroups.com
I hit the same thing.

On Thu, Mar 29, 2012 at 8:12 AM, Raghava Mutharaju

Pieter Noordhuis

unread,
Mar 29, 2012, 2:35:03 PM3/29/12
to redi...@googlegroups.com
FYI, I just tried to compile unstable from a vanilla repo on both OSX
and Linux and both worked.

Did you pull in latest changes into an older repo?

Cheers,
Pieter

Salvatore Sanfilippo

unread,
Mar 30, 2012, 9:44:57 AM3/30/12
to redi...@googlegroups.com
Hey, maybe users having system-wide installations of jemalloc (that
are not recent enough) are in trouble because of the include files
precedence?

Salvatore

--
Salvatore 'antirez' Sanfilippo
open source developer - VMware

http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele

Premysl Hruby

unread,
Mar 30, 2012, 9:47:11 AM3/30/12
to redi...@googlegroups.com
That shouldn't be a problem, because directories add via -I are searched
before the system ones

-Ph

Salvatore Sanfilippo

unread,
Mar 30, 2012, 9:53:00 AM3/30/12
to redi...@googlegroups.com
On Fri, Mar 30, 2012 at 3:47 PM, Premysl Hruby <dfe...@gmail.com> wrote:

> That shouldn't be a problem, because directories add via -I are searched
> before the system ones

Thanks for the information. The output somewhat suggests this or
alternatively a problem with the cloned repository.

Cheers,
Salvatore

Salvatore Sanfilippo

unread,
Aug 27, 2012, 1:06:31 PM8/27/12
to redi...@googlegroups.com
Hello,

apparently we have a problem that if there is a system-wide version of
jemalloc installed, Redis uses that instead to force itself to use the
local version. However this only happens depending on the development
stack configuration AFAIK. For some reason CentOS may be configured to
start the search at system wide level instead of the local one?

I'm not very expert about this stuff, I bet somebody into this list
knows better.

Salvatore

On Mon, Aug 27, 2012 at 5:25 PM, Leonid <leo...@liveperson.com> wrote:
> I'm trying to build Sentinel from the unstable branch, and get a similar
> error:
> In file included from adlist.c:34:
> zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory
> zmalloc.h:55:2: error: #error "Newer version of jemalloc required"
>
> I'm trying to build it on CentOs 6,
> GCC version: 4.4.6-4
> Make version: 1:3.81-20
>
> I've tried running "make distclean",it didn't help.
>
> Am I missing something here?
>
> Thanks,
> Leonid
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of the
> addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/redis-db/-/EtBR8mfRVCgJ.
>
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.



--
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org

Beauty is more important in computing than anywhere else in technology
because software is so complicated. Beauty is the ultimate defence
against complexity.
— David Gelernter

Leonid

unread,
Aug 30, 2012, 10:17:32 AM8/30/12
to redi...@googlegroups.com
I received some help with this.
We've installed Git with yum install, downloaded Redis sources with it, compiled and everything worked right away.

I originally tried to download the sources as a zip file, unzip and compile, and just couldn't get it to work for some reason.

I have little if any Linux experience, and I've never compiled anything on Linux, is there a standard/easy way to download sources and compile them?

Thanks
Reply all
Reply to author
Forward
0 new messages