Skip to content

configure script fails for MKL fails for multiple invocations #29

@yvdriess

Description

@yvdriess

When mkl_include symlink already exists, the configure script tries to write the new include symlink in the directory pointed to by mkl_include. This is easily fixed by adding the -n option to ln.

This is also present in the current tensorflow master branch, but I think this is the upstream.

diff --git a/configure b/configure
index 23603a9..7605a2c 100755
--- a/configure
+++ b/configure
@@ -252,14 +252,14 @@ if [ "$TF_NEED_MKL" == "1" ]; then # TF_NEED_MKL
       ln -sf $MKL_INSTALL_PATH/${MKL_ML_LIB_PATH} third_party/mkl/
       ln -sf $MKL_INSTALL_PATH/${MKL_ML_OMP_LIB_PATH} third_party/mkl/
       ln -sf $MKL_INSTALL_PATH/include third_party/mkl/
-      ln -sf $MKL_INSTALL_PATH/include third_party/eigen3/mkl_include
+      ln -sfn $MKL_INSTALL_PATH/include third_party/eigen3/mkl_include
       loc=$(locate -e libdl.so.2 | sed -n 1p)
       ln -sf $loc third_party/mkl/libdl.so.2
   elif [ -e "$MKL_INSTALL_PATH/${MKL_RT_LIB_PATH}" ]; then
       ln -sf $MKL_INSTALL_PATH/${MKL_RT_LIB_PATH} third_party/mkl/
       ln -sf $MKL_INSTALL_PATH/${MKL_RT_OMP_LIB_PATH} third_party/mkl/
       ln -sf $MKL_INSTALL_PATH/include third_party/mkl/
-      ln -sf $MKL_INSTALL_PATH/include third_party/eigen3/mkl_include
+      ln -sfn $MKL_INSTALL_PATH/include third_party/eigen3/mkl_include
       loc=$(locate -e libdl.so.2 | sed -n 1p)
       ln -sf $loc third_party/mkl/libdl.so.2
   else

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions