From: "Iñaki Baz Castillo" Date: 2011-02-07T20:01:33+09:00 Subject: Re: C extension: R_X86_64_32 problem when inlcuding a xxxxx.a library (64 bits SO) 2011/2/7 Ralf Mueller : > Try '-fPIC -DPIC'. Same error even if I've tryed that in the Makefile of libudns.a and also in the Ruby extension Makefile. Same output as before (but now with -DPIC): gcc -I. -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -fPIC -DPIC -fno-strict-aliasing -g -g -O2 -fPIC -DPIC -o em-udns.o -c em-udns.c gcc -shared -o em_udns_ext.so em-udns.o -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -lruby-1.9.1 -ludns -lpthread -lrt -ldl -lcrypt -lm -lc /usr/bin/ld: ./libudns.a(udns_resolver.o): relocation R_X86_64_32 against `dns_defctx' can not be used when making a shared object; recompile with -fPIC ./libudns.a: could not read symbols: Bad value Thanks. -- Iñaki Baz Castillo