Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"recompile with -fPIC" error when compiling #6233

Closed
marius311 opened this issue Dec 29, 2018 · 1 comment
Closed

"recompile with -fPIC" error when compiling #6233

marius311 opened this issue Dec 29, 2018 · 1 comment

Comments

@marius311
Copy link

I'm trying to compile OpenMPI from source on a relatively old system,

$ uname -a
Linux ln02 2.6.16.60-0.103.1-smp #1 SMP Thu May 16 19:52:34 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ ldd --version
ldd (GNU libc) 2.4

$ ld --version
GNU ld (GNU Binutils) 2.22

$ gcc --version
gcc (GCC) 4.8.1

I've tried both OpenMPI 3.0.3 and 4.0.0 (I need at least v3) and after ./configure --prefix=$HOME && make && make install I get the following error:

 /bin/mkdir -p '/home/mmillea/lib/openmpi'
 /bin/sh ../../../../libtool   --mode=install /usr/bin/install -c   mca_patcher_overwrite.la '/home/mmillea/lib/openmpi'
libtool: warning: relinking 'mca_patcher_overwrite.la'
libtool: install: (cd /home/mmillea/src/openmpi-3.0.3/opal/mca/patcher/overwrite; /bin/sh "/home/mmillea/src/openmpi-3.0.3/libtool"  --silent --tag CC --mode=relink gcc -std=gnu99 -O3 -DNDEBUG -finline-functions -fno-strict-aliasing -pthread -module -avoid-version -o mca_patcher_overwrite.la -rpath /home/mmillea/lib/openmpi patcher_overwrite_module.lo patcher_overwrite_component.lo ../../../../opal/libopen-pal.la -lrt -lm -lutil -lz )
/home/mmillea/bin/ld: /home/mmillea/lib/libdl.a(dlsym.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/home/mmillea/lib/libdl.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
libtool:   error: error: relink 'mca_patcher_overwrite.la' with the above command before installing it
make[3]: *** [Makefile:1789: install-mcacomponentLTLIBRARIES] Error 1
make[3]: Leaving directory '/wrk/mmillea/src/openmpi-3.0.3/opal/mca/patcher/overwrite'
make[2]: *** [Makefile:1973: install-am] Error 2
make[2]: Leaving directory '/wrk/mmillea/src/openmpi-3.0.3/opal/mca/patcher/overwrite'
make[1]: *** [Makefile:2354: install-recursive] Error 1
make[1]: Leaving directory '/wrk/mmillea/src/openmpi-3.0.3/opal'
make: *** [Makefile:1875: install-recursive] Error 1

Any ideas what might be going wrong? Many thanks.

@marius311
Copy link
Author

I think this may be unrelated to open-mpi, somehow my libdl.a was compiled without fPIC, simply deleting that file seems to fix my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant