Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failures under GCC 10 #48

Open
felixonmars opened this issue Dec 18, 2020 · 7 comments
Open

Build failures under GCC 10 #48

felixonmars opened this issue Dec 18, 2020 · 7 comments

Comments

@felixonmars
Copy link

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
Copy link

slvr32 commented Mar 22, 2021

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
Copy link
Author

@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
Copy link
Author

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

@slvr32
Copy link

slvr32 commented Mar 22, 2021

@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
Copy link
Author

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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants