baddstats / polyclip

R package polyclip: a port of the Clipper library for polygon geometry
19 stars 6 forks source link

configure: error: C++ compiler cannot create executables #19

Open monis4567 opened 1 year ago

monis4567 commented 1 year ago

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)

rubak commented 1 year ago

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')"