请选择 进入手机版 | 继续访问电脑版

ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 16659|回复: 11

[Linux] 编译so库出现错误

[复制链接]
发表于 2018-1-19 14:49:22 | 显示全部楼层 |阅读模式
本帖最后由 ffmpeggepmff 于 2018-1-19 18:27 编辑

libavcodec/hevc_mvs.c: In function 'derive_spatial_merge_candidates':
libavcodec/hevc_mvs.c:208:15: error: 'y0000000' undeclared (first use in this function)
             ((y ## v) >> s->ps.sps->log2_min_pu_size))
               ^
libavcodec/hevc_mvs.c:204:14: note: in definition of macro 'TAB_MVF'
     tab_mvf[(y) * min_pu_width + x]
              ^
各位师兄,我编译ffmpeg出现上述问题,有人遇到过吗?
第一次接触ndk,要编译ffmpeg,然后就出现源码的错误?(我感觉这源码不可能会有问题啊)
OS ubuntu16.04LTS
ffmpeg version 3.4.1
ndk android-ndk-r14b

回复

使用道具 举报

发表于 2018-1-19 17:47:26 | 显示全部楼层
试试用NDK版本r13b
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-1-19 21:03:46 | 显示全部楼层
chodison 发表于 2018-1-19 17:47
试试用NDK版本r13b

还是同样的错误
是不是大家都是去改错误行的代码啊?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-1-19 21:08:31 | 显示全部楼层
执行 .../path/arm-linux-androideabi-gcc --version
显示 arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-1-19 21:10:36 | 显示全部楼层
脚本文件
#!/bin/bash
make clean
export NDK=/home/xxx/下载/android-ndk-r13b  #android-ndk-r14b
export SYSROOT=$NDK/platforms/android-21/arch-arm/
export TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
export PREFIX=$(pwd)/android/arm

./configure --target-os=linux \
    --prefix=$PREFIX --arch=arm \
    --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
    --enable-cross-compile \
    --sysroot=$SYSROOT \
    --enable-shared \
    --disable-static \
    --disable-x86asm \
make -j4
make install
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-1-19 21:14:18 | 显示全部楼层
先是报如下错误:
libavcodec/aaccoder.c:803:25: error: expected identifier or '(' before numeric constant
                     int B0 = 0, B1 = 0;
                         ^
libavcodec/aaccoder.c:865:28: error: lvalue required as left operand of assignment
                         B0 += b1+b2;
                            ^
libavcodec/aaccoder.c:866:25: error: 'B1' undeclared (first use in this function)
                         B1 += b3+b4;
                         ^
我就到对应路径下,将代码分行,改变量名,然后重新执行脚本。随后又出现如下问题,
libavcodec/hevc_mvs.c: In function 'derive_spatial_merge_candidates':
libavcodec/hevc_mvs.c:208:15: error: 'y0000000' undeclared (first use in this function)
             ((y ## v) >> s->ps.sps->log2_min_pu_size))
               ^
我看网上没有这样的情况发生啊~比较困惑 自己是那里操作有误 想问问大家谁有过这样的经验
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-1-20 11:52:36 | 显示全部楼层
本帖最后由 ffmpeggepmff 于 2018-1-20 12:45 编辑

已解决 ffmpeg3.4.1在上述的环境下会编译失败(出现上述错误) 后来换了ffmpeg3.2.10 同样的操作编译成功ffmpeg
ffmpeg官网 Bug Reports 的第一条

Before reporting a bug, please consider the following:
FFmpeg is in a state of perpetual development.
As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists.


FFmpeg处于持续发展的状态。
因此,如果您希望查询或报告错误,则必须尝试使用FFmpeg的最新开发分支版本来确认问题是否存在。
(3.4.1 was released on 2017-12-10   3.3.6 was released on 2017-12-31 3.2.10 was released on 2018-01-13)

回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-1-20 11:55:11 | 显示全部楼层
ffmpeggepmff 发表于 2018-1-19 21:03
还是同样的错误
是不是大家都是去改错误行的代码啊?

谢谢你的帮助
回复 支持 反对

使用道具 举报

发表于 2018-1-22 09:56:32 | 显示全部楼层
最开始用的3.4.1最新版本,我也出现相同的问题;
后面换成3.2.10稳定版后成功编译
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-1-22 17:40:10 | 显示全部楼层
nardoo 发表于 2018-1-22 09:56
最开始用的3.4.1最新版本,我也出现相同的问题;
后面换成3.2.10稳定版后成功编译
...

那问一下你有没有编译x264的经历?编译x264出现No working C compiler found.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-4-16 20:24 , Processed in 0.054011 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表