2016-09-05 6 views
0

Когда я строю android5.0 на ubuntu16.04 я получаю следующие ошибки:ubuntu16.04 LTS построить android5.0 Ошибка

external/libcxx/include/atomic:539:2: error: #error is not implemented art/runtime/atomic.h:155:5: error: 'atomic_thread_fence' is not a member of 'std' art/runtime/atomic.h:155:30: error: 'memory_order_acquire' is not a member of 'std' art/runtime/entrypoints/entrypoint_utils.h:50:44: error: 'art::mirror::Class* art::CheckClassInitializedForObjectAlloc(art::mirror::Class*, art::Thread*, bool*)' declared 'static' but never defined [-Werror=unused-function] art/runtime/entrypoints/entrypoint_utils.h:146:33: error: 'art::mirror::ArtField* art::FindFieldFast(uint32_t, art::mirror::ArtMethod*, art::FindFieldType, size_t)' declared 'static' but never defined [-Werror=unused-function] art/runtime/entrypoints/entrypoint_utils.h:152:34: error: 'art::mirror::ArtMethod* art::FindMethodFast(uint32_t, art::mirror::Object*, art::mirror::ArtMethod*, bool, art::InvokeType)' declared 'static' but never defined [-Werror=unused-function] art/runtime/entrypoints/entrypoint_utils.h:158:30: error: 'art::mirror::Class* art::ResolveVerifyAndClinit(uint32_t, art::mirror::ArtMethod*, art::Thread*, bool, bool)' declared 'static' but never defined [-Werror=unused-function] art/runtime/entrypoints/entrypoint_utils.h:166:31: error: 'art::mirror::String* art::ResolveStringFromCode(art::mirror::ArtMethod*, uint32_t)' declared 'static' but never defined [-Werror=unused-function] art/runtime/entrypoints/entrypoint_utils.h:171:20: error: 'void art::UnlockJniSynchronizedMethod(jobject, art::Thread*)' declared 'static' but never defined [-Werror=unused-function] art/runtime/entrypoints/entrypoint_utils.h:177:20: error: 'void art::CheckSuspend(art::Thread*)' declared 'static' but never defined [-Werror=unused-function] cc1plus: all warnings being treated as errors

Почему появляются?

ответ

0

Я решил эту проблему путем изменения $ANDROID_REPO/art/build/Android.common_build.mk:

-#ART_HOST_CLANG := false 
-#ifneq ($(WITHOUT_HOST_CLANG),true) 
- # By default, host builds use clang for better warnings. 
ART_HOST_CLANG := true 
-#endif 

, чтобы убедиться, что ART_HOST_CLANG = true. Затем я создал следующую ссылку:

ln -sf /usr/bin/ld.gold $ANDROID_REPO/prebuilts/gcc/linux-x86/host/(glibc version)/x86_64-linux/bin/ld 

Ссылка: xda-developers forum: how to setup Ubuntu 16.04