Closed distributed closed 5 years ago
However I am surprised that this fix is necessary when Android is an official port of the library.
What makes you think that? Take a look at SUPPORTED_PLATFORMS.md, Android is a tier 3 platform, i.e., it's entirely community maintained. In other words: if it works, great! If it doesn't, send a PR. :-)
Thanks, I missed the tiered support statement document :) I'll send a PR.
Said PR is at https://github.com/libuv/libuv/pull/2110. I will close now.
In a project at work, I have libuv integrated as a git submodule. In the parent CMakeLists.txt I add an
add_subdirectory(libuv)
and then refer to the libuv target.The build works fine for Linux, but linking fails when building for Adnroid:
...aarch64-linux-android/bin/ld: cannot find -lpthread
. The full invocation and error message is below.On Android, the pthread implementation is part of the Bionic C standard library, thus there is no
libpthread.so
and-lpthread
should not be given.By adding
to the main CMakeLists.txt, I am able to circumvent the problem.
However I am surprised that this fix is necessary when Android is an official port of the library. I suppose that I am doing something wrong.
Any ideas what I am doing wrong?
Full invoation and error message: