./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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
我用的是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的时候是没有的。
我的临时建议是显示的关掉这个自动侦测的选项,参考修改在这里
最终的方案我会同步一个issue给ffmpeg的owner
vendor/hisi/hi35xx/middleware/source/third_party/ffmpeg 使用的是三方软件自身的automake,这里在configure的时候会自动根据环境打开一些配置,比如vdpau, 而这些依赖在编译harmonyos的时候是没有的。
我的临时建议是显示的关掉这个自动侦测的选项,参考修改在这里
最终的方案我会同步一个issue给ffmpeg的owner
已经同步issue
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吧.
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.
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
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.
--disable-valgrind-backtrace
this doesn't resolve my problem
登录 后才可以发表评论