I am using Ubuntu 18.04 and tried to install rjsoncons in R version 4.3.3 and encountered the following errors:
install.packages("rjsoncons", repos = "https://CRAN.R-project.org")
Installing package into ‘/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
trying URL 'https://CRAN.R-project.org/src/contrib/rjsoncons_1.2.0.tar.gz'
Content type 'application/x-gzip' length 578073 bytes (564 KB)
==================================================
downloaded 564 KB
* installing *source* package ‘rjsoncons’ ...
** package ‘rjsoncons’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0’
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -I../inst/include/ -I'/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-WnOgSi/r-base-4.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c cpp11.cpp -o cpp11.o
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -I../inst/include/ -I'/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include' -fpic -g -O2 -fdebug-prefix-map=/build/r-base-WnOgSi/r-base-4.3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c rjsoncons.cpp -o rjsoncons.o
In file included from rjsoncons.cpp:8:0:
j_as.h: In function ‘cpp11::sexp as_r(Json)’:
j_as.h:165:22: error: reference to ‘writable’ is ambiguous
result = writable::list(j.size()); // default: NULL elements
^~~~~~~~
In file included from rjsoncons.cpp:1:0:
/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/declarations.hpp:14:39: note: candidates are: namespace writable = cpp11::cpp11::writable;
namespace writable = ::cpp11::writable;
^
In file included from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/list.hpp:10:0,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/data_frame.hpp:12,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11.hpp:7,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/declarations.hpp:13,
from rjsoncons.cpp:1:
/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/r_vector.hpp:44:11: note: namespace cpp11::writable { }
namespace writable {
^~~~~~~~
In file included from rjsoncons.cpp:8:0:
j_as.h:169:22: error: parse error in template argument list
result = j_as_r_vector<writable::logicals, bool>(j);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
j_as.h:173:22: error: parse error in template argument list
result = j_as_r_vector<writable::integers, int32_t>(j);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
j_as.h:177:22: error: parse error in template argument list
result = j_as_r_vector<writable::doubles, double>(j);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
j_as.h:181:22: error: parse error in template argument list
result = j_as_r_vector<writable::strings, std::string>(j);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
j_as.h:186:13: error: reference to ‘writable’ is ambiguous
writable::list value(j.size());
^~~~~~~~
In file included from rjsoncons.cpp:1:0:
/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/declarations.hpp:14:39: note: candidates are: namespace writable = cpp11::cpp11::writable;
namespace writable = ::cpp11::writable;
^
In file included from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/list.hpp:10:0,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/data_frame.hpp:12,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11.hpp:7,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/declarations.hpp:13,
from rjsoncons.cpp:1:
/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/r_vector.hpp:44:11: note: namespace cpp11::writable { }
namespace writable {
^~~~~~~~
In file included from rjsoncons.cpp:8:0:
j_as.h:188:67: error: ‘value’ was not declared in this scope
j.array_range().cbegin(), j.array_range().cend(), value.begin(),
^~~~~
j_as.h:188:67: note: suggested alternative: ‘valloc’
j.array_range().cbegin(), j.array_range().cend(), value.begin(),
^~~~~
valloc
j_as.h:196:9: error: reference to ‘writable’ is ambiguous
writable::list value(j.size());
^~~~~~~~
In file included from rjsoncons.cpp:1:0:
/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/declarations.hpp:14:39: note: candidates are: namespace writable = cpp11::cpp11::writable;
namespace writable = ::cpp11::writable;
^
In file included from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/list.hpp:10:0,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/data_frame.hpp:12,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11.hpp:7,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/declarations.hpp:13,
from rjsoncons.cpp:1:
/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/r_vector.hpp:44:11: note: namespace cpp11::writable { }
namespace writable {
^~~~~~~~
In file included from rjsoncons.cpp:8:0:
j_as.h:197:9: error: reference to ‘writable’ is ambiguous
writable::strings names(j.size());
^~~~~~~~
In file included from rjsoncons.cpp:1:0:
/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/declarations.hpp:14:39: note: candidates are: namespace writable = cpp11::cpp11::writable;
namespace writable = ::cpp11::writable;
^
In file included from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/list.hpp:10:0,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/data_frame.hpp:12,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11.hpp:7,
from /home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/declarations.hpp:13,
from rjsoncons.cpp:1:
/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/cpp11/include/cpp11/r_vector.hpp:44:11: note: namespace cpp11::writable { }
namespace writable {
^~~~~~~~
In file included from rjsoncons.cpp:8:0:
j_as.h:202:13: error: ‘names’ was not declared in this scope
names[i] = it->key();
^~~~~
j_as.h:203:13: error: ‘value’ was not declared in this scope
value[i] = as_r(it->value());
^~~~~
j_as.h:206:9: error: ‘value’ was not declared in this scope
value.names() = names;
^~~~~
j_as.h:206:25: error: ‘names’ was not declared in this scope
value.names() = names;
^~~~~
/usr/lib/R/etc/Makeconf:200: recipe for target 'rjsoncons.o' failed
make: *** [rjsoncons.o] Error 1
ERROR: compilation failed for package ‘rjsoncons’
* removing ‘/home/ignatius/R/x86_64-pc-linux-gnu-library/4.3/rjsoncons’
The downloaded source packages are in
‘/tmp/Rtmppa0z3X/downloaded_packages’
Warning message:
In install.packages("rjsoncons", repos = "https://CRAN.R-project.org") :
installation of package ‘rjsoncons’ had non-zero exit status
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4