From: nobuyoshi nakada Date: 2005-09-29T19:05:49+09:00 Subject: Re: Trouble building 64-bit Ruby 1.8.3 on Solaris 10/AMD64 Hi, At Thu, 29 Sep 2005 18:23:55 +0900, ts wrote in [ruby-talk:158207]: > n> I'd like to know why DLDFLAGS can't be set only on Solaris. > > With DLDFLAGS=-m64 it do > > gcc -fPIC -g -O2 -I. -I../.. -I../../. -I../.././ext/bigdecimal -c bigdecimal.c > In file included from ../../ruby.h:24, > from bigdecimal.c:23: > ../../config.h:17:1: warning: "_FILE_OFFSET_BITS" redefined > In file included from /usr/include/iso/ctype_iso.h:30, > from /usr/include/ctype.h:18, > from bigdecimal.c:16: > /usr/include/sys/feature_tests.h:96:1: warning: this is the location of the previous definition > gcc -Wl,-G -m64 -L'../..' -o ../../.ext/sparc-solaris2.8/bigdecimal.so bigdecimal.o -ldl -lcrypt -lm -lc > ld: fatal: file bigdecimal.o: wrong ELF class: ELFCLASS32 DLDFLAGS itself seems to work. > With CC="gcc -m64" > > compiling bigdecimal > gcc -m64 -fPIC -g -O2 -I. -I../.. -I../../. -I../.././ext/bigdecimal -c bigdecimal.c > gcc -m64 -Wl,-G -m64 -L'../..' -o ../../.ext/sparc-solaris2.8/bigdecimal.so bigdecimal.o -ldl -lm -lc Or both of CFLAGS and DLDFLAGS are needed. OK, understood. Thank you. -- Nobu Nakada