ashish-goyal / redis

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

make 32bit compiling errors on 64bit Ubuntu (natty) #624

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of Redis you are using, in what kind of Operating System?
Redis: 2.4/unstable
OS: Ubuntu Natty
Kernel: Linux salimane-desktop 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 
19:02:55 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
libc6-dev-i386 : installed

What is the problem you are experiencing?
$make 32bit
......
make[3]: Leaving directory `/home/salimane/htdocs/redis/deps/hiredis'
    LINK redis-benchmark
/usr/bin/ld: i386:x86-64 architecture of input file `anet.o' is incompatible 
with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `adlist.o' is incompatible 
with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/hiredis/libhiredis.a(hiredis.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/hiredis/libhiredis.a(net.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(jemalloc.o)' is incompatible with i386 
output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(arena.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(base.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(bitmap.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(chunk.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(chunk_mmap.o)' is incompatible with i386 
output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(ctl.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(huge.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(mutex.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(stats.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(tcache.o)' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`../deps/jemalloc/lib/libjemalloc.a(extent.o)' is incompatible with i386 output
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [redis-benchmark] Error 1
make[2]: Leaving directory `/home/salimane/htdocs/redis/src'
make[1]: *** [32bit] Error 2
make[1]: Leaving directory `/home/salimane/htdocs/redis/src'
make: *** [32bit] Error 2

What steps will reproduce the problem?
on ubuntu natty 64 bit
install libc6-dev-i386
clone & check out 2.4 or unstable
make 32bit

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

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!

Please provide any additional information below.

Original issue reported on code.google.com by salim...@gmail.com on 5 Aug 2011 at 6:44

GoogleCodeExporter commented 8 years ago
I didn't test this: you may need to install "gcc-multilib". Can you confirm if 
this fixes the build?

Original comment by pcnoordh...@gmail.com on 5 Aug 2011 at 7:16

GoogleCodeExporter commented 8 years ago
I just did a clean install of 11.04, 64-bit and I only needed to install 
libc6-dev-i386 to build a 32 bit binary. One of the dependencies of 
libc6-dev-i386 was in fact gcc-multilib. Is your OS a clean install or an 
upgrade?

Original comment by pcnoordh...@gmail.com on 5 Aug 2011 at 7:44

GoogleCodeExporter commented 8 years ago
it's an upgrade from 10.10. "gcc-multilib" was already installed.

Original comment by salim...@gmail.com on 5 Aug 2011 at 8:12

GoogleCodeExporter commented 8 years ago
I believe make clean && make would solve this. I get similar errors if I first 
run make (i.e. a 64-bit build) and then make 32bit, without running make clean 
between.

Original comment by hampus.w...@gmail.com on 5 Aug 2011 at 8:43

GoogleCodeExporter commented 8 years ago
yep exactly after running "make clean" it compiled fine.
Thanks

Original comment by salim...@gmail.com on 5 Aug 2011 at 8:55

GoogleCodeExporter commented 8 years ago

Original comment by pcnoordh...@gmail.com on 5 Aug 2011 at 9:04

GoogleCodeExporter commented 8 years ago
i have the same error , but make clean & make also have error 
finally , use  make distclean & make , it works well

Original comment by liyongmi...@163.com on 21 May 2014 at 3:48

GoogleCodeExporter commented 8 years ago
"make distclean & make" also fixed this problem for me.

Original comment by mbark...@gmail.com on 16 Sep 2014 at 1:24