While I am building android on my linux box have this

errorhappen:
host Executable: localize (out/host/linux-x86/obj/EXECUTABLES/
localize_intermediates/localize)
out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/
libutils.a(Threads.o): In function `androidCreateRawThreadEtc':
/home/hmepas/android/src/frameworks/base/libs/utils/Threads.cpp:144:
undefinedreferenceto `pthread_create'
/home/hmepas/android/src/frameworks/base/libs/utils/Threads.cpp:138:
undefinedreferenceto `pthread_attr_setstacksize'
out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/
libcutils.a(threads.o): In function `thread_store_set':
/home/hmepas/android/src/system/core/libcutils/threads.c:36:undefined
referenceto `pthread_key_create'
/home/hmepas/android/src/system/core/libcutils/threads.c:44:undefined
referenceto `pthread_setspecific'
out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/
libcutils.a(threads.o): In function `thread_store_get':
/home/hmepas/android/src/system/core/libcutils/threads.c:27:undefined
referenceto `pthread_getspecific'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/localize_intermediates/
localize] Ошибка 1

And the same while building aapt module. To solve this you have to use
simple patch:
$ cat ld_pthread.patch
--- frameworks/base/tools/aapt/Android.mk.horig 2009-01-17 15:24:03
+0300
+++ frameworks/base/tools/aapt/Android.mk 2009-01-17 15:24:13
+0300
@@ -37,7 +37,7 @@ LOCAL_STATIC_LIBRARIES := /
LOCAL_LDLIBS := -lz

ifeq ($(HOST_OS),linux)
-LOCAL_LDLIBS += -lrt
+LOCAL_LDLIBS += -lrt -lpthread
endif

ifeq ($(HOST_OS),windows)
--- frameworks/base/tools/localize/Android.mk.horig 2009-01-17
15:36:08 +0300
+++ frameworks/base/tools/localize/Android.mk 2009-01-17 15:36:18
+0300
@@ -34,7 +34,7 @@ LOCAL_STATIC_LIBRARIES := /
libcutils

ifeq ($(HOST_OS),linux)
-LOCAL_LDLIBS += -lrt
+LOCAL_LDLIBS += -lrt -lpthread
endif


Probs would be good idea to commit it to the branch =)

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. 关于含有RecyclerView的布局载入时,会滚动
  2. Android 官方架构组件(一)——Lifecycle
  3. Android(安卓)在线预览ppt、doc、xls、tx
  4. Android从右到左的布局(RTL Layout)
  5. Android(安卓)Studio 入的坑
  6. Android 图片显示与屏幕适配的问题
  7. Android 沉浸式状态栏,别搞那么麻烦
  8. Android到Flutter过度如丝般顺滑(二)
  9. Android了解四大基本组件
  10. Android TextView部分文字实现点击事件