I'm trying to use std::future::wait_for(std::chrono::duration)
in my application (in fact, I don't want to wait at all which makes this more frustrating, as you'll see), but in using anything from std::chrono
, I am unable to run the application after cross-compiling it for my BeagleBone Black:
/usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.19' not found
Until I add the following lines to my code, this project compiles and runs great with an older version of GLIBCXX, but just to be able to check if a future's value is ready without blocking, I suddenly need all these newer libraries:
if (myFuture.wait_for(std::chrono::seconds(0)) == std::future_status::ready)
return true;
The BeagleBone Black comes with GLIBCXX_3.4.17
from GCC 4.6.3 - I've checked the C++ headers on the system, and as I suspected, all the functionality I need from the chrono library is there. So why does it ask for version 3.4.19?
I tried updating and upgrading Debian with sudo apt-get upgrade
in the hopes that the newer libraries would be added. This had no effect. Besides, I would really like to be able to run on the stock image.
So I tried statically linking libstdc++
with -static-libstdc++
added to my LD flags. Now I'm apparently missing GLIBC-2.7
which can't be fixed in the same way with -static-libgcc
I'm out of ideas.