intel / libyami

Yet Another Media Infrastructure. it is core part of media codec with hardware acceleration, it is yummy to your video experience on Linux like platform.
Apache License 2.0
146 stars 106 forks source link

Build fails with -Werror=format-security on Fedora 28 (rawhide) #830

Closed kwizart closed 6 years ago

kwizart commented 6 years ago

Here is the build.log

/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -Dvp8_norm=libyami_vp8_norm -Dvp8dx_start_decode=libyami_vp8dx_start_decode -Dvp8dx_bool_decoder_fill=libyami_vp8dx_bool_decoder_fill -I../interface -I.. -g -O2 -Wall -Wno-unused-function -Wno-cpp -Wno-missing-braces -Werror -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -c -o libyami_codecparser_la-vp8_parser.lo test -f 'vp8_parser.cpp' || echo './'vp8_parser.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -Dvp8_norm=libyami_vp8_norm -Dvp8dx_start_decode=libyami_vp8dx_start_decode -Dvp8dx_bool_decoder_fill=libyami_vp8dx_bool_decoder_fill -I../interface -I.. -g -O2 -Wall -Wno-unused-function -Wno-cpp -Wno-missing-braces -Werror -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -c vp8_parser.cpp -fPIC -DPIC -o .libs/libyami_codecparser_la-vp8_parser.o vp8_parser.cpp: In member function 'YamiParser::Vp8ParserResult YamiParser::Vp8Parser::ParseFrame(const uint8_t, size_t, YamiParser::Vp8FrameHeader)': vp8_parser.cpp:98:32: error: 'void memset(void, int, size_t)' clearing an object of non-trivial type 'struct YamiParser::Vp8FrameHeader'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(fhdr, 0, sizeof(*fhdr)); ^ In file included from vp8_parser.cpp:44: vp8_parser.h:131:8: note: 'struct YamiParser::Vp8FrameHeader' declared here struct Vp8FrameHeader { ^~~~~~ cc1plus: all warnings being treated as errors

xuguangxin commented 6 years ago

Hi @kwizart , thanks for the report. @wangzj0601 could you help check this? thanks

xuguangxin commented 6 years ago

Hi @kwizart , could tell us where to get the Fedora 28? it's not released yet.thanks

kwizart commented 6 years ago

You can get fedora 27 and upgrade using system upgrade: https://fedoraproject.org/wiki/DNF_system_upgrade/

Or get nightly iso directly: http://dl.fedoraproject.org/pub/fedora/linux/development/28/Spins/x86_64/iso/

Thx

uartie commented 6 years ago

You could also use a Docker container to avoid modifying your current host OS.

xuguangxin commented 6 years ago

Hi @kwizart , fixed by #831 ,thanks for reporting

xuguangxin commented 6 years ago

@uartie , thanks for the information.

kwizart commented 6 years ago

Thx for the fixes. I confirm that the package now build with the default options.

But I'd like to enable gtests, and there are some remaining issues there: https://kojipkgs.fedoraproject.org//work/tasks/819/25560819/build.log

Do you want a separate issue ?