chnaghong1990 / redis

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

makefile fails because of libtool on deps/hiredis/Makefile #547

Closed GoogleCodeExporter closed 8 years ago

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

2.2.6, Mac OS X Snow Leopard

What is the problem you are experiencing?

makefile fails because libtool says it doesn't support '-static' options.

What steps will reproduce the problem?

download redis-2.2.6, unarchive it, run make

Do you have an INFO output? Please past it here.

omississ-MacBook-Pro:redis-2.2.6 omissis$ make
cd src && make all
cd ../deps/hiredis && make static ARCH=""
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wwrite-strings   -arch i386 -arch 
x86_64 -g -ggdb  net.c
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wwrite-strings   -arch i386 -arch 
x86_64 -g -ggdb  hiredis.c
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wwrite-strings   -arch i386 -arch 
x86_64 -g -ggdb  sds.c
cc -c -std=c99 -pedantic -O3 -fPIC -Wall -W -Wwrite-strings   -arch i386 -arch 
x86_64 -g -ggdb  async.c
libtool -static -o libhiredis.a - net.o hiredis.o sds.o async.o
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make[2]: *** [libhiredis.a] Error 1
make[1]: *** [dependencies] Error 2
make: *** [all] 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!

nothing to report here.

Please provide any additional information below.

I tried to investigate a bit and I found out that actually libtool seems to 
ignore '-dynamic' and '-static' options, even if they're clearly mentioned and 
documented in the man page, therefore I'd say it looks like a libtool's own 
problem. Using ld should do, even though "standard" linux section is compiling 
just fine, therefore removing lines 18-27 solved the problem. Makefile I'm 
talking about is deps/hiredis/Makefile.

Original issue reported on code.google.com by claudi0.beatric3 on 12 May 2011 at 6:04

GoogleCodeExporter commented 8 years ago
This is probably caused by a non-default libtool. Maybe the build process for 
the static lib should be changed to use "ranlib" or something like that...

Original comment by pcnoordh...@gmail.com on 14 Jun 2011 at 7:41

GoogleCodeExporter commented 8 years ago
Quick update, I experienced the exact same issue and it was resolved by doing:

removing lines 18-27 solved the problem. Makefile I'm talking about is 
deps/hiredis/Makefile.

A note, you must also comment out the line 36 (endif)

Original comment by jason.ru...@gmail.com on 8 Dec 2011 at 5:31