pixman ndk交叉编译

jun_zhu 2017-03-07 10:01:29
pixman-arm.c:99:26: fatal error: cpu-features.h: No such file or directory 怎么解决?

...全文
813 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
环境变量设置 _NDK_SYSROOT
export _NDK_SYSROOT=/data/yanglf/tools/arm-linux-androideabi-4.9_android-18/sysroot
然后需要给代码打补丁

diff -rNu pixman-0.34.0-orig/Makefile.am pixman-0.34.0/Makefile.am
--- pixman-0.34.0-orig/Makefile.am      2015-06-30 17:48:31.000000000 +0800
+++ pixman-0.34.0/Makefile.am   2016-08-02 16:15:11.161688372 +0800
@@ -1,4 +1,4 @@
-SUBDIRS = pixman demos test
+SUBDIRS = pixman

 pkgconfigdir=$(libdir)/pkgconfig
 pkgconfig_DATA=pixman-1.pc
diff -rNu pixman-0.34.0-orig/pixman/pixman-arm.c pixman-0.34.0/pixman/pixman-arm.c
--- pixman-0.34.0-orig/pixman/pixman-arm.c      2015-06-30 17:48:31.000000000 +0800
+++ pixman-0.34.0/pixman/pixman-arm.c   2016-08-02 16:16:10.117688323 +0800
@@ -102,7 +102,7 @@
 detect_cpu_features (void)
 {
     arm_cpu_features_t features = 0;
-    AndroidCpuFamily cpu_family;
+/*    AndroidCpuFamily cpu_family;
     uint64_t cpu_features;

     cpu_family = android_getCpuFamily();
@@ -119,7 +119,8 @@
        if (cpu_features & ANDROID_CPU_ARM_FEATURE_NEON)
            features |= ARM_NEON;
     }
-
+*/
+    features |= ARM_V7 | ARM_VFP | ARM_NEON;
     return features;
 }

以上就是我编译的办法,你自己看着改吧!
91program 2017-03-07
  • 打赏
  • 举报
回复
No such file or directory LZ,你有没有确认这个文件 cpu-features.h 是否存在呢? 如果存在,则可能是 include 路径设置的问题;如果没有,就没有什么好说的。

19,502

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