parmetis/metis lacks -fPIC
Closed this issue · 5 comments
davydden commented
subj, on intel compilers.
ld: ../libmetis/libmetis.a(error.c.o): relocation R_X86_64_TPOFF32 against `gk_cur_jbufs' can not be used when making a shared object; recompile with -fPIC
davydden commented
export CFLAGS="${CFLAGS} -fPIC"
should help. Maybe done locally.
davydden commented
indeed, this helped
diff --git a/deal.II-toolchain/packages/parmetis.package b/deal.II-toolchain/packages/parmetis.package
index 1cff76b..ecf27d3 100644
--- a/deal.II-toolchain/packages/parmetis.package
+++ b/deal.II-toolchain/packages/parmetis.package
@@ -9,28 +9,31 @@ INSTALL_PATH=${INSTALL_PATH}/${NAME}
package_specific_build() {
cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
-
+
+ # needed for intel compiler
+ export CFLAGS="${CFLAGS} -fPIC"
+
# Firstly build metis
cd metis
-
+
make config prefix=${INSTALL_PATH} shared=1
quit_if_fail "parmetis/metis make config failed"
-
+
make -j${PROCS}
quit_if_fail "parmetis/metis make failed"
-
+
make install
quit_if_fail "parmetis/metis make install failed"
-
+
# Secondly build parmetis
cd ..
-
+
make config prefix=${INSTALL_PATH} shared=1
quit_if_fail "parmetis make config failed"
-
+
make -j${PROCS}
quit_if_fail "parmetis make failed"
-
+
make install
quit_if_fail "parmetis make install failed"
}
koecher commented
metis/parmetis is somehow specific.
May you please export your CFLAGS before you start candi and without the patch and check if it is working? (-fPIC is needed for several packages)
davydden commented
yes, it worked with global cflags as well.
koecher commented
Okay, lets document this. Intel compiler getting me and others headaches (I think Timo has given up for this). Before analysing intel compilers carefully, I want to implement the configuration stuff for each package, but I need to work on some other things (which are more recent to me) firstly.