1.2K Star 6.3K Fork 5.4K

OpenHarmony / docs

 / 详情

[编译报错]fatal error: 'vdpau/vdpau.h' file not found

已完成
缺陷
创建于  
2020-09-12 17:06

./build.py ipcamera_hi3516dv300
一直是这个错了:

In file included from libavcodec/vdpau.c:31:
libavcodec/vdpau.h:52:10: fatal error: 'vdpau/vdpau.h' file not found
#include <vdpau/vdpau.h>
^~~~~~~~~~~~~~~
1 error generated.
CC libavutil/bprint.o
make[1]: *** [ffbuild/common.mak:60: libavcodec/vdpau.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/kabirz/hm/vendor/hisi/hi35xx/middleware/source/third_party/ffmpeg/ffmpeg-y'
make: *** [Makefile:41: ffmpeg-y] Error 2
Traceback (most recent call last):
File "../../build/lite/build_ext_components.py", line 64, in
sys.exit(main())
File "../../build/lite/build_ext_components.py", line 58, in main

评论 (12)

kabirz 创建了缺陷
kabirz 关联仓库设置为OpenHarmony/docs
NEEN 添加了product-question(已删除)标签
展开全部操作日志

我用的是archlinux, 进入到vendor/hisi/hi35xx/middleware/source/third_party/ffmpeg/ffmpeg-y

hm/vendor/hisi/hi35xx/middleware/source/third_party/ffmpeg/ffmpeg-y (7da453973f●)
$ make V=1
sed 's/MAJOR/58/' libavformat/libavformat.v | cat > libavformat/libavformat.ver
/home/kabirz/llvm/bin/../bin/clang -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DHAVE_AV_CONFIG_H -DBUILDING_avcodec -mfloat-abi=softfp -mfpu=neon-vfpv4 -fPIC -fstack-protector-all -s -ftrapv -mcpu=cortex-a7 -std=c11 -fomit-frame-pointer -fPIC -marm -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-char-subscripts -Oz -fno-math-errno -fno-signed-zeros -mstack-alignment=16 -Qunused-arguments -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -I/lib/cxxstl/gccinclude --target=arm-liteos --sysroot=../../../../../../../../prebuilts/lite/sysroot -Wno-deprecated-declarations -Wno-incompatible-pointer-types-discards-qualifiers -Wno-string-plus-int -Wno-absolute-value -Wno-format -Wno-invalid-source-encoding -Wno-missing-prototypes -MMD -MF libavcodec/vdpau.d -MT libavcodec/vdpau.o -c -o libavcodec/vdpau.o libavcodec/vdpau.c
In file included from libavcodec/vdpau.c:31:
libavcodec/vdpau.h:52:10: fatal error: 'vdpau/vdpau.h' file not found
#include <vdpau/vdpau.h>
^~~~~~~~~~~~~~~
1 error generated.
make: *** [ffbuild/common.mak:60: libavcodec/vdpau.o] Error 1

vendor/hisi/hi35xx/middleware/source/third_party/ffmpeg 使用的是三方软件自身的automake,这里在configure的时候会自动根据环境打开一些配置,比如vdpau, 而这些依赖在编译harmonyos的时候是没有的。

我的临时建议是显示的关掉这个自动侦测的选项,参考修改在这里

https://gitee.com/openharmony/vendor_hisi_hi35xx_middleware_source_third_party_ffmpeg/commit/b48b9575ae01f3bd9b79a0d65f50d68668234285

最终的方案我会同步一个issue给ffmpeg的owner

vendor/hisi/hi35xx/middleware/source/third_party/ffmpeg 使用的是三方软件自身的automake,这里在configure的时候会自动根据环境打开一些配置,比如vdpau, 而这些依赖在编译harmonyos的时候是没有的。

我的临时建议是显示的关掉这个自动侦测的选项,参考修改在这里

https://gitee.com/openharmony/vendor_hisi_hi35xx_middleware_source_third_party_ffmpeg/commit/b48b9575ae01f3bd9b79a0d65f50d68668234285

最终的方案我会同步一个issue给ffmpeg的owner

已经同步issue

#I1UX83:ffmpeg 在部分环境上编译失败

disable_decoder_config.sh这样改编译通过:

-- a/disable_decoder_config.sh
+++ b/disable_decoder_config.sh
@@ -47,6 +47,8 @@ configure_attr=" --prefix=./install \
     --enable-bsf=h264_mp4toannexb \
     --enable-bsf=hevc_mp4toannexb \
     --disable-pixelutils \
+    --disable-vdpau \
+    --disable-xlib \
     --enable-demuxer=wav \
     --disable-gpl \
     --disable-zlib \

这两个只在host安装不应该影响交叉编译吧, configure要指定host吧.

@kabirz 非常好
是这个configure问题,我们会先请ffmpeg同学清理一下自动侦测的config,后续考虑移植到GN编译。

@Xingwa

Please make sure the below problem also will be resolved while GN compilation reconsideration period.

libavutil/log.cCC libavutil/md5.o
:49:10: fatal error: 'valgrind/valgrind.h' file not found
#include <valgrind/valgrind.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
ffbuild/common.mak:60: recipe for target 'libavutil/log.o' failed
make[1]: *** [libavutil/log.o] Error 1
make[1]: *** Waiting for unfinished jobs....
CC libavutil/mem.o
make[1]: Leaving directory '/media/default/3641821b-2ecd-4f0a-81c0-d52a5412c894/work/work_hos/work_hos_1_0/vendor/hisi/hi35xx/middleware/source/third_party/ffmpeg/ffmpeg-y'
Makefile:39: recipe for target 'ffmpeg-y' failed
make: *** [ffmpeg-y] Error 2
Traceback (most recent call last):
File "../../build/lite/build_ext_components.py", line 64, in
sys.exit(main())
File "../../build/lite/build_ext_components.py", line 58, in main
cmd_exec(args.command)
File "../../build/lite/build_ext_components.py", line 32, in cmd_exec
raise Exception("{} failed, return code is {}".format(cmd, ret_code))
Exception: ['./build.sh', '/media/default/3641821b-2ecd-4f0a-81c0-d52a5412c894/work/work_hos/work_hos_1_0/out/ipcamera_hi3516dv300', 'hi3516dv300', 'liteos_a', 'clang', '/home/default/llvm/bin/..'] failed, return code is 2

Note :
valgrind-3.13.0 version available in system but still issue is reported. Thanks in advance.

@Dayananda V
Could you also try to add --disable-valgrind-backtrace in the disable_decoder_config.sh

Currently the confiure script detect some feautre from host but no avalivable on target platfrom. It is common issue.

@Xingwa

adding --disable-valgrind-backtrace in disable_decoder_config.sh doesn't help still same issue reproducing, any way am excluded valgrind dependency by commented and build success by following code change in libavutil/log.c


old code:

#if HAVE_VALGRIND_VALGRIND_H
#include <valgrind/valgrind.h>
/* this is the log level at which valgrind will output a full backtrace */
#define BACKTRACE_LOGLEVEL AV_LOG_ERROR
#endif

new code:

#if HAVE_VALGRIND_VALGRIND_H
//#include <valgrind/valgrind.h>
/* this is the log level at which valgrind will output a full backtrace */
//#define BACKTRACE_LOGLEVEL AV_LOG_ERROR
#endif

Xingwa 负责人设置为yuan.w.hong

I have assigned this issue to ffmpeg folks.

@Dayananda V
Could you also try to add --disable-valgrind-backtrace in the disable_decoder_config.sh
Currently the confiure script detect some feautre from host but no avalivable on target platfrom. It is common issue.

@Xingwa

--disable-valgrind-backtrace this doesn't resolve my problem :-1:

NEEN 添加了doc_code(已删除)标签
yuan.w.hong 任务状态待办的 修改为已完成
NEEN 移除了doc_code(已删除)标签
NEEN 移除了product-question(已删除)标签

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(5)
其他
1
https://gitee.com/openharmony/docs.git
git@gitee.com:openharmony/docs.git
openharmony
docs
docs

搜索帮助

344bd9b3 5694891 D2dac590 5694891