天天看点

4.0-编译错误解决方法

Exynos 4412/4212 bsp默认是在64bit的linux下编译的,现有的linux系统是32bit,所以有一些需要改变。

1. build/core/combo/HOST_linux-x86.mk HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

2. external/yaffs2/Android.mk #jeff. LOCAL_CFLAGS+=   -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline

3. external/mesa3d/src/glsl/linker.cpp:1394:49: error: expected primary-expression before a€?,a€? token 增加: #include <stddef.h>

4. external/oprofile/libpp/format_output.h:94:22: error: reference a€?countsa€? cannot be declared a€?mutablea€? [-fpermissive external/oprofile/libpp/Android.mk LOCAL_CFLAGS := $(common_host_cflags)  -fpermissive external/oprofile/pp/Android.mk LOCAL_CFLAGS := $(common_host_cflags)  -fpermissive

5. In file included from external/gtest/src/../include/gtest/gtest-param-test.h:157:0,                  from external/gtest/src/../include/gtest/gtest.h:69,                  from external/gtest/src/gtest_main.cc:32: external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11: error: a€?ptrdiff_ta€? does not name a type 增加: #include <stddef.h> 或 #include <cstddef>

6. frameworks/compile/slang/slang_rs_export_foreach.cpp:249:23: error: variable a€?ParamNamea€? set but not used [-Werror=unused-but-set-variable] cc1plus: all warnings being treated as errors frameworks/compile/slang/Android.mk -local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror +local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter

7. /home/jeff/ics-4x12/TC4_ICS/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock' collect2: ld returned 1 exit status $vi external/llvm/llvm-host-build.mk LOCAL_LDLIBS := -lpthread -ldl

继续阅读