编译android40问题汇集

转载 2013年12月09日 18:10:37
1._FORTIFY_SOURCE”重定义

build/core/combo/HOST_linux-x86.mk line 61: -HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0 +HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
修改build/core/combo/HOST_linux-x86.mk 61行,将 HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0 修改成 HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

2.错误: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]
external/oprofile/libpp/format_output.h

自己动手修改。去除mutable。

3.external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11: 错误: ‘ptrdiff_t’不是一个类型名
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/../src/gtest.cc:34,
                 from external/gtest/src/gtest-all.cc:36:

解决方法:
$vim external/gtest/src/../include/gtest/internal/gtest-param-util.h
#include <cstddef>

4.host Executable: test-librsloader (out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader)
host StaticLib: libui (out/host/linux-x86/obj/STATIC_LIBRARIES/libui_intermediates/libui.a)
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Signals.o): In function `PrintStackTrace':
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Unix/Signals.inc:219: undefined reference to `dladdr'
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Unix/Signals.inc:231: undefined reference to `dladdr'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Threading.o): In function `llvm::llvm_execute_on_thread(void (*)(void*), void*, unsigned int)':
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Threading.cpp:96: undefined reference to `pthread_create'
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Threading.cpp:91: undefined reference to `pthread_attr_setstacksize'
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Threading.cpp:100: undefined reference to `pthread_join'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `MutexImpl':
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Mutex.cpp:69: undefined reference to `pthread_mutexattr_init'
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Mutex.cpp:75: undefined reference to `pthread_mutexattr_settype'
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Mutex.cpp:80: undefined reference to `pthread_mutexattr_setpshared'
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Mutex.cpp:89: undefined reference to `pthread_mutexattr_destroy'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `llvm::sys::MutexImpl::tryacquire()':
/home/shaocq/ics4.0.1/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'
collect2: ld 返回 1
make: *** [out/host/linux-x86/obj/EXECUTABLES/test-librsloader_intermediates/test-librsloader] 错误 1
make: *** 正在等待未完成的任务....

解决方法:
$vim external/llvm/llvm-host-build.mk
LOCAL_LDLIBS := -lpthread -ldl

5.collected 3100 test methods in 225 junit test classes
target Strip: libchromium_net (out/target/product/generic/obj/lib/libchromium_net.so)
target Java: LatinIME (out/target/common/obj/APPS/LatinIME_intermediates/classes)
target Dex: Music
target Strip: libandroid_runtime (out/target/product/generic/obj/lib/libandroid_runtime.so)
host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs_export_foreach.cpp
frameworks/compile/slang/slang_rs_export_foreach.cpp: 在静态成员函数‘static slang::RSExportForEach* slang::RSExportForEach::Create(slang::RSContext*, const clang::FunctionDecl*)’中:
frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23: 错误: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]
cc1plus:所有的警告都被当作是错误

解决方法:
$ vim 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

