TechSmith / mp4v2

Fork of mp4v2: https://code.google.com/archive/p/mp4v2/
Other
282 stars 134 forks source link

Build failures under GCC 10 #48

Open felixonmars opened 3 years ago

felixonmars commented 3 years ago
libutil/Utility.cpp: In member function ‘bool mp4v2::util::Utility::process_impl()’:
libutil/Utility.cpp:534:18: error: narrowing conversion of ‘mp4v2::util::Utility::LC_DEBUG’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
  534 |             case LC_DEBUG:
      |                  ^~~~~~~~
libutil/Utility.cpp:538:18: error: narrowing conversion of ‘mp4v2::util::Utility::LC_VERBOSE’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
  538 |             case LC_VERBOSE:
      |                  ^~~~~~~~~~
libutil/Utility.cpp:545:18: error: narrowing conversion of ‘mp4v2::util::Utility::LC_HELP’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
  545 |             case LC_HELP:
      |                  ^~~~~~~
libutil/Utility.cpp:549:18: error: narrowing conversion of ‘mp4v2::util::Utility::LC_VERSION’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
  549 |             case LC_VERSION:
      |                  ^~~~~~~~~~
libutil/Utility.cpp:553:18: error: narrowing conversion of ‘mp4v2::util::Utility::LC_VERSIONX’ from ‘unsigned int’ to ‘int’ [-Wnarrowing]
  553 |             case LC_VERSIONX:
      |                  ^~~~~~~~~~~
slvr32 commented 3 years ago

Just FYI, I successfully built mp4v2-2.1.0 with gcc/g++ 10.2 on a Slackware64-current (20210320) install as follows...

$ gzip -dc mp4v2-2.1.0.tar.gz | tar xvf - $ cd mp4v2-2.1.0 $ CXXFLAGS="-std=gnu++98" ./configure --prefix=/my/favorite/prefix $ make

(success)

felixonmars commented 3 years ago

@slvr32 Thanks. Unfortunately that's a different problem and we are using that patch already as well.

Adding CXXFLAGS="-std=gnu++98" as you suggested makes the error worse (error: ‘nullptr’ was not declared in this scope/identifier ‘nullptr’ is a keyword in C++11 [-Wc++11-compat]).

felixonmars commented 3 years ago

FYI: I am using -Wno-narrowing for now.

slvr32 commented 3 years ago

@felixonmars

I edited my original comment a couple of times, but I ended up having success without any patch, and just the details in my current edited comment.

I also qualified the details of my system, since you didn't mention specifics about yours..

felixonmars commented 3 years ago

Thanks for the info. I am building mp4v2 4.1.4 (& packaging) on latest Arch Linux x86_64, with gcc/g++ 10.2.0.

mathpopo commented 1 year ago

util/mp4art.cpp: In member function 'virtual bool mp4v2::util::ArtUtility::utility_option(int, bool&)': util/mp4art.cpp:380:14: error: narrowing conversion of 'mp4v2::util::ArtUtility::LC_ART_ANY' from 'unsigned int' to 'int' [-Wnarrowing] 380 | case LC_ART_ANY: | ^~~~~~ util/mp4art.cpp:384:14: error: narrowing conversion of 'mp4v2::util::ArtUtility::LC_ART_INDEX' from 'unsigned int' to 'int' [-Wnarrowing] 384 | case LC_ART_INDEX: | ^~~~ util/mp4art.cpp:393:14: error: narrowing conversion of 'mp4v2::util::ArtUtility::LC_LIST' from 'unsigned int' to 'int' [-Wnarrowing] 393 | case LC_LIST: | ^~~ util/mp4art.cpp:397:14: error: narrowing conversion of 'mp4v2::util::ArtUtility::LC_ADD' from 'unsigned int' to 'int' [-Wnarrowing] 397 | case LC_ADD: | ^~ util/mp4art.cpp:404:14: error: narrowing conversion of 'mp4v2::util::ArtUtility::LC_REMOVE' from 'unsigned int' to 'int' [-Wnarrowing] 404 | case LC_REMOVE: | ^~~~~ util/mp4art.cpp:408:14: error: narrowing conversion of 'mp4v2::util::ArtUtility::LC_REPLACE' from 'unsigned int' to 'int' [-Wnarrowing] 408 | case LC_REPLACE: | ^~~~~~ util/mp4art.cpp:415:14: error: narrowing conversion of 'mp4v2::util::ArtUtility::LC_EXTRACT' from 'unsigned int' to 'int' [-Wnarrowing] 415 | case LC_EXTRACT: | ^~~~~~ make: [GNUmakefile:1376: util/mp4art.o] Error 1 make: Waiting for unfinished jobs.... libtool: compile: g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/atom_chpl.cpp -o src/atom_chpl.o >/dev/null 2>&1 libtool: compile: g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/atom_amr.cpp -o src/atom_amr.o >/dev/null 2>&1 libtool: compile: g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/3gp.cpp -o src/3gp.o >/dev/null 2>&1 libtool: compile: g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/atom_avc1.cpp -o src/atom_avc1.o >/dev/null 2>&1 libtool: compile: g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/atom_ac3.cpp -o src/atom_ac3.o >/dev/null 2>&1 libtool: compile: g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/atom_colr.cpp -o src/atom_colr.o >/dev/null 2>&1 libtool: compile: g++ -DHAVE_CONFIG_H -I./include -I./include -I. -I. -Wall -Wformat -g -O2 -fvisibility=hidden -c src/atom_avcC.cpp -o src/atom_avcC.o >/dev/null 2>&1 root@eaaff158c96c:/docker/mp4v2# gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 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.

mathpopo commented 1 year ago

CXXFLAGS="-std=gnu++98" can solve isue