Skip to content

Conversation

@facontidavide
Copy link
Collaborator

I believe that this is the correct solution (still testing)

See #1026 #1024 #1023 In BehaviorTree/BehaviorTree.CPP;

@facontidavide facontidavide merged commit 4dcef6c into master Oct 23, 2025
10 checks passed
@ericriff
Copy link
Contributor

ericriff commented Oct 23, 2025

This does not fix the problem #1026 addressed.
Try this cmd. The key here is the -o */*:shared=True bit, which sets every package on the conan dep tree to be shared. That usually is a good way of hashing out missing public deps.
Under this scenario, you may still see an issue when gtest queries the test binary to register the tests. So it may be a good idea to build with tests disabled, the same linking issues show up with examples and tools.

rm -rf build
conan install . -s build_type=Release --build=missing  --settings:host compiler.cppstd=17 -o */*:shared=True
cmake --preset conan-release 
cmake --build --preset conan-release

The bt lib builds just fine, but when things that depend on it (tests, tools, examples) try to link they fail with undef symbols.
E.g.:

FAILED: [code=1] examples/t08_additional_node_args 
: && /usr/bin/c++ -m64 -O3 -DNDEBUG -m64    -Wl,--dependency-file=examples/CMakeFiles/t08_additional_node_args.dir/link.d examples/CMakeFiles/t08_additional_node_args.dir/t08_additional_node_args.cpp.o -o examples/t08_additional_node_args  -Wl,-rpath,/workspaces/BehaviorTree.CPP/build/Release  sample_nodes/lib/libbt_sample_nodes.a  libbehaviortree_cpp.so && :
/usr/bin/ld: warning: libsodium.so.26, needed by /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_box_open_afternm'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_secretbox_open'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `randombytes'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_box_keypair'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_scalarmult_base'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_box_afternm'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_box_easy_afternm'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_box_open_easy_afternm'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_box_open'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `sodium_free'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_box'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `sodium_init'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_secretbox'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `sodium_allocarray'
/usr/bin/ld: /home/ubuntu/.conan2/p/b/zerom6c938906c71bf/p/lib/libzmq.so.5: undefined reference to `crypto_box_beforenm'

@facontidavide
Copy link
Collaborator Author

interesting.

Would set the conanfile.py configuration to ZMQ static help, in your opinion?

@ericriff
Copy link
Contributor

I think the -o */*:shared=True on the conan CLI or conan profiles would take precedence.

And even if it works I think it would just shove the problem under the rug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants