Etienne Fayen wrote : > I am trying to build kwant and its dependencies from sources. > A first build without Mumps succeeded. When adding Mumps however, the > linker returns the following error: > > /usr/bin/ld: /opt/mumps-5.4.1/lib/libzmumps.a(ztools.o): relocation > R_X86_64_PC32 against symbol `.gomp_critical_user_critical_old_ooc' can > not be used when making a shared object; recompile with -fPIC > /usr/bin/ld: final link failed: bad value
I suppose that this is on some kind of Linux? Since mumps and friends are located in /opt I guess they were compiled manually? In which way? > Would adding -fPIC flag as suggested by the error message solve the > issue ? If so, how can this flag be added with the python build > setup ? Please check the whole log of compilation (you can also post it here). For example, run python3 setup.py clean -a followed by python3 setup.py build_ext -i During the build process the commands that are executed are echoed. So when you see an error, the command that caused it is immediately above. > Would adding -fPIC flag as suggested by the error message solve the > issue ? If so, how can this flag be added with the python build > setup ? On my machine the -fPIC flag is present in all invocations of gcc by setup.py. That should be also the case for you (please check). My first guess is that the problem you experience might be due to mumps/scotch (and not Kwant) being compiled without -fPIC. Hope this helps a bit Christoph
smime.p7s
Description: S/MIME cryptographic signature