baddstats / polyclip

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

Error when compiling package in Ubuntu 16.04 #9

Closed ipuzek closed 6 years ago

ipuzek commented 6 years ago

Console output:

rubak commented 6 years ago

Which version of R is this under? And are you just installing the CRAN version of polyclip via install.packages()?

gregleleu commented 6 years ago

Hi, same issue on OS X Unclear what causes it

remotes::install_github('baddstats/polyclip') Downloading GitHub repo baddstats/polyclip@master

  • installing source package ‘polyclip’ ... checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes Error: unexpected end of input Execution halted compiling under C++11 Using PKG_CONFIG: pkg-config Compiling against bundled copy of clipper library. In the clipper library, signed 64-bit integers (cInt) will be declared as 'signed long long' In the clipper library, unsigned 64-bit integers (cUInt) will be declared as 'unsigned long long' configure: creating ./config.status config.status: creating src/Makevars ** libs Makevars:4: *** missing separator. Stop. ERROR: compilation failed for package ‘polyclip’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/polyclip’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/polyclip’ Warning message: In i.p(...) : installation of package ‘/var/folders/dj/syp3v_s56_j7j6n56plgzwy00000gn/T//RtmpmlWKuA/remotesd5f1440d6dc6/baddstats-polyclip-afa1dfa’ had non-zero exit status
rubak commented 6 years ago

I tried with R 3.4.4 under Ubuntu 14.04 and with R 3.5 on a brand new Ubuntu 16.04 VM, and both worked flawlessly. What is your locale? Maybe you could provide the output of sessionInfo()? Does it also happen with the CRAN version when you do install.packages("polyclip")?

gregleleu commented 6 years ago

Here's my sessionInfo():

R version 3.5.0 (2018-04-23) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.4

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] compiler_3.5.0 tools_3.5.0

rubak commented 6 years ago

I have now found the bug in the configure script and (hopefully) fixed it. Could you please confirm that it now works and close the issue?

luispuerto commented 6 years ago

did you already upload it to CRAN? I still have the same issue in macOS.

rubak commented 6 years ago

No, not on CRAN yet. Please install from GitHub:

remotes::install_github('baddstats/polyclip')
luispuerto commented 6 years ago

Now it builds perfectly 👍

luispuerto commented 6 years ago
$ Rscript --vanilla -e "devtools::install_github('baddstats/polyclip')"        
Downloading GitHub repo baddstats/polyclip@master
from URL https://api.github.com/repos/baddstats/polyclip/zipball/master
Installing polyclip
'/usr/local/Cellar/r/3.5.0_1/lib/R/bin/R' --no-site-file --no-environ  \
  --no-save --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/wf/41gjf2mx7m7fmvfd8dr22_5h0000gn/T/RtmpdKMZkw/devtoolsa1c3761c62/baddstats-polyclip-e10d725'  \
  --library='/Users/lpuerto/Library/R/3.x/library' --install-tests

* installing *source* package ‘polyclip’ ...
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
compiling under C++11
Using PKG_CONFIG: pkg-config
Compiling against bundled copy of clipper library.
     In the clipper library, signed 64-bit integers (cInt)
     will be declared as 'signed long long'
     In the clipper library, unsigned 64-bit integers (cUInt)
     will be declared as 'unsigned long long'
configure: creating ./config.status
config.status: creating src/Makevars
** libs
/usr/local/opt/llvm/bin/clang  -I"/usr/local/Cellar/r/3.5.0_1/lib/R/include" -DNDEBUG -DPOLYCLIP_LONG64="signed long long" -DPOLYCLIP_ULONG64="unsigned long long"  -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC  -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c init.c -o init.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.0_1/lib/R/include" -DNDEBUG -DPOLYCLIP_LONG64="signed long long" -DPOLYCLIP_ULONG64="unsigned long long"  -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include/darwin -fPIC  -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include/darwin -c interface.cpp -o interface.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/3.5.0_1/lib/R/include" -DNDEBUG -DPOLYCLIP_LONG64="signed long long" -DPOLYCLIP_ULONG64="unsigned long long"  -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include  -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include/darwin -fPIC  -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/include/darwin -c clipper.cpp -o clipper.o
clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/Cellar/r/3.5.0_1/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o polyclip.so init.o interface.o clipper.o -L/usr/local/Cellar/r/3.5.0_1/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
installing to /Users/lpuerto/Library/R/3.x/library/polyclip/libs
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (polyclip)
gregleleu commented 6 years ago

All good as well