Giter Club home page Giter Club logo

Comments (9)

vissarion avatar vissarion commented on August 30, 2024

Which of the following commands yield that error? Could you share more information about the error returned?
EDIT: do you have similar problems with the CRAN package?

from volesti.

vaithak avatar vaithak commented on August 30, 2024

I get the error after running devtools::install(), error log:

copula.cpp:11:ed from 
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppEigen/include/RcppEigenForward.h:40:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppEigen/include/unsupported/Eigen/SparseExtra:51:
/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppEigen/include/unsupported/Eigen/../../Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
copula.cpp:13:10: fatal error: 'ellipsoids.h' file not found
#include "ellipsoids.h"
         ^~~~~~~~~~~~~~
17 warnings and 1 error generated.
make: *** [copula.o] Error 1
ERROR: compilation failed for package ‘volesti’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/volesti’
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  : 
  System command error

I have not yet tried with CRAN package.

from volesti.

vissarion avatar vissarion commented on August 30, 2024

Are trying to build the develop branch ? Which compiler/version? (it seems you are using clang)

from volesti.

vaithak avatar vaithak commented on August 30, 2024

Yes, I am compiling the develop branch.
Compiler: Apple clang version 11.0.0 (clang-1100.0.33.8)

from volesti.

TolisChal avatar TolisChal commented on August 30, 2024

Please open with R studio the file volesti.Rproj in 'root/R-proj` file to be sure that the working directory has been set correctly and then run:

Rcpp::compileAttributes()
library(devtools)
devtools::build()
devtools::install()
library(volesti)

Please report possible errors.

from volesti.

vaithak avatar vaithak commented on August 30, 2024

Same errors:

In file included from copula.cpp:11:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppEigen/include/RcppEigenForward.h:40:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppEigen/include/unsupported/Eigen/SparseExtra:51:
/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppEigen/include/unsupported/Eigen/../../Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma clang diagnostic pop
                             ^
copula.cpp:13:10: fatal error: 'ellipsoids.h' file not found
#include "ellipsoids.h"
         ^~~~~~~~~~~~~~
17 warnings and 1 error generated.
make: *** [copula.o] Error 1
ERROR: compilation failed for package ‘volesti’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/volesti’
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  : 
  System command error

from volesti.

vaithak avatar vaithak commented on August 30, 2024

Hi, I tried building the package again, this time with gcc but still same error. I think this is an error in devtools which was introduced in macOS Mojave or Catalina.
A point to note is that, if I run the following command from bash in src folder, then there is no error, but the same command when ran through devtools::build gives error.

g++ -std=c++11 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../../external/boost -I../../external/LPsolve_src/run_headers -I../../external/minimum_ellipsoid -I../../include -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include' -I/usr/local/include  -lm -ldl -Wno-ignored-attributes -DBOOST_NO_AUTO_PTR -DDISABLE_NLP_ORACLES -fPIC  -Wall -g -O2  -c copula.cpp -o copula.o

I tried changing the -I path in Makevars file from relative to absolute path, then there was no error.

PKG_CPPFLAGS= -I$(HOME)/volume_approximation/external/boost -I$(HOME)/volume_approximation/external/LPsolve_src/run_headers -I$(HOME)/volume_approximation/external/minimum_ellipsoid -I$(HOME)/volume_approximation/include

I think this can solve the issue but is there a way of using the absolute path without hardcoding it in the Makevars like above.

from volesti.

vissarion avatar vissarion commented on August 30, 2024

@vaithak does #137 solves your issue?

from volesti.

vaithak avatar vaithak commented on August 30, 2024

I debugged this issue properly today, #137 helped a little, but the main issue was with macOS. Firstly, I had to follow the steps here: https://cmichel.io/fixing-cpp-compilation-bugs-for-the-mac-os-catalina-upgrade/ to fix the issue with Catalina. Other than this, GCC was not using the colamd.h in external/LPsolve_src/include but instead using the system installed one in /usr/local/include which had some issues. After fixing this, it worked fine :)

Closing the issue now.

from volesti.

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.