Package Details: r-mkl 4.4.2-1

Git Clone URL: https://aur.archlinux.org/r-mkl.git (read-only, click to copy)
Package Base: r-mkl
Description: Language and environment for statistical computing and graphics, linked to the Intel(R) MKL.
Upstream URL: http://www.r-project.org/
Keywords: hpc mathematics modelling r statistics
Licenses: GPL
Conflicts: microsoft-r-open, r
Provides: r
Submitter: giniu
Maintainer: alexanderp
Last Packager: alexanderp
Votes: 25
Popularity: 0.000084
First Submitted: 2010-05-06 00:10 (UTC)
Last Updated: 2024-11-12 19:56 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 .. 21 Next › Last »

alexanderp commented on 2022-11-05 13:51 (UTC)

Hi @hanziness . The mklvars.sh script requires $MKLROOT to be set. If you installed intel-openapi-mkl, you should have the following on your system which gets sourced on login:

cat /etc/profile.d/intel-oneapi-mkl.sh 
export MKLROOT=/opt/intel/oneapi/mkl/latest

hanziness commented on 2022-11-02 12:32 (UTC) (edited on 2022-11-02 12:32 (UTC) by hanziness)

@alexanderp For me (on Manjaro), the package installation fails because MKLROOT is unset, even though intel-oneapi-mkl is already installed (and I have rebooted since then). The reason of the failure, in my understanding, is that in PKGBUILD we first check if MKLROOT is unset and if it is unset, we stop (lines 93-96). Then if we did not error out (i.e. MKLROOT is set), we source the files that set MKLROOT (lines 97-106).

So, to make the package build for me, I move the MKLROOT check to AFTER sourcing mklvars.sh, as seen below. My question is whether the current behaviour really is the intended one? This should fix MKLROOT related errors despite MKL being installed.

diff --git a/PKGBUILD b/PKGBUILD
index f20ef0b..242012f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -90,10 +90,6 @@ build() {
   _gfortran_lib=mkl_gf_lp64

   # Set up the environment for MKL
-  if [ -z ${MKLROOT+x} ]; then
-    echo -e "\nError: MKLROOT is unset\n"
-    exit
-  fi
   if [ -f /opt/intel/mkl/bin/mklvars.sh ]; then
     echo "Sourcing /opt/intel/mkl/bin/mklvars.sh"
     source /opt/intel/mkl/bin/mklvars.sh ${_intel_arch}
@@ -105,6 +101,11 @@ build() {
     source ../mklvars.sh ${_intel_arch}
   fi

+  if [ -z ${MKLROOT+x} ]; then
+    echo -e "\nError: MKLROOT is unset\n"
+    exit
+  fi
+
   if [[ $_CC = "icc" ]]; then
     source ${MKLROOT}/../bin/compilervars.sh ${_intel_arch}
     _intel_cc_opt=" -O3 -fPIC -m64 -march=native -fp-model precise -fp-model source -I${MKLROOT}/include"

kbipinkumar commented on 2022-10-27 18:20 (UTC)

@alexanderp, turns out it was icu package installed by anaconda package manager that was causing the issues. once i disabled conda environment compile process used the "icu" package from arch repository and proceeded without any issues.

Sorry for the false alarm.

alexanderp commented on 2022-10-27 16:46 (UTC)

@kbipinkumar, no such error on my side

kbipinkumar commented on 2022-10-27 08:30 (UTC) (edited on 2022-10-27 10:54 (UTC) by kbipinkumar)

I am getting following error during compilation. from my limited understanding these errors are related to icu package. is there a hard requirement for older version of ICU package?

/usr/bin/ld: ../../lib/libR.so: undefined reference to `u_getVersion_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `ucol_setStrength_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `ucol_strcollIter_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `_libiconv_version'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `uloc_setDefault_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `uiter_setUTF8_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `ucol_open_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `libiconv_open'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `ucol_setAttribute_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `libiconv_close'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `ucol_getLocaleByType_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `u_versionToString_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `ucol_close_58'

/usr/bin/ld: ../../lib/libR.so: undefined reference to `libiconv'

collect2: error: ld returned 1 exit status

make[3]: *** [Makefile:149: R.bin] Error 1

burgerga commented on 2021-07-27 12:20 (UTC)

@alexanderp Yeah, I see your point. Could you just error the installation if it is not set? Because it took me quite some time to figure out that the linker errors I got from install.packages in R were caused MKLROOT not being defined, and that would save other people the trouble.

alexanderp commented on 2021-07-14 18:37 (UTC)

@burgerga , I'm a bit wary of hardcoding this in the PKGBUILD since it will be introducing a dependency on the specific file from intel-mkl existing in that path.

I've checked other packages which depend on intel-mkl and they are not sourcing the script manually either.

burgerga commented on 2021-07-12 10:38 (UTC)

@alexanderp I contacted the intel-mkl maintainer, and he suggested that if MKLROOT is not yet set, to source /etc/profile.d/intel-mkl.sh in the r-mkl PKGBUILD

burgerga commented on 2021-07-12 07:21 (UTC) (edited on 2021-07-12 07:29 (UTC) by burgerga)

@alexanderp Figured it out! intel-mkl installs /etc/profile.d/intel-mkl.sh which sets MKLROOT, but doesn't source it, so MKLROOT is only set after the next reboot.

EDIT: I see that are messages crossed. I'll ask the maintainer of intel-mkl to pick this up.

alexanderp commented on 2021-07-12 07:15 (UTC)

@burgerga

$ cat /etc/profile.d/intel-mkl.sh 
export MKLROOT=/opt/intel/mkl

owned by:

$ pacman -Qo /etc/profile.d/intel-mkl.sh 
/etc/profile.d/intel-mkl.sh is owned by intel-mkl 2020.4.304-1