baddstats / polyclip

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

Installation failed from CRAN #11

Closed zhiruiwang closed 6 years ago

zhiruiwang commented 6 years ago

I am using Microsoft R Open 3.5 on MacOS 10.13.5 and want to install polyclip from CRAN, but it failed. The error log is like the following:

* installing *source* package ‘polyclip’ ...
** package ‘polyclip’ successfully unpacked and MD5 sums checked
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: 
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:3: *** target pattern contains no `%'.  Stop.
ERROR: compilation failed for package ‘polyclip’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5.0-MRO/Resources/library/polyclip’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5.0-MRO/Resources/library/polyclip’
Warning in install.packages :
  installation of package ‘polyclip’ had non-zero exit status

However, if I install the package from GitHub install_github('baddstats/polyclip'), everything works fine. I wonder whether it is because the version on CRAN has some minor issues?

> devtools::install_github('baddstats/polyclip')
Downloading GitHub repo baddstats/polyclip@master
from URL https://api.github.com/repos/baddstats/polyclip/zipball/master
Installing polyclip
'/Library/Frameworks/R.framework/Resources/bin/R'  \
  --no-site-file --no-environ --no-save  \
  --no-restore --quiet CMD INSTALL  \
  '/private/var/folders/1v/wz_prgn52n91b5x1byjxwnl00000gn/T/RtmphT10uh/devtools14e468d99c59/baddstats-polyclip-d5dc5e2'  \
  --library='/Library/Frameworks/R.framework/Versions/3.5.0-MRO/Resources/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: 
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/clang4/bin/clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -DPOLYCLIP_LONG64="signed long long" -DPOLYCLIP_ULONG64="unsigned long long"  -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include   -fPIC  -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include  -c init.c -o init.o
/usr/local/clang4/bin/clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -DPOLYCLIP_LONG64="signed long long" -DPOLYCLIP_ULONG64="unsigned long long"  -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include  -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include -fPIC  -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include -c interface.cpp -o interface.o
/usr/local/clang4/bin/clang++ -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -DPOLYCLIP_LONG64="signed long long" -DPOLYCLIP_ULONG64="unsigned long long"  -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include  -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include -fPIC  -DU_STATIC_IMPLEMENTATION -Wall -mtune=core2 -g -O2 -I/opt/X11/include -c clipper.cpp -o clipper.o
/usr/local/clang4/bin/clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib/gcc/7 -o polyclip.so init.o interface.o clipper.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/3.5.0-MRO/Resources/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)
baddstats commented 6 years ago

Sorry, we don't run any Microsoft systems, so we cannot debug this. The development version of polyclip is currently identical to the CRAN version (1.9-0). The CRAN version passes all the CRAN checks under Windows. So this would appear to be a problem with "Microsoft R Open".

baddstats commented 6 years ago

Sorry, I meant that the CRAN version of polyclip passes all the CRAN package checks on MacOS using the definitive version of R for MacOS. So this would appear to be a problem with "Microsoft R Open for MacOS" which we don't support.

rubak commented 6 years ago

Furthermore, I think you should report this to Microsoft R Open since I believe they aim at supporting all CRAN packages that work in GNU R, so they are probably interested in tracking down the problem. As @baddstats points out there isn't much we can do about it at this point.