renozao / RcppOctave

Seamless Interface to Octave -- and Matlab code
18 stars 9 forks source link

Compilation error with development Octave #20

Open nir-krakauer opened 4 years ago

nir-krakauer commented 4 years ago

New versions of Octave (beginning with the soon to be released version 6, cf. http://hg.savannah.gnu.org/hgweb/octave/rev/80c42f4cca13 ) have replaced the is_empty operation for octave_value types with isempty. The error message from install_github('renozao/RcppOctave') with R 3.6.3 and the current Octave development version installed begins

   g++ -std=gnu++11 -c -I/usr/include/suitesparse -fPIC -I/home/nir/my_octave/include/octave-7.0.0/octave/.. -I/home/nir/my_octave/include/octave-7.0.0/octave -I/home/nir/my_octave/include  -pthread -fopenmp -g -O2   -I/usr/share/R/include  Rrng.cc -o /tmp/oct-znC1OH.o
   Rrng.cc: In function ‘octave_value_list Frand(const octave_value_list&, int)’:
   Rrng.cc:163:45: error: ‘const class octave_value’ has no member named ‘is_empty’; did you mean ‘isempty’?
     163 |   k = ( nargs > iarg_col && !args(iarg_col).is_empty() ? long(args(iarg_col).double_value()) : n);\
         |                                             ^~~~~~~~
   Rrng.cc:181:1: note: in expansion of macro ‘RAND_ARGS’
     181 | RAND_ARGS(octave_fun, 0, 2, 0, 1) \
         | ^~~~~~~~~
   Rrng.cc:196:3: note: in expansion of macro ‘RAND_FUNCTION’
     196 |   RAND_FUNCTION(unif_rand, "rand")
         |   ^~~~~~~~~~~~~
   Rrng.cc: In function ‘octave_value_list Frandn(const octave_value_list&, int)’:
   Rrng.cc:163:45: error: ‘const class octave_value’ has no member named ‘is_empty’; did you mean ‘isempty’?
     163 |   k = ( nargs > iarg_col && !args(iarg_col).is_empty() ? long(args(iarg_col).double_value()) : n);\
         |                                             ^~~~~~~~
   Rrng.cc:181:1: note: in expansion of macro ‘RAND_ARGS’
     181 | RAND_ARGS(octave_fun, 0, 2, 0, 1) \
         | ^~~~~~~~~
   Rrng.cc:207:2: note: in expansion of macro ‘RAND_FUNCTION’
     207 |  RAND_FUNCTION(norm_rand, "randn")
         |  ^~~~~~~~~~~~~
   Rrng.cc: In function ‘octave_value_list Frande(const octave_value_list&, int)’:
   Rrng.cc:163:45: error: ‘const class octave_value’ has no member named ‘is_empty’; did you mean ‘isempty’?