szcf-weiya/fRLR

error in r-patched-solaris-x86

Closed this issue · 1 comments

https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/fRLR-00check.html

using R version 4.1.0 Patched (2021-07-20 r80649)
using platform: i386-pc-solaris2.10 (32-bit)
using session charset: UTF-8
using option ‘--no-stop-on-test-error’
checking for file ‘fRLR/DESCRIPTION’ ... OK
checking extension type ... Package
this is package ‘fRLR’ version ‘1.2’
package encoding: UTF-8
checking package namespace information ... OK
checking package dependencies ... OK
checking if this is a source package ... OK
checking if there is a namespace ... OK
checking for executable files ... OK
checking for hidden files and directories ... OK
checking for portable file names ... OK
checking for sufficient/correct file permissions ... OK
checking whether package ‘fRLR’ can be installed ... OK
checking installed package size ... OK
checking package directory ... OK
checking ‘build’ directory ... OK
checking DESCRIPTION meta-information ... OK
checking top-level files ... OK
checking for left-over files ... OK
checking index information ... OK
checking package subdirectories ... OK
checking R files for non-ASCII characters ... OK
checking R files for syntax errors ... OK
checking whether the package can be loaded ... ERROR
Loading this package had a fatal error status code 1
Loading log:
Error: package or namespace load failed for ‘fRLR’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/ripley/R/Lib32/fRLR/libs/fRLR.so':
  ld.so.1: R: fatal: relocation error: file /home/ripley/R/Lib32/fRLR/libs/fRLR.so: symbol GOMP_loop_dynamic_start: referenced symbol not found
Execution halted
DONE

according to https://cran.r-project.org/doc/manuals/R-exts.html#OpenMP-support

Common platforms may inline all OpenMP calls and so tolerate the omission of the OpenMP flag from PKG_LIBS, but this usually results in an installation failure with a different compiler or compilation flags. So cross-check that e.g. -fopenmp appears in the linking line in the installation logs.Common platforms may inline all OpenMP calls and so tolerate the omission of the OpenMP flag from PKG_LIBS, but this usually results in an installation failure with a different compiler or compilation flags. So cross-check that e.g. -fopenmp appears in the linking line in the installation logs.

it seems that I'd better also append -fopenmp to PKG_LIBS

see also the difference between -fopenmp and -lgomp, https://stackoverflow.com/questions/22938238/difference-between-linking-openmp-with-fopenmp-and-lgomp