Git Product home page Git Product logo

Comments (10)

atongsa avatar atongsa commented on August 9, 2024 5

ubuntu 18.04 LTS --from coder atongsa ^_^

sudo apt update
sudo apt install libudunits2-dev

from ggraph.

thomasp85 avatar thomasp85 commented on August 9, 2024 2

In Linux you need the udunits2 library installed - check the travis script in ggforce for the correct command

from ggraph.

akitepowell avatar akitepowell commented on August 9, 2024

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

from ggraph.

Deleetdk avatar Deleetdk commented on August 9, 2024

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

from ggraph.

thomasp85 avatar thomasp85 commented on August 9, 2024

@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

from ggraph.

Deleetdk avatar Deleetdk commented on August 9, 2024

I thought it might be related that's why I added it here.

from ggraph.

thomasp85 avatar thomasp85 commented on August 9, 2024

No worries - has the issue been fixed?

from ggraph.

Deleetdk avatar Deleetdk commented on August 9, 2024

@thomasp85 no. Here's the new issue. #37

from ggraph.

zyxdef avatar zyxdef commented on August 9, 2024

Just to corroborate, it worked like a charm for me on ububtu 18.04 and R 3.5.1

from ggraph.

gvdr avatar gvdr commented on August 9, 2024

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.

from ggraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.