Open jerylteo opened 1 month ago
Installing with Pixi works but program crashes because "libzmq-mt-4_3_5.dll was not found".
I've literally tried all ways I can think of to build this.
Would appreciate some help.
Building with OSX replicates the issue.
I think the build works, but there could be some configuration that does not build a dll/lib for non-Windows OS. Unfortunately, I need to add this to a Windows VS Project, so I do need to be able to link the library over.
Looks like I've made one full circle and need to build in Windows, but that doesn't work. #867
Building it directly with VS fails to build the library with zmq and sqlite3 errors:
2>------ Build started: Project: behaviortree_cpp, Configuration: Debug x64 ------
2>Auto build dll exports
2> Creating library C:/Users/jeryl/Documents/GitHub/build2/Debug/behaviortree_cppd.lib and object C:/Users/jeryl/Documents/GitHub/build2/Debug/behaviortree_cppd.exp
2>groot2_publisher.obj : error LNK2019: unresolved external symbol imp_zmq_errno referenced in function "public: cdecl zmq::error_t::error_t(void)" (??0error_t@zmq@@QEAA@XZ)
2>groot2_publisher.obj : error LNK2019: unresolved external symbol imp_zmq_strerror referenced in function "public: virtual char const * cdecl zmq::error_t::what(void)const " (?what@error_t@zmq@@UEBAPEBDXZ)
2>groot2_publisher.obj : error LNK2019: unresolved external symbol imp_zmq_ctx_new referenced in function "public: cdecl zmq::context_t::context_t(void)" (??0context_t@zmq@@QEAA@XZ)
2>groot2_publisher.obj : error LNK2019: unresolved external symbol imp_zmq_ctx_term referenced in function "public: void cdecl zmq::context_t::close(void)" (?close@context_t@zmq@@QEAAXXZ)
2>groot2_publisher.obj : error LNK2019: unresolved external symbol imp_zmq_msg_init referenced in function "public: __cdecl zmq::message_t::message_t(class zmq::message_t &&)" (??0message_t@zmq@@QEAA@$$QEAV01@@Z)
2>groot2_publisher.obj : error LNK2019: unresolved external symbol imp_zmq_msg_init_size referenced in function "public: cdecl zmq::message_t::message_t(void const *,unsigned int64)" (??0message_t@zmq@@QEAA@PEBX_K@Z)
2>groot2_publisher.obj : error LNK2019: unresolved external symbol imp_zmq_msg_send referenced in function "public: class std::optional
Removing ZMQ and SQLite3 from CMakeList allows the library to build properly.
However, when running a sample program on Debug mode, I get a Read Access Violation error from behaviortree_cppd.dll. Release mode works, but I need to be able to run in Debug mode. This error should be another topic. #869
Are you building with ROS2 by any chance? if so I have been adding https://github.com/tony-p/BehaviorTree.CPP/blob/e923c1fc412e2775cf1b5dbeae77cf7fd78525f0/cmake/ament_build.cmake#L7 for the pixi build to work.
Can't remember exactly why I haven't upstreamed it, either it broke the regular build or I thought it was just too hacky
On WSL/Linux with pixi/robostack I ended up manually linking the libraries https://github.com/RoboStack/ros-humble/issues/119
Not sure if this actually still an issue with behaviortree.CPP ZMQ as I believe the libraries are now linked as Public, but definitely had to do that in the past
when you run with pixi, are you running it within the pixi environement?
pixi is built for a flavour of a conda virtual environment, so to run you should either use pixi shell
to enter the pixi environment, or prefix your execution command with pixi run
https://pixi.sh
Running WSL on Windows 11, on BehaviorTree.CPP v4.6.2.
Continuation from #867
Commands to build works without errors, but folder does not reflect built files. i.e. No difference made after running: cmake --build . --parallel
After running: ... [ 99%] Built target t12_default_ports [ 99%] Built target t06_subtree_port_remapping [100%] Linking CXX executable t11_groot_howto [100%] Linking CXX executable ex03_sqlite_log [100%] Built target t11_groot_howto [100%] Built target ex03_sqlite_log [100%] Linking CXX executable behaviortree_cpp_test [100%] Built target behaviortree_cpp_test
But build folder does not contain any lib or dll etc.
Did something go wrong? Running with administrative privileges did not make a difference.