libx264,交叉编译,报“v4si”的错误,解决方法

项目场景:

libx264,交叉编译,安装步骤网上都能搜得到(解压,配置,编译),问题出现在make编译时,会报“v4si”的错误,在网上搜索到的结果,都不太明确如何解决,今天遇到了顺便写一下解决方法:


问题描述

直接看报错信息:

gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math  -Wall -I. -I. -std=gnu99 -D_GNU_SOURCE -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden   -c filters/video/cache.c -o filters/video/cache-8.o -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
In file included from ./common/common.h:811:0,
                 from filters/video/cache.c:28:
./common/rectangle.h: In function ‘x264_macroblock_cache_rect’:
./common/rectangle.h:84:9: error: unknown type name ‘v4si’; did you mean ‘__v4si’?
         v4si v16 = {v,v,v,v};
         ^~~~
         __v4si
./common/rectangle.h:84:23: warning: excess elements in scalar initializer
         v4si v16 = {v,v,v,v};
                       ^
./common/rectangle.h:84:23: note: (near initialization for ‘v16’)
./common/rectangle.h:84:25: warning: excess elements in scalar initializer
         v4si v16 = {v,v,v,v};
                         ^
./common/rectangle.h:84:25: note: (near initialization for ‘v16’)
./common/rectangle.h:84:27: warning: excess elements in scalar initializer
         v4si v16 = {v,v,v,v};
                           ^
./common/rectangle.h:84:27: note: (near initialization for ‘v16’)
./common/rectangle.h:86:9: error: can’t convert a value of type ‘int’ to vector type ‘__vector(4) float’ which has different size
         M128( d+s*0+0 ) = (__m128)v16;
         ^~~~
./common/rectangle.h:87:9: error: can’t convert a value of type ‘int’ to vector type ‘__vector(4) float’ which has different size
         M128( d+s*1+0 ) = (__m128)v16;
         ^~~~
./common/rectangle.h:89:9: error: can’t convert a value of type ‘int’ to vector type ‘__vector(4) float’ which has different size
         M128( d+s*2+0 ) = (__m128)v16;
         ^~~~
./common/rectangle.h:90:9: error: can’t convert a value of type ‘int’ to vector type ‘__vector(4) float’ which has different size
         M128( d+s*3+0 ) = (__m128)v16;
         ^~~~
Makefile:284: recipe for target 'filters/video/cache-8.o' failed
make: *** [filters/video/cache-8.o] Error 1


解决方案:

./configure xx (xx是你配置的参数)
配置之后还需要修改config.mak文件信息,如图下所示:
在这里插入图片描述
把这个文件所有gcc替换成交叉编译的用的,比如我这里是aarch64-mix210-linux-gcc
保存再make就不会再报这个问题了

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值