polyclip icon indicating copy to clipboard operation
polyclip copied to clipboard

configure: error: C++ compiler cannot create executables

Open monis4567 opened this issue 1 year ago • 1 comments

In "R version 4.2.3 (2023-03-15)" on Ubuntu 22.04.2 LTS, with 'GNU Fortran (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0' and g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 and gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 and c++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0. I am trying to install 'polyclip' using these commands in R

require(remotes) install_github('baddstats/polyclip')

But I get this error message:

install_github('baddstats/polyclip') Downloading GitHub repo baddstats/polyclip@HEAD ── R CMD build ─────────────────────────────────────────────────────────────────────────── ✔ checking for file ‘/tmp/RtmpVrDvtR/remotes2736c10a23e2/baddstats-polyclip-5c5404a/DESCRIPTION’ ... ─ preparing ‘polyclip’: ✔ checking DESCRIPTION meta-information ... ─ cleaning src ─ running ‘cleanup’ ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories ─ building ‘polyclip_1.10-4.tar.gz’

Installing package into ‘/home/hal9000/R/x86_64-pc-linux-gnu-library/4.2’ (as ‘lib’ is unspecified)

  • installing source package ‘polyclip’ ... ** using staged installation Rscript execution error: No such file or directory compiling under C++11 checking whether the C++ compiler works... no configure: error: in /tmp/Rtmp9wfYJH/R.INSTALL27ff8776a7b3e/polyclip': configure: error: C++ compiler cannot create executables See config.log' for more details ERROR: configuration failed for package ‘polyclip’
  • removing ‘/home/hal9000/R/x86_64-pc-linux-gnu-library/4.2/polyclip’
  • restoring previous ‘/home/hal9000/R/x86_64-pc-linux-gnu-library/4.2/polyclip’ Warning message: In i.p(...) : installation of package ‘/tmp/RtmpVrDvtR/file2736ccf8cfeb/polyclip_1.10-4.tar.gz’ had non-zero exit status

monis4567 avatar Mar 28 '23 15:03 monis4567

I think this is basically the same issue as #14 and #18. It is very annoying, but an updated version of this comment seems to be a workaround on systems with this issue:

wget https://cran.r-project.org/src/contrib/polyclip_1.10-4.tar.gz
tar -zxvf polyclip_1.10-4.tar.gz
Rscript -e "library('devtools'); devtools::install('polyclip')"

rubak avatar Mar 30 '23 19:03 rubak