[Mono-list] Building Mono on AMD64: relocation R_X86_64_TPOFF32 against a local symbol

Jason Clouse jclouse at cdanjoyner.com
Tue Jun 27 00:43:57 EDT 2006

I have tried (and failed) to build Mono on Gentoo Linux (AMD64).  The build always fails linking libmono-static.a:

x86_64-pc-linux-gnu-gcc -I../.. -I../../libgc/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -march=nocona -O2 -pipe -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs -fPIC -o mono -Wl,-version-script=./ldscript.mono main.o -pthread -Wl,--export-dynamic -Wl,--export-dynamic  ./.libs/libmono-static.a ../os/.libs/libmonoos.a /usr/lib64/libgthread-2.0.so /usr/lib64/libgmodule-2.0.so -ldl /usr/lib64/libglib-2.0.so -lnsl -lpthread -lm -lrt
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: ./.libs/libmono-static.a(threads.o): relocation R_X86_64_TPOFF32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
./.libs/libmono-static.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

I have built both libmono-static and threads.o with -fPIC and I still get this message.  I've seen that other people have gotten it working, so I'm not sure what's going on here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20060627/7e0eab47/attachment.html 

More information about the Mono-list mailing list