Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any method to compile libuv with android NDK?

we are now developing some features with c/c++ for android client.

So we will use android NDK - r8 to compile our code.

We use libuv also in our code.

Unfortunately, android NDK cannot complie libuv correctly. All the terms started with 'pthread_'cannot be recognized.

Anyone has idea or hint? Thanks a lot.

like image 967
user2226678 Avatar asked Nov 03 '22 01:11

user2226678


1 Answers

The support for android is not yet in mainline libuv, but I know of at least two patch-sets to fix it:

  • As implemented in rust
  • As a recently submitted pull-request

While I can't speak of the latter (seemingly very good quality), I can tell you that the former is currently being used for the Android port of rust and servo.

like image 77
kaeso Avatar answered Nov 09 '22 11:11

kaeso