r-lib / ps

R package to query, list, manipulate system processes
https://ps.r-lib.org/
Other
78 stars 20 forks source link

Cannot install ps: "library not found for -lomp" #81

Closed soumyaray closed 4 years ago

soumyaray commented 4 years ago

Cannot install package ps on MacOS Catalina. Did a fresh install of XCode to ensure command line tools are available.

> install.packages("ps")

  There is a binary version available but the source
  version is later:
   binary source needs_compilation
ps  1.3.0  1.3.2             FALSE

installing the source package ‘ps’

trying URL 'https://cran.rstudio.com/src/contrib/ps_1.3.2.tar.gz'
Content type 'application/x-gzip' length 98761 bytes (96 KB)
==================================================
downloaded 96 KB

* installing *source* package ‘ps’ ...
** package ‘ps’ successfully unpacked and MD5 sums checked
** libs
/usr/local/opt/llvm/bin/clang -fopenmp -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -Wall px.c -o px
ld: library not found for -lomp
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [px] Error 1
ERROR: compilation failed for package ‘ps’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/ps’
Warning in install.packages :
  installation of package ‘ps’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/fy/2pgth7nd7h7d345vrgp3l7j00000gq/T/Rtmpi6J7I3/downloaded_packages’

Doing a devtools install of the older 1.3.0 version (for which a binary exists) from CRAN repos yields the same error.

gaborcsardi commented 4 years ago

ps does not use OpenMP, so I am not sure what we could do with this. We surely do not add the -fopenmp flag, it is probably coming from your R installation.

soumyaray commented 4 years ago

Thanks @gaborcsardi -- Sorry for the confusion.

I resolved this by just installing full XCode instead of just command line tools for MacOS.