The problem lies with the configuration of the OpenBLAS library. The configure script is not linking the R library correctly.
To fix this issue, you need to modify the configure script to include the necessary flags for linking the R library. You can do this by adding the following lines to the config.sub file:
# Add the following lines to the config.sub file
AC_CONFIG_COMMANDS([build], [echo " $1 -fPIC -shared -Wl,--export-dynamic -fopenmp -Wl,-Bsymbolic-functions -Wl,-z,relro -L$(libdir) -lr"])
This will ensure that the build command includes the necessary flags for linking the R library.
Alternatively, you can also try adding the following flag to the CFLAGS and LDFLAGS variables in the Makefile:
-lr
This will tell the linker to link against the R library.
It’s also worth noting that you may need to modify the LD_LIBRARY_PATH environment variable to point to the correct location of the R library. You can do this by adding the following line to your shell configuration file (e.g. .bashrc):
export LD_LIBRARY_PATH=/usr/lib/R/lib:$LD_LIBRARY_PATH
This will ensure that the linker uses the correct location to find the R library.
By making these changes, you should be able to link against the R library correctly and resolve the issue.
Last modified on 2023-10-19