rahulgarg

OpenMP on 64-bit linux and fPIC

Discussion created by rahulgarg on May 17, 2009
Latest reply on May 24, 2009 by rahulgarg

I am on 64-bit Ubuntu Linux 8.10 and using the binaries downloaded from the AMD website (x86_open64-4.2.2-1.x86_64.tar.bz2). The default linker (/usr/bin/ld) on my system is from GCC v4.3.2.

I am trying to compile a shared library which contains OpenMP declarations.

opencc -fopenmp myfile.c -shared -o myfile.so -lexternal_library -fPIC

I get the following error:

/usr/bin/ld: /home/rahul/open64/x86_open64-4.2.2//lib/gcc-lib/x86_64-open64-linux/4.2.2/libopenmp.a(omp_runtime.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC

Any hints/ideas/solutions?

 

 

Outcomes