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 r13b tkill not defined in libc.so #258

Closed
dkochmanski opened this issue Dec 11, 2016 · 2 comments
Closed

NDK r13b tkill not defined in libc.so #258

dkochmanski opened this issue Dec 11, 2016 · 2 comments
Labels

Comments

@dkochmanski
Copy link

dkochmanski commented Dec 11, 2016

Description

Boehm Weiser Garbage Collector needs tkill to stop the world in threaded builds. Embeddable Common-Lisp depends on it, but libgc.a can't be linked because of:

/usr/share/src/ecl-16.1.2/src/bdwgc/pthread_stop_world.c:452: undefined reference to tkill'`

It seems, that libc.a has that symbol, but libc.so doesn't. In release r9b symbol is present in both files and compilation works fine.

Environment Details

  • NDK Version: 13.1.3345770
  • Build: standalone toolchain generated with
    $NDK/build/tools/make_standalone_toolchain.py --arch arm --api 9 --install-dir /opt/toolchains/arm-linux-androideabi/
  • ArchLinux
  • Compiler: GCC
  • NDK API level: 9
@DanAlbert
Copy link
Member

The interesting thing is that the Boehm GC doesn't need tkill, it's perfectly happy to use pthread_kill on non-Android: https://github.com/ivmai/bdwgc/blob/3ca60bd5dcb0e1c04fdc6459417824c05b292627/pthread_stop_world.c#L367

(not sure if that's the sources that you bdwgc is built from, but I'm guessing it's similar)

This bug will need to be filed against the gc project. FWIW glibc doesn't have symbols defined for tkill either, so anything that works with glibc should also work for Android.

@dkochmanski
Copy link
Author

OK, thanks for the prompt response. It seems my sources are indeed outdated and tkill usage is wrapped in ifdef of PLATFORM_ANDROID while in upstream its in USE_TKILL_ON_ANDROID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants