r-lib / ps

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

Unable to build "ps" package on macOS Mojave within Anaconda #55

Closed itsame-mcl closed 5 years ago

itsame-mcl commented 5 years ago

Hello,

I am trying to install the ps package on my macOS Mojave (10.14.1) computer, as I need it to explore the tidymodels package. I use R 3.5.1 within Anaconda (I also use some Python tools) and I have Xcode 10.1 and the last version of the Command Line Tools installed (Nov 2 2018), but I am not able to build the package. At each try, I get the same error log :

install.packages("ps")
trying URL 'https://cran.rstudio.com/src/contrib/ps_1.2.1.tar.gz'
Content type 'application/x-gzip' length 259477 bytes (253 KB)
==================================================
downloaded 253 KB

* installing *source* package ‘ps’ ...
** package ‘ps’ successfully unpacked and MD5 sums checked
** libs
x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/maxence-lagalle/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix  -Wall px.c -o px
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
Undefined symbols for architecture x86_64:
  "___error", referenced from:
      _echo_from_fd in px-477250.o
  "___stack_chk_fail", referenced from:
      _cat2 in px-477250.o
      _cat in px-477250.o
      _echo_from_fd in px-477250.o
      _main in px-477250.o
  "___stack_chk_guard", referenced from:
      _cat2 in px-477250.o
      _cat in px-477250.o
      _echo_from_fd in px-477250.o
      _main in px-477250.o
  "___stderrp", referenced from:
      _usage in px-477250.o
      _cat2 in px-477250.o
      _cat in px-477250.o
      _write_to_fd in px-477250.o
      _echo_from_fd in px-477250.o
      _main in px-477250.o
  "___stdoutp", referenced from:
      _echo_from_fd in px-477250.o
      _main in px-477250.o
  "_close", referenced from:
      _cat in px-477250.o
  "_exit", referenced from:
      _cat2 in px-477250.o
      _cat in px-477250.o
  "_fflush", referenced from:
      _echo_from_fd in px-477250.o
      _main in px-477250.o
  "_fprintf", referenced from:
      _cat2 in px-477250.o
      _cat in px-477250.o
      _write_to_fd in px-477250.o
      _echo_from_fd in px-477250.o
      _main in px-477250.o
  "_fputs", referenced from:
      _main in px-477250.o
  "_fwrite", referenced from:
      _usage in px-477250.o
      _main in px-477250.o
  "_getenv", referenced from:
      _main in px-477250.o
  "_open", referenced from:
      _cat in px-477250.o
  "_printf", referenced from:
      _main in px-477250.o
  "_puts", referenced from:
      _main in px-477250.o
  "_read", referenced from:
      _cat2 in px-477250.o
      _cat in px-477250.o
      _echo_from_fd in px-477250.o
  "_sleep", referenced from:
      _main in px-477250.o
  "_sscanf", referenced from:
      _main in px-477250.o
  "_strcmp", referenced from:
      _main in px-477250.o
  "_strerror", referenced from:
      _echo_from_fd in px-477250.o
  "_strlen", referenced from:
      _write_to_fd in px-477250.o
      _echo_from_fd in px-477250.o
      _main in px-477250.o
  "_usleep", referenced from:
      _main in px-477250.o
  "_write", referenced from:
      _cat2 in px-477250.o
      _cat in px-477250.o
      _write_to_fd in px-477250.o
      _echo_from_fd in px-477250.o
      _main in px-477250.o
     (maybe you meant: _write_to_fd)
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makevars:11: px] Error 1
ERROR: compilation failed for package ‘ps’
* removing ‘/Users/maxence-lagalle/anaconda3/lib/R/library/ps’
Warning in install.packages :
  installation of package ‘ps’ had non-zero exit status

I know this issue might be very specific to my use case, but I you have some tips or workaround to fix it, I am interested !

Best regards,

AndyTengWei commented 5 years ago

-- I come to the same issue, please let me know if any update. Many thanks

Hi Maxence, I just found "https://anaconda.org/conda-forge/r-ps" and tried it out. It works for me. Hope that will help you.

Seems R packages in Anaconda are named leading with "r-". You can try to search the web above if any other packages with the same issue.

itsame-mcl commented 5 years ago

Hi Maxence, I just found "https://anaconda.org/conda-forge/r-ps" and tried it out. It works for me. Hope that will help you.

Seems R packages in Anaconda are named leading with "r-". You can try to search the web above if any other packages with the same issue.

Thank you very much, this method works for me too !