Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NDK r12 lost std::mutex #81

Closed
alexcohn opened this issue Apr 19, 2016 · 4 comments
Closed

NDK r12 lost std::mutex #81

alexcohn opened this issue Apr 19, 2016 · 4 comments
Milestone

Comments

@alexcohn
Copy link

Upgraded to r12, and got errors like 'mutex' in namespace 'std' does not name a type. After using the workaround suggested by James Swift, I get undefined reference to 'std::condition_variable::notify_one()'.

Using gnustl_static, NDK_TOOLCHAIN=x86-4.9.

Same library compiles clean with r11.

@DanAlbert DanAlbert added this to the r12 milestone Apr 19, 2016
@DanAlbert
Copy link
Member

FYI I have an internal bug open tracking this. It's part of the fallout from synchronizing our GCC with chromeos (solved a bunch of bugs, caused a few more). The detection for _GLIBCXX_HAS_GTHREADS apparently got hacked into place in the NDK a long time ago and we lost the hack in the sync.

@chaoren
Copy link

chaoren commented Apr 19, 2016

Looks like std::thread is also missing.

$ ~/Android/toolchains/arm/bin/arm-linux-androideabi-clang++ -std=c++11 test.cpp
test.cpp:11:7: error: no member named 'this_thread' in namespace 'std'
        std::this_thread::get_id();
        ~~~~~^
test.cpp:12:7: error: no type named 'mutex' in namespace 'std'
        std::mutex m;
        ~~~~~^
test.cpp:13:7: error: no type named 'thread' in namespace 'std'
        std::thread t;
        ~~~~~^

@DanAlbert
Copy link
Member

Yes, everything thread related is probably missing. _GLIBCXX_HAS_GTHREADS isn't getting defined.

(FYI, internal bug is http://b/27433401)

@DanAlbert
Copy link
Member

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

No branches or pull requests

3 participants