From: nobu.nokada@... Date: 2003-07-10T22:40:29+09:00 Subject: Re: build problems with 1.8, solaris and sparc options Hi, At Thu, 10 Jul 2003 11:57:56 +0900, Dan Debertin wrote: > This is compiled 64-bit: > > gcc -fPIC -g -O2 -m64 -mcpu=ultrasparc -I. -I/usr/local/src/ruby > > -I/usr/local/src/ruby -I/usr/local/src/ruby/ext/bigdecimal -c bigdecimal.c > > This isn't: > > gcc -Wl,-G -L"/usr/local/src/ruby" -L"/opt/lib" -o bigdecimal.so > > bigdecimal.o -ldl -lcrypt -lm -lc > > ld: fatal: file bigdecimal.o: wrong ELF class: ELFCLASS64 > > ld: fatal: File processing errors. No output written to bigdecimal.so > > collect2: ld returned 1 exit status > > You can't mix 32-bit and 64-bit libraries/object files. At the link > phase, ld doesn't know you're trying to make a 64-bit executable, so > it looks under /usr/lib for -ldl, -lm, etc., instead of > /usr/lib/64. (BTW, 'elfdump -e' can be invaluable in diagnosing > problems like this.) Then, try configure with LDFLAGS=-m64, or with CC='gcc -m64' instead of CFLAGS. -- Nobu Nakada