0

I am trying to build vendor specific RIL using android lollipop source code. My RIL using run time port access. To build run time port access file using one flag LOCAL_LDLIBS += -lpthread in theAndroid.mk When trying to build with mm command getting error as per below logs.

target SharedLib: libruntime-ril-port (out/target/product/shamu/obj/SHARED_LIBRARIES/libruntime-ril-port_intermediates/LINKED/libruntime-ril-port.so)
/media/sda1/01bcd1a8-9343-4a7a-9bac-8b0811cefb0a/AOSP_TREE/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lpthread
collect2: error: ld returned 1 exit status
make: *** [out/target/product/shamu/obj/SHARED_LIBRARIES/libruntime-ril-port_intermediates/LINKED/libruntime-ril-port.so] Error 1
make: Leaving directory `/media/sda1/01bcd1a8-9343-4a7a-9bac-8b0811cefb0a/AOSP_TREE'

#### make failed to build some targets (3 seconds) ####

Please suggest me how to solve this.

Milind Dumbare
  • 3,104
  • 2
  • 19
  • 32
Deepak Singh
  • 1,079
  • 2
  • 11
  • 15

1 Answers1

1

The android C library (bionic) includes pthreads. If you are linking against the c library (you probably are, unless you are using nostdlib), then you do not need to link against libpthread. You can make an empty file, or an empty object file called libpthread.a.

user2229152
  • 391
  • 1
  • 2