arpit7275 / redis

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

Redis 2.2.12 fails to build with forced --as-needed #615

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is redis 2.2.12 on a 32-bit linux w/ gcc 4.4.5.

For background about forcing --as-needed, see: 
http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-ne
eded

Bug was first filed here (with more info): 
https://bugs.gentoo.org/show_bug.cgi?id=374801

build output:
# V=1 make
cd src && make all
make[1]: Entering directory 
`/var/tmp/portage/dev-db/redis-2.2.12/work/redis-2.2.12/src'
MAKE hiredis
cd ../deps/hiredis && make static TARCH=""
make[2]: Entering directory 
`/var/tmp/portage/dev-db/redis-2.2.12/work/redis-2.2.12/deps/hiredis'
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2   net.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2   hiredis.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2   sds.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2   async.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
make[2]: Leaving directory 
`/var/tmp/portage/dev-db/redis-2.2.12/work/redis-2.2.12/deps/hiredis'
MAKE linenoise
cd ../deps/linenoise && make TARCH=""
make[2]: Entering directory 
`/var/tmp/portage/dev-db/redis-2.2.12/work/redis-2.2.12/deps/linenoise'
gcc  -c -Wall -W -Os -g linenoise.c
gcc  -c -Wall -W -Os -g example.c
gcc  -Wall -W -Os -g -o linenoise_example linenoise.o example.o
make[2]: Leaving directory 
`/var/tmp/portage/dev-db/redis-2.2.12/work/redis-2.2.12/deps/linenoise'
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  ae.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  anet.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2 
-I../deps/hiredis  redis-benchmark.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  sds.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  adlist.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  zmalloc.c
MAKE hiredis
cd ../deps/hiredis && make static TARCH=""
make[2]: Entering directory 
`/var/tmp/portage/dev-db/redis-2.2.12/work/redis-2.2.12/deps/hiredis'
make[2]: Nothing to be done for `static'.
make[2]: Leaving directory 
`/var/tmp/portage/dev-db/redis-2.2.12/work/redis-2.2.12/deps/hiredis'
gcc -o redis-benchmark -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2 
-lm -pthread    ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o 
../deps/hiredis/libhiredis.a
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2 
-I../deps/hiredis -I../deps/linenoise  redis-cli.c
redis-cli.c: In function ‘cliReadReply’:
redis-cli.c:457: warning: ignoring return value of ‘fwrite’, declared with 
attribute warn_unused_result
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  release.c
gcc -o redis-cli -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2 -lm 
-pthread    anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o 
../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  
redis-check-dump.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  lzf_c.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  lzf_d.c
gcc -o redis-check-dump -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 
-O2 -lm -pthread    redis-check-dump.o lzf_c.o lzf_d.o
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  
redis-check-aof.c
gcc -o redis-check-aof -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2 
-lm -pthread    redis-check-aof.o
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  dict.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  redis.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  pqsort.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  zipmap.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  sha1.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  ziplist.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  networking.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  util.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  object.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  db.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  replication.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  rdb.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  t_string.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  t_list.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  t_set.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  t_zset.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  t_hash.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  config.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  aof.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  vm.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  pubsub.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  multi.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  debug.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  sort.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  intset.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  syncio.c
gcc -c -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2  slowlog.c
gcc -o redis-server -std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6 -O2 
-lm -pthread    adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o 
lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o 
object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o 
config.o aof.o vm.o pubsub.o multi.o debug.o sort.o intset.o syncio.o slowlog.o
vm.o: In function `computeObjectSwappability':
vm.c:(.text+0xdf0): undefined reference to `log'
collect2: ld returned 1 exit status
make[1]: *** [redis-server] Error 1
make[1]: Leaving directory 
`/var/tmp/portage/dev-db/redis-2.2.12/work/redis-2.2.12/src'
make: *** [all] Error 2

Original issue reported on code.google.com by jo...@bergstroem.nu on 29 Jul 2011 at 10:51

GoogleCodeExporter commented 8 years ago
This was fixed upstream yesterday.

Original comment by pcnoordh...@gmail.com on 29 Jul 2011 at 10:55

GoogleCodeExporter commented 8 years ago
I tried this patch but the issue persisted (thats why I decided to file the 
ticket). Let me double check and see if I screwed up

Original comment by jo...@bergstroem.nu on 29 Jul 2011 at 11:15

GoogleCodeExporter commented 8 years ago
You're right, -lm needs to be at the tail of that last command for the "log" 
function to be found in the math library.

Original comment by pcnoordh...@gmail.com on 29 Jul 2011 at 11:19

GoogleCodeExporter commented 8 years ago
I'm sorry, I was testing against the wrong version as well. This has indeed 
been fixed on 2.2.

Original comment by pcnoordh...@gmail.com on 29 Jul 2011 at 11:22

GoogleCodeExporter commented 8 years ago
... and the last edit: resetting the dup status.

Original comment by pcnoordh...@gmail.com on 29 Jul 2011 at 11:25

GoogleCodeExporter commented 8 years ago
Same here :-) Confirmed working

Original comment by jo...@bergstroem.nu on 29 Jul 2011 at 11:50