[parsec-users] Compiling blackscholes-tbb with -static

Vivek Rane vrane at seas.upenn.edu
Fri Apr 16 17:25:34 EDT 2010

Since our simulator in its current state only accepts static binaries,  
I'm trying to compile blackscholes-tbb statically  
(blackscholes-pthreads compiles successfully, but we're trying to  
study the behavior of tbb). I get the following error:

g++  -fPIC -o libtbbmalloc_debug.so.2 tbbmalloc.o  tbb_misc_malloc.o  
MemoryAllocator.o  -ldl -lpthread -lrt  -shared  
-Wl,-soname=libtbbmalloc_debug.so.2 -m64 -L/usr/lib64 -L/usr/lib  
-lpthread -static  
-L/mnt/eclipse/acg/projects/parsec-2.1/pkgs/libs/tbblib/inst/amd64-linux.gcc-tbb/lib -fPIC -fPIC  
/usr/lib64/gcc/x86_64-suse-linux/4.3/crtbeginT.o: relocation  
R_X86_64_32 against `__DTOR_END__' can not be used when making a  
shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/4.3/crtbeginT.o: could not read  
symbols: Bad value
collect2: ld returned 1 exit status

Since I'm already using -fPIC for the compilation, does this mean that  
I need to recompile crtbeginT.o with -fPIC? In that case, is there a  
workaround (I do not have permissions to crtbeginT.o)?

Thanks for your help.

- Vivek

More information about the parsec-users mailing list