Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure Compilation using C++ 11 under MRO + Ubuntu + geospatial #32

Closed
ismailsunni opened this issue Nov 11, 2019 · 5 comments
Closed

Comments

@ismailsunni
Copy link
Owner

Failed to install packages that need polyclip
Error message:

* installing *source* package ‘polyclip’ ...
** package ‘polyclip’ successfully unpacked and MD5 sums checked
compiling under C++11
checking whether the C++ compiler works... no
configure: error: in `/tmp/RtmpxuvQGf/R.INSTALL1a21e027aa/polyclip':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘polyclip’
* removing ‘/opt/microsoft/ropen/3.5.3/lib64/R/library/polyclip’
@nuest
Copy link
Contributor

nuest commented Nov 11, 2019

Not sure what you have tried already to fix this, please document the approaches already tested.

Maybe this helps: Maybe this helps: baddstats/polyclip#14

@ismailsunni
Copy link
Owner Author

Hi @nuest
I thought it was a more generic compiler problem, so I tried to fix from the compiler perspective. I did:

  • reinstall gcc
  • run get install build-essential
    and some other.

I tried to install it by manually download the source, unpack it, and install it by using the devtool, and it works.

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

@ismailsunni
Copy link
Owner Author

Thanks for the hint!

@nuest
Copy link
Contributor

nuest commented Jan 9, 2020

@ismailsunni I also saw the source file installation for polyclip in the FastR Debian Geospatial image - is that really necessary there or a copy and paste artefact?

@ismailsunni
Copy link
Owner Author

Hi @nuest
On FastR 3.6.1 Debian Geospatial, it is necessary.

ismailsunni@konrosoup:~/dev/docker/dockeRs/fastr-3.6.1-debian$ make run-dockeRs 
Run FastR 3.6.1 on Debian Docker image.
docker run  -it --rm ismailsunni/fastr-3.6.1-debian R
R version 3.6.1 (FastR)
Copyright (c) 2013-19, Oracle and/or its affiliates
Copyright (c) 1995-2018, The R Core Team
Copyright (c) 2018 The R Foundation for Statistical Computing
Copyright (c) 2012-4 Purdue University
Copyright (c) 1997-2002, Makoto Matsumoto and Takuji Nishimura
All rights reserved.

FastR is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information.

Type 'q()' to quit R.
> install
install.fastr.packages   install.packages         installed.packages       
> install.packages('polyclip')
Content type 'application/octet-stream' length 79048 bytes (77 KB)
Warning: untar(compressed=) is deprecated
* installing *source* package ?polyclip? ...
** package ?polyclip? successfully unpacked and MD5 sums checked
** using staged installation
compiling under C++11
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++ -std=gnu++11 accepts -g... yes
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
/fastr/bin/llvm-cc -I"/fastr/include" -DNDEBUG -DPOLYCLIP_LONG64="signed long long" -DPOLYCLIP_ULONG64="unsigned long long"  -I/usr/local/include -DFASTR -DNO_GNUR  -fpic   -fno-inline-functions -g   -fPIC -DFASTR -DNO_GNUR -c init.c -o init.o
g++ -std=gnu++11 -I"/fastr/include" -DNDEBUG -DPOLYCLIP_LONG64="signed long long" -DPOLYCLIP_ULONG64="unsigned long long"  -I/usr/local/include -DFASTR -DNO_GNUR -g -fPIC -fpic  -g   -fPIC -c interface.cpp -o interface.o
g++ -std=gnu++11 -I"/fastr/include" -DNDEBUG -DPOLYCLIP_LONG64="signed long long" -DPOLYCLIP_ULONG64="unsigned long long"  -I/usr/local/include -DFASTR -DNO_GNUR -g -fPIC -fpic  -g   -fPIC -c clipper.cpp -o clipper.o
g++ -std=gnu++11 -Wl,-rpath,/fastr/lib/,-rpath,/fastr/../llvm/native/lib -L/fastr/lib -lf2c -shared -lR -Wl,-rpath,/fastr/lib/,-rpath,/fastr/../llvm/native/lib -L/fastr/lib -lf2c -L/usr/local/lib -o polyclip.so init.o interface.o clipper.o
init.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make: *** [/fastr/share/make/shlib.mk:6: polyclip.so] Error 1
ERROR: compilation failed for package ?polyclip?
* removing ?/fastr/library/polyclip?


The downloaded source packages are in
        ?/tmp/RtmpvJ2hcI/downloaded_packages?
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("polyclip") :
  installation of package ?polyclip? had non-zero exit status

For FastR 3.4.0 Debian Geospatial, it is not needed, that's why I comment it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants