Skip to content

Conversation

@lo-simon
Copy link
Collaborator

@lo-simon lo-simon commented Dec 4, 2025

Thank you, @tianzhuqiao and @glance-, for reporting the missing chrono library while building nmos-cpp-node #467. The library has now been added to the list of required components in the nmos-cpp CMake file, which resolves the issue.

@garethsb
Copy link
Contributor

garethsb commented Dec 4, 2025

In the original design, these should not always be required, they should be conditional based on meaning of bst::chrono and bst::atomic.

#ifndef BST_THREAD_BOOST

#ifndef BST_ATOMIC_BOOST

@lo-simon
Copy link
Collaborator Author

lo-simon commented Dec 5, 2025

In the original design, these should not always be required, they should be conditional based on meaning of bst::chrono and bst::atomic.

#ifndef BST_THREAD_BOOST

#ifndef BST_ATOMIC_BOOST

Thanks, @garethsb. The latest update has BST_THREAD_BOOST defined in CMake, so we need to include boost::chrono in CMake as well.

BST_THREAD_BOOST # provide bst::chrono::duration, etc. using either std:: or boost:: symbols

@lo-simon lo-simon merged commit 1bd6901 into sony:master Dec 8, 2025
10 checks passed
@lo-simon lo-simon deleted the fix-missing-boost-libraries branch December 8, 2025 23:13
@garethsb
Copy link
Contributor

garethsb commented Dec 9, 2025

@lo-simon FWIW, that comment you mentioned in the CMake file is slightly confusing, because it reads as if when that preprocessor symbol is defined, bst:: symbols may be aliases for either boost:: or std::. Whereas in fact it means they will be aliases for boost::.

BST_THREAD_BOOST # provide bst::chrono::duration, etc. using either std:: or boost:: symbols

It's copied from the relevant (amalgamated) header, bst/chrono.h:

// Provide bst::chrono::duration, etc. using either std:: or boost:: symbols

There it is explaining that you can control whether the aliases are boost:: (by defining BST_THREAD_BOOST) or std:: (by not defining it). Later headers made this idiom more explicit by always either defining BST_xxx_BOOST or BST_xxx_STD.

E.g.

// Provide bst::regex, etc. using either std:: or boost:: symbols
#if !defined(BST_REGEX_STD) && !defined(BST_REGEX_BOOST)
#if defined(__GNUC__)
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
#define BST_REGEX_STD
#else
#define BST_REGEX_BOOST
#endif
#else
#define BST_REGEX_STD
#endif

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.

2 participants