Comments (16)
I'll see if I can upgrade to 1.66 this weekend, yes!
from boost-cmake.
IIRC, it has been fixed upstream, I need to bump the Boost version to fix this.
from boost-cmake.
from boost-cmake.
Just FYI, under Windows, boost 1.66 changed their library naming scheme, causing any projects to fail linking when using cmake.
Only cmake from source later than 3f4924aa60889dd2a34a2a1ba6877528779867d0
will work with the new boost.
from boost-cmake.
boost-cmake
isn't linked to boost names, so unless they're explicitly changed from within this project, nothing should break.
from boost-cmake.
Ok should be no problems then!
from boost-cmake.
This still happens in 1.66.
libs/serialization/src/singleton.cpp is also gone in 1.66 it appears.
from boost-cmake.
I had little time to work on this, but I was able to build and run tests for 1.66.0 this week, everything was green. I guess I don't have enough tests for boost::log then.
from boost-cmake.
from boost-cmake.
just to add, I don't think log_setup
is compiled when compiling log
(but log
is when log_setup
is compiled) which is where this error is.
from boost-cmake.
Please let me know if this is still an issue with the current version and I'll reopen.
from boost-cmake.
I am still experiencing this issue with the latest version:
In file included from /Users/dmitry/Code/mx/mq-grabber-poc/cmake-build-debug/_deps/boost-src/libs/log/src/setup/init_from_settings.cpp:54:
In file included from /Users/dmitry/Code/mx/mq-grabber-poc/cmake-build-debug/_deps/boost-src/boost/log/sinks.hpp:27:
/Users/dmitry/Code/mx/mq-grabber-poc/cmake-build-debug/_deps/boost-src/boost/log/sinks/unbounded_ordering_queue.hpp:204:28: error: no member named 'timed_wait' in 'boost::condition_variable'
m_cond.timed_wait(lock, posix_time::milliseconds(m_ordering_window - difference));
~~~~~~ ^
In file included from /Users/dmitry/Code/mx/mq-grabber-poc/cmake-build-debug/_deps/boost-src/libs/log/src/setup/init_from_settings.cpp:54:
In file included from /Users/dmitry/Code/mx/mq-grabber-poc/cmake-build-debug/_deps/boost-src/boost/log/sinks.hpp:29:
/Users/dmitry/Code/mx/mq-grabber-poc/cmake-build-debug/_deps/boost-src/boost/log/sinks/bounded_ordering_queue.hpp:231:28: error: no member named 'timed_wait' in 'boost::condition_variable'
m_cond.timed_wait(lock, posix_time::milliseconds(m_ordering_window - difference));
~~~~~~ ^
2 errors generated.
from boost-cmake.
I have this problem in version boost 1.71
from boost-cmake.
Yep, happens in 1.71 as soon as I add Boost::log_setup
to linked libraries. Does not happen if linking only to Boost::log
from boost-cmake.
But what if I need Boost::log_setup for formating, I can't use Boost::log_setup with Orphis/boost-cmake ?
My cmake :
cmake --version
cmake version 3.18.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
My CMakeLists.txt
set(BOOST_URL https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.bz2)
SET(Boost_USE_STATIC_LIBS ON) # Try to apply solution from https://stackoverflow.com/questions/17844085/boost-log-with-cmake-causing-undefined-reference-error
add_subdirectory(boost-cmake)
...
target_link_libraries(UtilsLib PUBLIC Boost::log_setup Boost::log)
Output :
Scanning dependencies of target Boost_log_setup
[ 69%] Building CXX object boost-cmake/CMakeFiles/Boost_log_setup.dir/__/_deps/boost-src/libs/log/src/setup/default_filter_factory.cpp.o
[ 69%] Building CXX object boost-cmake/CMakeFiles/Boost_log_setup.dir/__/_deps/boost-src/libs/log/src/setup/default_formatter_factory.cpp.o
[ 73%] Building CXX object boost-cmake/CMakeFiles/Boost_log_setup.dir/__/_deps/boost-src/libs/log/src/setup/filter_parser.cpp.o
[ 73%] Building CXX object boost-cmake/CMakeFiles/Boost_log_setup.dir/__/_deps/boost-src/libs/log/src/setup/formatter_parser.cpp.o
[ 73%] Building CXX object boost-cmake/CMakeFiles/Boost_log_setup.dir/__/_deps/boost-src/libs/log/src/setup/init_from_settings.cpp.o
In file included from /home/developer/fun/dummy_project/build/_deps/boost-src/boost/log/sinks.hpp:27:0,
from /home/developer/fun/dummy_project/build/_deps/boost-src/libs/log/src/setup/init_from_settings.cpp:54:
/home/developer/fun/dummy_project/build/_deps/boost-src/boost/log/sinks/unbounded_ordering_queue.hpp: In member function ‘bool boost::log::v2s_mt_
posix::sinks::unbounded_ordering_queue<OrderT>::dequeue_ready(boost::log::v2s_mt_posix::record_view&)’:
/home/developer/fun/dummy_project/build/_deps/boost-src/boost/log/sinks/unbounded_ordering_queue.hpp:204:28: error: ‘class boost::condition_variab
le’ has no member named ‘timed_wait’
m_cond.timed_wait(lock, posix_time::milliseconds(m_ordering_window - difference));
^~~~~~~~~~
In file included from /home/developer/fun/dummy_project/build/_deps/boost-src/boost/log/sinks.hpp:29:0,
from /home/developer/fun/dummy_project/build/_deps/boost-src/libs/log/src/setup/init_from_settings.cpp:54:
/home/developer/fun/dummy_project/build/_deps/boost-src/boost/log/sinks/bounded_ordering_queue.hpp: In member function ‘bool boost::log::v2s_mt_po
six::sinks::bounded_ordering_queue<OrderT, MaxQueueSizeV, OverflowStrategyT>::dequeue_ready(boost::log::v2s_mt_posix::record_view&)’:
/home/developer/fun/dummy_project/build/_deps/boost-src/boost/log/sinks/bounded_ordering_queue.hpp:231:28: error: ‘class boost::condition_variable
’ has no member named ‘timed_wait’
m_cond.timed_wait(lock, posix_time::milliseconds(m_ordering_window - difference));
^~~~~~~~~~
boost-cmake/CMakeFiles/Boost_log_setup.dir/build.make:133: recipe for target 'boost-cmake/CMakeFiles/Boost_log_setup.dir/__/_deps/boost-src/libs/l
og/src/setup/init_from_settings.cpp.o' failed
make[2]: *** [boost-cmake/CMakeFiles/Boost_log_setup.dir/__/_deps/boost-src/libs/log/src/setup/init_from_settings.cpp.o] Error 1
CMakeFiles/Makefile2:819: recipe for target 'boost-cmake/CMakeFiles/Boost_log_setup.dir/all' failed
make[1]: *** [boost-cmake/CMakeFiles/Boost_log_setup.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2
from boost-cmake.
The problem still exists, but the workaround for this as mentioned by OP is to set BOOST_THREAD_USES_DATETIME. I have my top level CMakeLists.txt as follows:
add_subdirectory(modules/boost-cmake)
# Workaround for "Error: class boost::condition_variable has no member 'timed_wait'"
target_compile_definitions(Boost_log_setup PRIVATE
BOOST_THREAD_USES_DATETIME
)
Make sure the target_compile_definitions comes after the add_subdirectory
from boost-cmake.
Related Issues (20)
- Cannot compile boost 1.7.6 HOT 1
- as of boost 1.76.0 regex becomes header only
- Boost_INCLUDE_DIR is not getting set
- the right way to enable/disable Boost features in main CMake script?
- Doesn't work with Windows 11 and VS 22 HOT 2
- Enable /MP for parallel builds with MSVC HOT 1
- Download fails when multiple configurations are generated in parallel HOT 6
- Clarity on README installation HOT 11
- Feature Request : checking in partial boost trees. HOT 4
- Android Issues HOT 6
- Add option to support building boost dynamic library HOT 6
- "Fetching Boost" happens every time I configure HOT 1
- Usage with find_package REQUIRED etc. HOT 1
- 403 Forbidden downloading https://dl.bintray.com/boostorg/release/1.71.0/source/boost_1_71_0.tar.bz2 HOT 9
- Changing the BOOST_URL leads to linking error HOT 3
- Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
- Can I use it to cross compile boost for ARM ?
- Store result of try compile in cache variable?
- Add tags for boost versions HOT 3
- Cross compilation issue from linux to windows HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boost-cmake.