Closed akitepowell closed 7 years ago
In Linux you need the udunits2 library installed - check the travis script in ggforce for the correct command
Ok, thank you. The library for udunits2 is installed now, but we are still getting the errors in Rstudio. I've used the config args to try to get it to work, but to no avail as of yet. We'll troubleshoot more tomorrow. install.packages("ggforce", configure.args="--with-udunits2-lib=/usr/lib64--with-udunits2-include=/usr/including/udunits2")
Installing ggforce fails on Windows 8.1 too. It seems there is a call to the udunits2 library without it being listed as a requirement and thus may not be installed. I installed udunits2 manually, but ggraph still fails with a weird error:
> devtools::install_github('thomasp85/ggraph')
Downloading GitHub repo thomasp85/ggraph@master
from URL https://api.github.com/repos/thomasp85/ggraph/zipball/master
Installing ggraph
"C:/PROGRA~1/R/R-3.3.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/Emil/AppData/Local/Temp/Rtmp6ZxnXj/devtools20784fd71113/thomasp85-ggraph-777a81d" \
--library="C:/Users/Emil/Documents/R/win-library/3.3" --install-tests
* installing *source* package 'ggraph' ...
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-3.3.2/include" -DNDEBUG -I"C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
c:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-3.3.2/include" -DNDEBUG -I"C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -mtune=core2 -c circlePack.cpp -o circlePack.o
circlePack.cpp: In function 'std::vector<NodePack*> createHierarchy(std::vector<int>, std::vector<double>)':
circlePack.cpp:378:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < parent.size(); ++i) {
^
circlePack.cpp:382:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < parent.size(); ++i) {
^
circlePack.cpp: In function 'int findTopNode(std::vector<NodePack*>&)':
circlePack.cpp:392:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < nodes.size(); ++i) {
^
circlePack.cpp: In function 'Rcpp::NumericMatrix pack(Rcpp::NumericVector)':
circlePack.cpp:444:73: warning: narrowing conversion of '(circles.std::deque<_Tp, _Alloc>::size<Circle, std::allocator<Circle> >() + 1u)' from 'std::deque<Circle>::size_type {aka unsigned int}' to 'int' inside { } is ill-formed in C++11 [-Wnarrowing]
Circle c = {0, 0, std::sqrt(float(*itr / M_PI)), circles.size() + 1};
^
circlePack.cpp: In function 'Rcpp::NumericMatrix circlePackLayout(Rcpp::IntegerVector, Rcpp::NumericVector)':
circlePack.cpp:476:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < nodes.size(); ++i) {
^
c:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-3.3.2/include" -DNDEBUG -I"C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -mtune=core2 -c iciclePlot.cpp -o iciclePlot.o
In file included from iciclePlot.cpp:2:0:
nodes.h: In member function 'std::vector<Node*> Node::getChildren()':
nodes.h:45:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < children.size(); ++i) {
^
iciclePlot.cpp: In function 'std::vector<Node*> createHierarchy(std::vector<int>, std::vector<int>, std::vector<double>, std::vector<double>)':
iciclePlot.cpp:8:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < parent.size(); ++i) {
^
iciclePlot.cpp:12:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < parent.size(); ++i) {
^
iciclePlot.cpp: In function 'void icicleLayout(Node*, double, double)':
iciclePlot.cpp:26:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < children.size(); i++) {
^
iciclePlot.cpp: In function 'Rcpp::NumericMatrix partitionTree(Rcpp::IntegerVector, Rcpp::IntegerVector, Rcpp::NumericVector, Rcpp::NumericVector)':
iciclePlot.cpp:40:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < nodes.size(); ++i) {
^
iciclePlot.cpp:47:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < nodes.size(); ++i) {
^
c:/Rtools/mingw_32/bin/g++ -I"C:/PROGRA~1/R/R-3.3.2/include" -DNDEBUG -I"C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -mtune=core2 -c lineCutter.cpp -o lineCutter.o
lineCutter.cpp: In function 'Point ellipsis_intersection(Point, Point, double, double)':
lineCutter.cpp:90:9: error: 'copysign' is not a member of 'std'
x = std::copysign(x, pX);
^
lineCutter.cpp:90:9: note: suggested alternative:
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath:44:0,
from C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include/Rcpp/platform/compiler.h:100,
from C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include/Rcpp/r/headers.h:48,
from C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include/RcppCommon.h:29,
from C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include/Rcpp.h:27,
from lineCutter.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/math.h:913:31: note: 'copysign'
__CRT_INLINE double __cdecl copysign (double x, double y)
^
lineCutter.cpp:91:9: error: 'copysign' is not a member of 'std'
y = std::copysign(y, pY);
^
lineCutter.cpp:91:9: note: suggested alternative:
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath:44:0,
from C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include/Rcpp/platform/compiler.h:100,
from C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include/Rcpp/r/headers.h:48,
from C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include/RcppCommon.h:29,
from C:/Users/Emil/Documents/R/win-library/3.3/Rcpp/include/Rcpp.h:27,
from lineCutter.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/math.h:913:31: note: 'copysign'
__CRT_INLINE double __cdecl copysign (double x, double y)
^
make: *** [lineCutter.o] Error 1
Warning: running command 'make -f "C:/PROGRA~1/R/R-3.3.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-3.3.2/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="ggraph.dll" OBJECTS="RcppExports.o circlePack.o iciclePlot.o lineCutter.o pathAttr.o treemap.o"' had status 2
ERROR: compilation failed for package 'ggraph'
* removing 'C:/Users/Emil/Documents/R/win-library/3.3/ggraph'
Error: Command failed (1)
I tried installing treemap manually too. Did not change anything. I tried googling various parts of this error. No hits.
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C
[5] LC_TIME=Danish_Denmark.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] httr_1.2.1 R6_2.2.0 tools_3.3.2 withr_1.0.2 curl_2.3 memoise_1.0.0 git2r_0.18.0 digest_0.6.12
[9] devtools_1.12.0
@akitepowell I suggest you take this to the units developers as it is now too complicated an issue for me to help with.
@Deleetdk Another time please start a new issue instead of adding unrelated problems to this. In this particular case it was related to different compilers on different systems and should've been fixed now
I thought it might be related that's why I added it here.
No worries - has the issue been fixed?
@thomasp85 no. Here's the new issue. https://github.com/thomasp85/ggraph/issues/37
ubuntu 18.04 LTS --from coder atongsa ^_^
sudo apt update
sudo apt install libudunits2-dev
Just to corroborate, it worked like a charm for me on ububtu 18.04 and R 3.5.1
To add a tad of knowledge: in Arch based systems, the units library is called udunits (without the 2). Once installed, everything is smooth and happy.
Hi, In our Rstudio server pro (redhat linux) environment we can't seem to install ggforce or ggraph because of configuration failures for the udunits2 package. I realize you aren't the maintainer of udunits2, but was curious if you've heard this before and/or knew of some solution. I've been in touch with udunits2 maintainer, but haven't heard back from them.
ERROR: configuration failed for package ‘udunits2’
Thankfully this doesn't appear to be a problem on local windows desktop installations, but it would be nice to have this working on Rstudio server pro too.
Thanks, Aaron