Android-Android 2.1 系统源码编译失败

发布于 2016-12-15 21:53:58 字数 2189 浏览 1401 评论 1

Archlinux 3.6
gcc 4.7
bash 4.2

android.git.kernel.org 上面下的源码,make 错误如下:

host C++: gtest-filepath_test <= external/gtest/test/gtest-filepath_test.cc
external/gtest/test/gtest-filepath_test.cc: 在成员函数‘virtual void testing::internal::{anonymous}::GetCurrentDirTest_ReturnsCurrentDir_Test::TestBody()’中:
external/gtest/test/gtest-filepath_test.cc:98:24: 错误:‘chdir’在此作用域中尚未声明
external/gtest/test/gtest-filepath_test.cc: 在成员函数‘virtual void testing::internal::{anonymous}::DirectoryCreationTest::SetUp()’中:
external/gtest/test/gtest-filepath_test.cc:442:33: 错误:‘rmdir’在此作用域中尚未声明
external/gtest/test/gtest-filepath_test.cc: 在成员函数‘virtual void testing::internal::{anonymous}::DirectoryCreationTest::TearDown()’中:
external/gtest/test/gtest-filepath_test.cc:453:33: 错误:‘rmdir’在此作用域中尚未声明
In file included from external/gtest/test/../include/gtest/gtest-param-test.h:158:0,
from external/gtest/test/../include/gtest/gtest.h:69,
from external/gtest/test/gtest-filepath_test.cc:42:
external/gtest/test/../include/gtest/internal/gtest-param-util-generated.h: In instantiation of ‘testing::internal::ValueArray2<T1, T2>::operator testing::internal::ParamGenerator<T>() const [with T = bool; T1 = bool; T2 = bool]’:
external/gtest/test/../include/gtest/gtest-param-test.h:1185:28: required from here
external/gtest/test/../include/gtest/internal/gtest-param-util-generated.h:77:26: 错误:‘ValuesIn’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from external/gtest/test/../include/gtest/gtest.h:69:0,
from external/gtest/test/gtest-filepath_test.cc:42:
external/gtest/test/../include/gtest/gtest-param-test.h:287:58: 附注:‘template<class Container> testing::internal::ParamGenerator<typename Container::value_type> testing::ValuesIn(const Container&)’ declared here, later in the translation unit
make: *** [out/host/linux-x86/obj/EXECUTABLES/gtest-filepath_test_intermediates/gtest-filepath_test.o] 错误 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

想挽留 2016-12-21 16:55:32

应该是依赖的包安装有问题,我之前(Ubuntu上)遇到过,解决办法如下:
32系统编译依赖的包是:
git-core gnupg sun-java5-jdk flex bison gperf build-essential zip curl zlib1g-dev libsdl-dev libesd0-dev libwxgtk2.6-dev libncurses5-dev

而64 bit 下的依赖包为:
git-core gnupg flex bison gperf build-essential zip curl sun-java5-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev

注意其中加粗的地方是不同的,根据你的系统去选择

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文