6.external/mesa3d/src/glsl/linker.cpp:623:33: 警告:   ‘virtual ir_visitor_status remap_variables(ir_instruction*, gl_shader*, hash_table*)::remap_visitor::visit(ir_dereference_variable*)’所隐藏 [-Woverloaded-virtual]
external/mesa3d/src/glsl/linker.cpp: 在函数‘void assign_varying_locations(gl_shader_program*, gl_shader*, gl_shader*)’中:
external/mesa3d/src/glsl/linker.cpp:1394:49: 错误: expected primary-expression before ‘,’ token
external/mesa3d/src/glsl/linker.cpp:1394:50: 错误: ‘varyings’在此作用域中尚未声明
external/mesa3d/src/glsl/linker.cpp:1394:58: 错误: ‘offsetof’在此作用域中尚未声明
external/mesa3d/src/glsl/linker.cpp:1395:48: 错误: expected primary-expression before ‘,’ token
external/mesa3d/src/glsl/linker.cpp:1412:47: 错误: expected primary-expression before ‘,’ token
external/mesa3d/src/glsl/linker.cpp:1412:48: 错误: ‘position’在此作用域中尚未声明
external/mesa3d/src/glsl/linker.cpp:1414:47: 错误: expected primary-expression before ‘,’ token
external/mesa3d/src/glsl/linker.cpp:1414:48: 错误: ‘pointSize’在此作用域中尚未声明
external/mesa3d/src/glsl/linker.cpp:1424:47: 错误: expected primary-expression before ‘,’ token
external/mesa3d/src/glsl/linker.cpp:1424:48: 错误: ‘position’在此作用域中尚未声明
external/mesa3d/src/glsl/linker.cpp:1428:47: 错误: expected primary-expression before ‘,’ token
external/mesa3d/src/glsl/linker.cpp:1428:48: 错误: ‘frontFacingPointCoord’在此作用域中尚未声明
external/mesa3d/src/glsl/linker.cpp:1431:47: 错误: expected primary-expression before ‘,’ token
external/mesa3d/src/glsl/linker.cpp:1431:48: 错误: ‘frontFacingPointCoord’在此作用域中尚未声明
external/mesa3d/src/glsl/linker.cpp: 在函数‘void link_shaders(const gl_context*, gl_shader_program*)’中:
external/mesa3d/src/glsl/linker.cpp:1734:49: 错误: expected primary-expression before ‘,’ token
external/mesa3d/src/glsl/linker.cpp:1734:50: 错误: ‘fragColor’在此作用域中尚未声明
external/mesa3d/src/glsl/linker.cpp:1734:59: 错误: ‘offsetof’在此作用域中尚未声明
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] 错误 1
解决方法:
vim external/mesa3d/src/glsl/linker.cpp
添加:
#include <cstddef>

【环境配置】全志A20/T3/V40/T3A android编译环境配置

本文介绍ubuntu下配置全志android编译环境所需的步骤,本文介绍的环境实测支持如下序列全志芯片和平台,并将持续保持已验证平台的更新。 1、已验证的全志序列芯片+平台 A20/T2/T3...
  • yxtouch
  • yxtouch
  • 2017年10月20日 13:57
  • 169

THINKPAD E40部分问题解疑

  • 2010年09月14日 15:24
  • 1.54MB
  • 下载

2016年工作中遇到的问题31-40

31.Spring和Dubbo中都有@Service注解,需要注意。import com.alibaba.dubbo.config.annotation.Service;import org.spri...

Ubuntu+Tesla M40上OpenCL问题解决过程

前些天配置了一台GPU机器,装了opencl,也装了OpenCV,OpenCV安装的时候使用了WITH_OPENCV=ON选项。后面在准备数据库的使用,使用了caffe自带的conver_images...

Sql Server 2008 出现"provider:命名管道提供程序,error:40"问题,无法登录数据库

Sql Server 2008 出现"provider:命名管道提供程序,error:40"问题,无法登录数据库 http://blog.sina.com.cn/s/blog_53e2b55e010...
  • orion61
  • orion61
  • 2012年03月01日 17:24
  • 405

算法导论程序40--贪心算法(活动选择问题)

一个调度竞争共享资源的多个活动的问题,目标是选出一个最大的互相兼容的活动集合。 假定有一个n个活动的集合S={a1,a2,...,an},这些活动使用同一个资源,而这个资源在某个时刻只能供一个活动使用...

联想ThinkPad E40新机磁盘分区问题

     看到网上很多朋友在为新买的Thinkpad系列电脑磁盘分区而苦恼,联想官方又没有给出明确的详细的解决方案,自己前段时间刚好买了一个Thinkpad的电脑,先向使用过Thinkpad电脑的同学...

第四周《C语言及程序设计》实践项目40 问题求解方法——穷举

【项目1-小明借书】 /* * Copyright (c) 2016, CSDN学院 * All rights reserved. * 文件名称:【项目1-小明借书】.cpp ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:编译android40问题汇集
举报原因:
原因补充:

(最多只允许输入30个字)