build fails on ppc64 #400

Closed
k0da opened this Issue Mar 23, 2012 · 5 comments

3 participants

@k0da

redis build on ppc64 fails with following error:
LINK redis-server
ziplist.o: In function zipPrevEncodeLength':
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/ziplist.c:227: undefined reference to
memrev32'
ziplist.o: In function zipPrevDecodeLength':
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/ziplist.c:210: undefined reference to
memrev32'
ziplist.o: In function zipPrevEncodeLengthForceLarge':
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/ziplist.c:239: undefined reference to
memrev32'
ziplist.o: In function zipLoadInteger':
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/ziplist.c:309: undefined reference to
memrev16'
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/ziplist.c:301: undefined reference to memrev16'
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/ziplist.c:305: undefined reference to
memrev16'
ziplist.o: In function zipSaveInteger':
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/ziplist.c:288: undefined reference to
memrev64'
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/ziplist.c:280: undefined reference to memrev16'
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/ziplist.c:284: undefined reference to
memrev32'
intset.o: In function _intsetGetEncoded':
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/intset.c:40: undefined reference to
memrev16'
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/intset.c:36: undefined reference to memrev32'
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/intset.c:32: undefined reference to
memrev64'
intset.o: In function _intsetSet':
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/intset.c:60: undefined reference to
memrev16'
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/intset.c:57: undefined reference to memrev32'
/home/abuild/rpmbuild/BUILD/redis-2.4.9/src/intset.c:54: undefined reference to
memrev64'
collect2: ld returned 1 exit status

@antirez
Owner

Hello, what Redis version is this? What operating system? Can I get shell access for 10 minutes?

Thank you,
Salvatore

@k0da

redis versions are 2.4.1 and 2.4.9 have same failures.

The OS is openSUSE Factory.Sorry I can't give you shell access, but I can provide you a build log
https://build.opensuse.org/package/show?package=redis&project=openSUSE%3AFactory%3APowerPC

If you click on failed, you'll get full build log.

@k0da

It seems that fixes my problem

Index: redis-2.4.1/src/Makefile

--- redis-2.4.1.orig/src/Makefile
+++ redis-2.4.1/src/Makefile
@@ -58,7 +58,7 @@ PREFIX= /usr/local
INSTALL_BIN= $(PREFIX)/bin
INSTALL= cp -p

-OBJ = 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 bio.o
+OBJ = 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 bio.o endian.o
BENCHOBJ = ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o
CLIOBJ = anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o
CHECKDUMPOBJ = redis-check-dump.o lzf_c.o lzf_d.o

@antirez
Owner

The problem is not fixing the build itself, but that 2.4.x is not big-endian clean. The RDB produced will not be readable by little endian instances.

2.2 was ok about this, 2.6 is ok about this. 2.4 is broken because of an error I made.
I can try fixing it in 2.4.10... but I'm not sure I'll be able to do so because it's a non trivial fix to backport from 2.6 and may result into a less stable 2.4.10 release. Keeping this open for now. The other solution is just to make an #error statement in 2.4.10 if users try to build in big endian archs.

@k0da

Yeah.. It builds but tests are failing.

ERROR:
: Too many small size classes (268 > max 256)
expected integer but got ""
while executing
"read $fd $bytes"
(procedure "read_from_test_client" line 3)
invoked from within
"read_from_test_client sock19"

Thanks for your effort on this

@mattsta mattsta closed this May 30, 2014
@Hailei Hailei pushed a commit to Hailei/redis that referenced this issue Aug 29, 2014
@marcosnils marcosnils Manually merge #400 50052e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment