I am pretty new to Linux and I am having problems integrating an external software into my program. I am following the instructions on integrating a couple of lines that show step by step integration of the software they are listed in the Application development section here.
I got through some of the instruction [I removed Jansson] and I have separately tested the package independent and build it thus it works outside. The problem is when intergrating after make install command it shows these errors:
Scanning dependencies of target g4sipm_sample
[ 63%] Building CXX object externals/g4sipm/sample/CMakeFiles/g4sipm_sample.dir/src/ActionInitialization.cc.o
/home/abhinab1/goddess/source/externals/g4sipm/sample/src/ActionInitialization.cc: In member function ‘virtual void ActionInitialization::Build() const’:
/home/abhinab1/goddess/source/externals/g4sipm/sample/src/ActionInitialization.cc:45:38: error: no matching function for call to ‘RunAction::RunAction(const string&)’
45 | SetUserAction(new RunAction(filename));
| ^
In file included from /home/abhinab1/goddess/source/externals/g4sipm/sample/src/ActionInitialization.cc:21:
/home/abhinab1/goddess/source/Simulation/include/DataProcessing/RunAction.hh:35:2: note: candidate: ‘RunAction::RunAction(SimulationMessenger*)’
35 | RunAction( SimulationMessenger * simulationMessenger /**< class storing and providing variables which are needed in different parts of the simulation. */
| ^~~~~~~~~
/home/abhinab1/goddess/source/Simulation/include/DataProcessing/RunAction.hh:35:35: note: no known conversion for argument 1 from ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to ‘SimulationMessenger*’
35 | RunAction( SimulationMessenger * simulationMessenger /**< class storing and providing variables which are needed in different parts of the simulation. */
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/abhinab1/goddess/source/Simulation/include/DataProcessing/RunAction.hh:26:7: note: candidate: ‘constexpr RunAction::RunAction(const RunAction&)’
26 | class RunAction : public G4UserRunAction
| ^~~~~~~~~
/home/abhinab1/goddess/source/Simulation/include/DataProcessing/RunAction.hh:26:7: note: no known conversion for argument 1 from ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to ‘const RunAction&’
/home/abhinab1/goddess/source/externals/g4sipm/sample/src/ActionInitialization.cc:46:20: error: no matching function for call to ‘EventAction::EventAction()’
46 | SetUserAction(new EventAction);
| ^~~~~~~~~~~
In file included from /home/abhinab1/goddess/source/externals/g4sipm/sample/src/ActionInitialization.cc:20:
/home/abhinab1/goddess/source/Simulation/include/DataProcessing/EventAction.hh:38:2: note: candidate: ‘EventAction::EventAction(SimulationMessenger*)’
38 | EventAction( SimulationMessenger * simulationMessenger /**< class storing and providing variables which are needed in different parts of the simulation. */
| ^~~~~~~~~~~
/home/abhinab1/goddess/source/Simulation/include/DataProcessing/EventAction.hh:38:2: note: candidate expects 1 argument, 0 provided
/home/abhinab1/goddess/source/Simulation/include/DataProcessing/EventAction.hh:30:7: note: candidate: ‘constexpr EventAction::EventAction(const EventAction&)’
30 | class EventAction : public G4UserEventAction
| ^~~~~~~~~~~
/home/abhinab1/goddess/source/Simulation/include/DataProcessing/EventAction.hh:30:7: note: candidate expects 1 argument, 0 provided
/home/abhinab1/goddess/source/externals/g4sipm/sample/src/ActionInitialization.cc:52:57: error: ‘const class DetectorConstruction’ has no member named ‘getSipmModel’
52 | ParticleSourceMessenger::getInstance()->setA(detector->getSipmModel()->getPitch());
| ^~~~~~~~~~~~
/home/abhinab1/goddess/source/externals/g4sipm/sample/src/ActionInitialization.cc:53:57: error: ‘const class DetectorConstruction’ has no member named ‘getSipmModel’
53 | ParticleSourceMessenger::getInstance()->setB(detector->getSipmModel()->getPitch());
Here are the changes that I made in my CMakeFile.txt:
add_subdirectory(externals/g4sipm)
include_directories(externals/g4sipm/g4sipm/include)
include_directories(externals/g4sipm/externals/gtest/include)
# Export sims data
include_directories(externals/g4sipm/sample/include)
set(LIBS ${LIBS} boost_program_options g4sipm g4sipm_sample boost_date_time jansson)
target_link_libraries(RunSimulation g4sipm boost_date_time)
I tried contacting the project lead however it seems they have all moved on from the project. Any help and suggestions would be greatly appreciated, thank you!
EDIT: I made a small mistake as I added
include_directories(externals/g4sipm/sample)
in the Checklist.txt which I removed.
The errors are reduced but not gone I have put the updated terminal output above.
Related
I have an object qp that is defined as
#include <proxsuite/proxqp/dense/dense.hpp>
namespace fr3_ros {
class WaypointController : public controller_interface::MultiInterfaceController<franka_hw::FrankaModelInterface,
hardware_interface::EffortJointInterface,
franka_hw::FrankaStateInterface> {
...
private:
proxsuite::proxqp::isize dim = 14;
proxsuite::proxqp::isize n_eq = 7;
proxsuite::proxqp::isize n_in = 0;
proxsuite::proxqp::dense::QP<double> qp(dim, n_eq, n_in);
...
}
From the documetation here controller_interface::MultiInterfaceController has the constructor
MultiInterfaceController (bool allow_optional_interfaces=false)
Since I did not define a new constructor, that would be the only constructor WaypointController has.
However, if I put this in the header file it would give me an error when compiling:
In file included from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:1:
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:113:43: error: ‘dim’ is not a type
113 | proxsuite::proxqp::dense::QP<double> qp(dim, n_eq, n_in);
| ^~~
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:113:48: error: ‘n_eq’ is not a type
113 | proxsuite::proxqp::dense::QP<double> qp(dim, n_eq, n_in);
| ^~~~
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:113:54: error: ‘n_in’ is not a type
113 | proxsuite::proxqp::dense::QP<double> qp(dim, n_eq, n_in);
| ^~~~
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp: In member function ‘virtual void fr3_ros::WaypointController::update(const ros::Time&, const ros::Duration&)’:
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:225:5: error: invalid use of member function ‘proxsuite::proxqp::dense::QP<double> fr3_ros::WaypointController::qp(int, int, int)’ (did you forget the ‘()’ ?)
225 | qp.update(qp_H, qp_g, qp_A, qp_b, std::nullopt, std::nullopt, std::nullopt);
| ^~
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:227:5: error: invalid use of member function ‘proxsuite::proxqp::dense::QP<double> fr3_ros::WaypointController::qp(int, int, int)’ (did you forget the ‘()’ ?)
227 | qp.init(qp_H, qp_g, qp_A, qp_b, std::nullopt, std::nullopt, std::nullopt);
| ^~
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:230:3: error: invalid use of member function ‘proxsuite::proxqp::dense::QP<double> fr3_ros::WaypointController::qp(int, int, int)’ (did you forget the ‘()’ ?)
230 | qp.solve();
| ^~
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:232:13: error: invalid use of member function ‘proxsuite::proxqp::dense::QP<double> fr3_ros::WaypointController::qp(int, int, int)’ (did you forget the ‘()’ ?)
232 | torques = qp.results.x.bottomLeftCorner(7, 1);
| ^~
I also tried separating the declaration and definition, in the header file I have
proxsuite::proxqp::isize dim = 14;
proxsuite::proxqp::isize n_eq = 7;
proxsuite::proxqp::isize n_in = 0;
proxsuite::proxqp::dense::QP<double> qp;
and in the source file I have
qp = proxsuite::proxqp::dense::QP<double>(dim, n_eq, n_in);
this gives me another error
In file included from /opt/ros/noetic/include/class_loader/class_loader_core.hpp:45,
from /opt/ros/noetic/include/class_loader/class_loader.hpp:46,
from /opt/ros/noetic/include/pluginlib/class_list_macros.hpp:40,
from /opt/ros/noetic/include/pluginlib/class_list_macros.h:35,
from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:13:
/opt/ros/noetic/include/class_loader/meta_object.hpp: In instantiation of ‘B* class_loader::impl::MetaObject<C, B>::create() const [with C = fr3_ros::WaypointController; B = controller_interface::ControllerBase]’:
/opt/ros/noetic/include/class_loader/meta_object.hpp:196:7: required from here
/opt/ros/noetic/include/class_loader/meta_object.hpp:198:12: error: use of deleted function ‘fr3_ros::WaypointController::WaypointController()’
198 | return new C;
| ^~~~~
In file included from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:1:
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:36:7: note: ‘fr3_ros::WaypointController::WaypointController()’ is implicitly deleted because the default definition would be ill-formed:
36 | class WaypointController : public controller_interface::MultiInterfaceController<franka_hw::FrankaModelInterface,
| ^~~~~~~~~~~~~~~~~~
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:36:7: error: no matching function for call to ‘proxsuite::proxqp::dense::QP<double>::QP()’
In file included from /home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/dense.hpp:8,
from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:31,
from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:1:
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:94:3: note: candidate: ‘proxsuite::proxqp::dense::QP<T>::QP(proxsuite::linalg::veg::isize, proxsuite::linalg::veg::isize, proxsuite::linalg::veg::isize) [with T = double; proxsuite::linalg::veg::isize = long int]’
94 | QP(isize _dim, isize _n_eq, isize _n_in)
| ^~
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:94:3: note: candidate expects 3 arguments, 0 provided
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:81:8: note: candidate: ‘proxsuite::proxqp::dense::QP<double>::QP(const proxsuite::proxqp::dense::QP<double>&)’
81 | struct QP
| ^~
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:81:8: note: candidate expects 1 argument, 0 provided
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:81:8: note: candidate: ‘proxsuite::proxqp::dense::QP<double>::QP(proxsuite::proxqp::dense::QP<double>&&)’
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:81:8: note: candidate expects 1 argument, 0 provided
If I add extern in the header file, I get the error
In file included from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:1:
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:113:3: error: storage class specified for ‘qp’
113 | extern proxsuite::proxqp::dense::QP<double> qp;
| ^~~~~~
In file included from /opt/ros/noetic/include/class_loader/class_loader_core.hpp:45,
from /opt/ros/noetic/include/class_loader/class_loader.hpp:46,
from /opt/ros/noetic/include/pluginlib/class_list_macros.hpp:40,
from /opt/ros/noetic/include/pluginlib/class_list_macros.h:35,
from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:13:
/opt/ros/noetic/include/class_loader/meta_object.hpp: In instantiation of ‘B* class_loader::impl::MetaObject<C, B>::create() const [with C = fr3_ros::WaypointController; B = controller_interface::ControllerBase]’:
/opt/ros/noetic/include/class_loader/meta_object.hpp:196:7: required from here
/opt/ros/noetic/include/class_loader/meta_object.hpp:198:12: error: use of deleted function ‘fr3_ros::WaypointController::WaypointController()’
198 | return new C;
| ^~~~~
In file included from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:1:
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:36:7: note: ‘fr3_ros::WaypointController::WaypointController()’ is implicitly deleted because the default definition would be ill-formed:
36 | class WaypointController : public controller_interface::MultiInterfaceController<franka_hw::FrankaModelInterface,
| ^~~~~~~~~~~~~~~~~~
/home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:36:7: error: no matching function for call to ‘proxsuite::proxqp::dense::QP<double>::QP()’
In file included from /home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/dense.hpp:8,
from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/include/fr3_ros/waypoint_controller.h:31,
from /home/bolun/bolun_ws/src/fr3_ros/fr3_ros/src/waypoint_controller.cpp:1:
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:94:3: note: candidate: ‘proxsuite::proxqp::dense::QP<T>::QP(proxsuite::linalg::veg::isize, proxsuite::linalg::veg::isize, proxsuite::linalg::veg::isize) [with T = double; proxsuite::linalg::veg::isize = long int]’
94 | QP(isize _dim, isize _n_eq, isize _n_in)
| ^~
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:94:3: note: candidate expects 3 arguments, 0 provided
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:81:8: note: candidate: ‘proxsuite::proxqp::dense::QP<double>::QP(const proxsuite::proxqp::dense::QP<double>&)’
81 | struct QP
| ^~
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:81:8: note: candidate expects 1 argument, 0 provided
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:81:8: note: candidate: ‘proxsuite::proxqp::dense::QP<double>::QP(proxsuite::proxqp::dense::QP<double>&&)’
/home/bolun/miniconda3/envs/fr3_env/include/proxsuite/proxqp/dense/wrapper.hpp:81:8: note: candidate expects 1 argument, 0 provided
Is it possible for someone to help me understand what is the issue here? Is the a universal issue in C++ or is it just this package?
Thanks in advance!
If I were to intialize qp using a member initialize list, should it look like:
public:
WaypointController()
: dim(14), neq(7), n_in(0), qp(dim, n_eq, n_in)
{
}
The error message you're getting is not particularly helpful here, but let me explain it anyways, so you understand what's going on.
C++ believes that you're trying to declare a function, not define a variable.
proxsuite::proxqp::dense::QP<double> qp(dim, n_eq, n_in);
The return type is proxsuite::proxqp::dense::QP<double>, the function's name is qp, and it takes 3 parameters, of types dim, n_eq, and n_in.
The fact that this is not what you intended in entirely irrelevant.
Knowing this, your error messages make a lot more sense.
The solution to this is to declare the field in the header file, like so:
proxsuite::proxqp::dense::QP<double> qp;
And then to you need to initialize qp in your constructor. Use a member initialization list for this.
Disclaimer: I haven't done C/C++ in ages and have decided to dive into the deeper end here.
I'm attempting to build esp32-opencv which is basically a version of OpenCV with some necessary changes for the ESP32.
I'm seeing the following error on make that isn't referenced in that project:
esp32-opencv/modules/core/src/softfloat.cpp:3537:107: error: call of overloaded 'softdouble(int)' is ambiguous
3537 | static const float64_t exp_prescale = float64_t::fromRaw(0x3ff71547652b82fe) * float64_t(1 << EXPTAB_SCALE);
| ^
In file included from esp32-opencv/modules/core/src/softfloat.cpp:68:
esp32-opencv/modules/core/include/opencv2/core/softfloat.hpp:257:14: note: candidate: 'cv::softdouble::softdouble(double)'
257 | explicit softdouble( const double a ) { Cv64suf s; s.f = a; v = s.u; }
| ^~~~~~~~~~
esp32-opencv/modules/core/src/softfloat.cpp:248:1: note: candidate: 'cv::softdouble::softdouble(int64_t)'
248 | softdouble::softdouble( const int64_t a ) { *this = i64_to_f64(a); }
| ^~~~~~~~~~
esp32-opencv/modules/core/src/softfloat.cpp:247:1: note: candidate: 'cv::softdouble::softdouble(int32_t)'
247 | softdouble::softdouble( const int32_t a ) { *this = i32_to_f64(a); }
| ^~~~~~~~~~
esp32-opencv/modules/core/src/softfloat.cpp:246:1: note: candidate: 'cv::softdouble::softdouble(uint64_t)'
246 | softdouble::softdouble( const uint64_t a ) { *this = ui64_to_f64(a); }
| ^~~~~~~~~~
esp32-opencv/modules/core/src/softfloat.cpp:245:1: note: candidate: 'cv::softdouble::softdouble(uint32_t)'
245 | softdouble::softdouble( const uint32_t a ) { *this = ui32_to_f64(a); }
| ^~~~~~~~~~
In file included from esp32-opencv/modules/core/src/softfloat.cpp:68:
esp32-opencv/modules/core/include/opencv2/core/softfloat.hpp:232:5: note: candidate: 'cv::softdouble::softdouble(const cv::softdouble&)'
232 | softdouble( const softdouble& c) { v = c.v; }
| ^~~~~~~~~~
Further up in the code it has: #define EXPTAB_SCALE 6 so the complaint seems to be about float64_t(1 << EXPTAB_SCALE) = float64_t(1 << 6) = float64_t(64)?
The definitions all refer to [u]int[size]_t and none for int. I am building this with the xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ compiler. The esp32-opencv project shows that it used xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ (the difference being esp-2022r1-11.2.0 vs esp-2019r2-8.2.0).
I don't have the knowledge to formulate a good guess on why this isn't working with the ESP32 build setup vs compiling it for my 64bit Ubuntu machine. Why would the call not be ambiguous in the latter case, but with the ESP32 build it can't decide which method to use?
If I did have to guess I would think there is some difference in how integer types are being handled in the xtensa-esp32-elf/esp-2019r2-8.2.0 compiler used in the Github project vs the xtensa-esp32-elf/esp-2022r1-11.2.0, but I also have no idea how to check that.
Cannot compile C++ program, apparently because Boost.Move library is not added as dependency. Compilation errors related to unique_ptr. In the program I have several boost libraries as dependencies which I successfully added except boost.move. Went through a pile of examples and code, didn't file any specific examples on how to add it to CMakelists.txt.
Insets in my .cpp program (that's what it appears to be causing issues not having all dependencies):
#include <boost/move/unique_ptr.hpp>
...
boost::movelib::unique_ptr<plctag> _plctag;
...
My boost dependencies in CMakeLists.txt:
find_package(Boost REQUIRED COMPONENTS log thread)
Compilation errors, is it really what I'm thinking?:
path///.cpp:100:46: error: wrong number of template arguments (1, should be 2)
100 | boost::movelib::unique_ptr<plctag> _plctag;
| ^
In file included from /usr/include/boost/smart_ptr/shared_ptr.hpp:28,
from /usr/include/boost/shared_ptr.hpp:17,
from /usr/include/boost/date_time/time_clock.hpp:17,
from /usr/include/boost/thread/thread_time.hpp:9,
from /usr/include/boost/thread/lock_types.hpp:18,
from /usr/include/boost/thread/pthread/mutex.hpp:16,
from /usr/include/boost/thread/mutex.hpp:16,
path///.hpp:4,
path///.cpp:8:
/usr/include/boost/smart_ptr/detail/shared_count.hpp:58:36: note: provided for ‘template<class T, class D> class boost::movelib::unique_ptr’
58 | template< class T, class D > class unique_ptr;
| ^~~~~~~~~~
path///.cpp:102:21: error: request for member ‘reset’ in ‘_tag’, which is of non-class type ‘int’
102 | _tag.reset();
| ^~~~~
path///.cpp:108:20: error: base operand of ‘->’ is not a pointer
108 | _tag->write_tag_str();
| ^~
path///.cpp:111:27: error: base operand of ‘->’ is not a pointer
111 | string_vec = _tag->read_tag_str();
| ^~
path///.cpp:125:20: error: base operand of ‘->’ is not a pointer
125 | _tag->write_tag();
| ^~
path///.cpp:128:27: error: base operand of ‘->’ is not a pointer
128 | float_vec = _tag->read_tag();
Maybe I don't understand something. Pretty much a beginner at this point. Thanks for help
I've built the cross toolchain for Linux under CYGWIN environment using the article at https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/ as a source.
Compilation and installation finished with success.
Used components are:
binutils-2.35
cloog-0.18.1
gcc-10.2.0
glibc-2.32
gmp-6.1.2
isl-0.20
linux-5.9.3
mpc-1.1.0
mpfr-4.0.2
GCC is configured as:
$ x86_64-unknown-linux-gnu-g++ --verbose
Using built-in specs.
COLLECT_GCC=x86_64-unknown-linux-gnu-g++
COLLECT_LTO_WRAPPER=/opt/cross/x86_64-unknown-linux-gnu/libexec/gcc/x86_64-unknown-linux-
gnu/10.2.0/lto-wrapper.exe
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-10.2.0/configure --prefix=/opt/cross/x86_64-unknown-linux-gnu --
target=x86_64-unknown-linux-gnu --enable-languages=c,c++ --disable-nls --disable-multilib --with-
headers=/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/linux
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (GCC)
But when I'm trying to compile the simple Hello World application that includes I'm getting a lot of different errors:
$ x86_64-unknown-linux-gnu-g++ main.cpp
In file included from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/gthr-default.h:35,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/gthr.h:148,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/atomicity.h:35,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/ios_base.h:39,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ios:42,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ostream:38,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/iostream:39,
from main.cpp:1:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/pthread.h:240:34: error: 'clockid_t' has not been declared
240 | clockid_t __clockid,
| ^~~~~~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/pthread.h:375:12: error: 'cpu_set_t' does not name a type
375 | const cpu_set_t *__cpuset)
| ^~~~~~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/pthread.h:382:6: error: 'cpu_set_t' has not been declared
382 | cpu_set_t *__cpuset)
| ^~~~~~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/pthread.h:466:14: error: 'cpu_set_t' does not name a type
466 | const cpu_set_t *__cpuset)
| ^~~~~~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/pthread.h:471:8: error: 'cpu_set_t' has not been declared
471 | cpu_set_t *__cpuset)
| ^~~~~~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/pthread.h:765:9: error: 'clockid_t' has not been declared
765 | clockid_t __clockid,
| ^~~~~~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/pthread.h:911:12: error: 'clockid_t' has not been declared
911 | clockid_t __clockid,
| ^~~~~~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/pthread.h:933:12: error: 'clockid_t' has not been declared
933 | clockid_t __clockid,
| ^~~~~~~~~
In file included from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/gthr.h:148,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/atomicity.h:35,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/ios_base.h:39,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ios:42,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ostream:38,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/iostream:39,
from main.cpp:1:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/gthr-default.h:114:1: error: 'sched_yield' was not declared in this scope; did you mean 'pthread_yield'?
114 | __gthrw(sched_yield)
| ^~~~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/gthr-default.h:114:1: error: 'sched_yield' was not declared in this scope; did you mean 'pthread_yield'?
114 | __gthrw(sched_yield)
| ^~~~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/gthr-default.h: In function 'int __gthread_yield()':
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/gthr-default.h:693:33: error: '__gthrw_sched_yield' cannot be used as a function
693 | return __gthrw_(sched_yield) ();
| ^
In file included from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/sys/select.h:37,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/sys/types.h:179,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/stdlib.h:394,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/cstdlib:75,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h:41,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/basic_string.h:6535,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/string:55,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/locale_classes.h:40,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/ios_base.h:41,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ios:42,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ostream:38,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/iostream:39,
from main.cpp:1:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/bits/types/struct_timeval.h: At global scope:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/bits/types/struct_timeval.h:8:8: error: redefinition of 'struct timeval'
8 | struct timeval
| ^~~~~~~
In file included from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/pthread.h:23,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/gthr-default.h:35,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/gthr.h:148,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/atomicity.h:35,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/ios_base.h:39,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ios:42,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ostream:38,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/iostream:39,
from main.cpp:1:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-include/time.h:16:8: note: previous definition of 'struct timeval'
16 | struct timeval {
| ^~~~~~~
In file included from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h:44,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/basic_string.h:6535,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/string:55,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/locale_classes.h:40,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/ios_base.h:41,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ios:42,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ostream:38,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/iostream:39,
from main.cpp:1:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h: In constructor '__gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, std::size_t*, _Base ...)::_Save_errno::_Save_errno()':
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h:63:27: error: 'errno' was not declared in this scope
63 | _Save_errno() : _M_errno(errno) { errno = 0; }
| ^~~~~
In file included from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/basic_string.h:6535,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/string:55,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/locale_classes.h:40,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/ios_base.h:41,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ios:42,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ostream:38,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/iostream:39,
from main.cpp:1:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h:45:1: note: 'errno' is defined in header '<cerrno>'; did you forget to '#include <cerrno>'?
44 | #include <cerrno>
+++ |+#include <cerrno>
45 |
In file included from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h:44,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/basic_string.h:6535,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/string:55,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/locale_classes.h:40,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/ios_base.h:41,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ios:42,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ostream:38,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/iostream:39,
from main.cpp:1:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h: In destructor '__gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, std::size_t*, _Base ...)::_Save_errno::~_Save_errno()':
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h:64:23: error: 'errno' was not declared in this scope
64 | ~_Save_errno() { if (errno == 0) errno = _M_errno; }
| ^~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h:64:23: note: 'errno' is defined in header '<cerrno>'; did you forget to '#include <cerrno>'?
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h: In function '_Ret __gnu_cxx::__stoa(_TRet (*)(const _CharT*, _CharT**, _Base ...), const char*, const _CharT*, std::size_t*, _Base ...)':
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h:84:16: error: 'errno' was not declared in this scope
84 | else if (errno == ERANGE
| ^~~~~
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ext/string_conversions.h:84:16: note: 'errno' is defined in header '<cerrno>'; did you forget to '#include <cerrno>'?
In file included from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/system_error:39,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/bits/ios_base.h:46,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ios:42,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/ostream:38,
from /opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/iostream:39,
from main.cpp:1:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/error_constants.h: At global scope:
/opt/cross/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/include/c++/10.2.0/x86_64-unknown-linux-gnu/bits/error_constants.h:122:27: error: 'ENOTSUP' was not declared in this scope
122 | not_supported = ENOTSUP,
|
UPD: WSL and virtual machines are not an option in my case
I've managed to solve the issue.
The problem was in the sys-include directory
opt/cross/x86_64-unknown-linux-gnu/sys-include
This directory has include files with the same names as the ones from
opt/cross/x86_64-unknown-linux-gnu/include
but with different content.
The sys-include directory was searched by the compiler before the regular include.
Renaming or removing sys-include solves the issue and code can be compiled.
I don't know the purpose of the sys-include directory, when it was created and why the duplicated files in this directory have another content.
Accepting my own post as answer to indicate that the issue can be solved.
I'm new to c++, and trying to compile simple arduino project in the Platformio.
platformio.ini file:
[platformio]
src_dir = .
lib_extra_dirs = .piolibdeps/, ../../
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_deps =
# PubSubClient
painlessMesh
main.ino file:
#include <Arduino.h>
#include <painlessMesh.h>
void setup()
{
}
void loop()
{
}
Should be something simple, but I'm getting next error:
'ArduinoJson6100_100::DynamicJsonDocument' has no member named
'nestingLimit'
Full compiler stack:
Executing task in folder test4: platformio run <
Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2;
framework: arduino)
------------------------------------------------------------------------------------------------------------ Verbose mode can be enabled via -v, --verbose option CONFIGURATION:
https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module) HARDWARE:
ESP8266 80MHz 80KB RAM (4MB Flash) Converting main.ino Library
Dependency Finder -> LDF MODES:
FINDER(chain) COMPATIBILITY(soft) Collected 35 compatible libraries
Scanning dependencies... Dependency Graph |-- 1.3.0 |
|-- 6.10.0 | |-- 3.0.2 | |--
1.2.0 | | |-- 1.0 | |--
1.0 Compiling .pioenvs/nodemcuv2/src/main.ino.cpp.o
Generating LD script
.pioenvs/nodemcuv2/ld/local.eagle.app.v6.common.ld Archiving
.pioenvs/nodemcuv2/libef5/libArduinoJson_ID64.a Archiving
.pioenvs/nodemcuv2/libca3/libTaskScheduler_ID721.a Indexing
.pioenvs/nodemcuv2/libef5/libArduinoJson_ID64.a Indexing
.pioenvs/nodemcuv2/libca3/libTaskScheduler_ID721.a Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/BearSSLHelpers.cpp.o Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/CertStoreBearSSL.cpp.o Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFi.cpp.o Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiAP.cpp.o Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiSTA-WPS.cpp.o
Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiSTA.cpp.o
Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/ESP8266WiFiScan.cpp.o
Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiClient.cpp.o
Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiClientSecureAxTLS.cpp.o
Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o
Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiServer.cpp.o
Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiServerSecureAxTLS.cpp.o
Compiling
.pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o
Compiling .pioenvs/nodemcuv2/lib6c2/ESP8266WiFi/WiFiUdp.cpp.o
Compiling
.pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/AsyncPrinter.cpp.o
Compiling
.pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/ESPAsyncTCP.cpp.o
Compiling
.pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/ESPAsyncTCPbuffer.cpp.o
Archiving .pioenvs/nodemcuv2/lib6c2/libESP8266WiFi.a Indexing
.pioenvs/nodemcuv2/lib6c2/libESP8266WiFi.a Compiling
.pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/SyncClient.cpp.o Compiling
.pioenvs/nodemcuv2/lib129/ESPAsyncTCP_ID305/tcp_axtls.c.o Compiling
.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/TaskScheduler.cpp.o
Compiling
.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMesh.cpp.o
Compiling
.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshAP.cpp.o
Archiving .pioenvs/nodemcuv2/lib129/libESPAsyncTCP_ID305.a Indexing
.pioenvs/nodemcuv2/lib129/libESPAsyncTCP_ID305.a Compiling
.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshComm.cpp.o
Compiling
.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshConnection.cpp.o
Compiling
.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshDebug.cpp.o
Compiling
.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshJson.cpp.o
.piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp: In member
function 'String painlessMesh::buildMeshPackage(uint32_t, uint32_t,
meshPackageType, String&)':
.piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:68:25: error:
no matching function for call to
'ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument()'
DynamicJsonDocument jsonBuffer; ^
.piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:68:25: note:
candidates are: In file included from
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/DynamicJsonDocument.hpp:7:0,
from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.hpp:21, from
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson.h:9, from
.piolibdeps/painlessMesh_ID1269/src/painlessMesh.h:12, from
.piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:8:
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:50:3:
note:
ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(ArduinoJson6100_100::VariantRef)
[with TAllocator = ArduinoJson6100_100::DefaultAllocator]
BasicJsonDocument(VariantRef src) ^
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:50:3:
note: candidate expects 1 argument, 0 provided
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:43:3:
note: template
ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(const
T&, typename
ArduinoJson6100_100::enable_if::value>::type*)
BasicJsonDocument(const T& src, ^
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:43:3:
note: template argument deduction/substitution failed:
.piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:68:25: note:
candidate expects 2 arguments, 0 provided DynamicJsonDocument
jsonBuffer; ^ In file included from
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/DynamicJsonDocument.hpp:7:0,
from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.hpp:21, from
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson.h:9, from
.piolibdeps/painlessMesh_ID1269/src/painlessMesh.h:12, from
.piolibdeps/painlessMesh_ID1269/src/painlessMeshComm.cpp:8:
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:36:3:
note:
ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(const
ArduinoJson6100_100::BasicJsonDocument&) [with TAllocator
= ArduinoJson6100_100::DefaultAllocator] BasicJsonDocument(const BasicJsonDocument& src) ^
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:36:3:
note: candidate expects 1 argument, 0 provided
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:33:12:
note:
ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(size_t,
TAllocator) [with TAllocator = ArduinoJson6100_100::DefaultAllocator;
size_t = unsigned int] explicit BasicJsonDocument(size_t capa,
TAllocator allocator = TAllocator()) ^
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:33:12:
note: candidate expects 2 arguments, 0 provided
.piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp: In
member function 'void MeshConnection::handleMessage(String&,
uint32_t)':
.piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:543:25:
error: no matching function for call to
'ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument()'
DynamicJsonDocument jsonBuffer; ^
.piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:543:25:
note: candidates are: In file included from
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/DynamicJsonDocument.hpp:7:0,
from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.hpp:21, from
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson.h:9, from
.piolibdeps/painlessMesh_ID1269/src/painlessMesh.h:12, from
.piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:9:
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:50:3:
note:
ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(ArduinoJson6100_100::VariantRef)
[with TAllocator = ArduinoJson6100_100::DefaultAllocator]
BasicJsonDocument(VariantRef src) ^
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:50:3:
note: candidate expects 1 argument, 0 provided
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:43:3:
note: template
ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(const
T&, typename
ArduinoJson6100_100::enable_if::value>::type*)
BasicJsonDocument(const T& src, ^
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:43:3:
note: template argument deduction/substitution failed:
.piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:543:25:
note: candidate expects 2 arguments, 0 provided DynamicJsonDocument
jsonBuffer; ^ In file included from
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/DynamicJsonDocument.hpp:7:0,
from .piolibdeps/ArduinoJson_ID64/src/ArduinoJson.hpp:21, from
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson.h:9, from
.piolibdeps/painlessMesh_ID1269/src/painlessMesh.h:12, from
.piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:9:
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:36:3:
note:
ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(const
ArduinoJson6100_100::BasicJsonDocument&) [with TAllocator
= ArduinoJson6100_100::DefaultAllocator] BasicJsonDocument(const BasicJsonDocument& src) ^
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:36:3:
note: candidate expects 1 argument, 0 provided
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:33:12:
note:
ArduinoJson6100_100::BasicJsonDocument::BasicJsonDocument(size_t,
TAllocator) [with TAllocator = ArduinoJson6100_100::DefaultAllocator;
size_t = unsigned int] explicit BasicJsonDocument(size_t capa,
TAllocator allocator = TAllocator()) ^
.piolibdeps/ArduinoJson_ID64/src/ArduinoJson/Document/BasicJsonDocument.hpp:33:12:
note: candidate expects 2 arguments, 0 provided
.piolibdeps/painlessMesh_ID1269/src/painlessMeshConnection.cpp:544:16:
error: 'ArduinoJson6100_100::DynamicJsonDocument' has no member named
'nestingLimit' jsonBuffer.nestingLimit = 255; ^
* [.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshComm.cpp.o]
Error 1
* [.pioenvs/nodemcuv2/lib3f1/painlessMesh_ID1269/painlessMeshConnection.cpp.o]
Error 1
======================================== [ERROR] Took 10.54 seconds ======================================== The terminal process terminated with exit code: 1
What am I doing wrong?
Thanks!
Solved in the library source: https://gitlab.com/painlessMesh/painlessMesh/issues/253
Author comment:
Thanks for reporting. This should be fixed in the latest version
(1.3.1). Let me know if you still have problems