Bug 1385509

Summary: Error: expected unqualified-id before numeric constant
Product: [Fedora] Fedora Reporter: Antonio T. (sagitter) <anto.trande>
Component: fmtAssignee: Dave Johansen <davejohansen>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anto.trande, davejohansen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-16 04:42:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Antonio T. (sagitter) 2016-10-17 08:49:42 UTC
Description of problem:
fmt does not build on f26 with gcc-6.2.1:

[ 47%] Building CXX object test/CMakeFiles/posix-mock-test.dir/util.cc.o
cd /builddir/build/BUILD/fmt-3.0.0/build/test && /usr/bin/c++   -DFMT_USE_FILE_DESCRIPTORS=1 -DGTEST_HAS_STD_WSTRING=1 -I/builddir/build/BUILD/fmt-3.0.0 -I/builddir/build/BUILD/fmt-3.0.0/test/.  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -DNDEBUG   -std=c++11 -o CMakeFiles/posix-mock-test.dir/util.cc.o -c /builddir/build/BUILD/fmt-3.0.0/test/util.cc
In file included from /usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/limits.h:168:0,
                 from /usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-redhat-linux/6.2.1/include/limits.h:34,
                 from /builddir/build/BUILD/fmt-3.0.0/test/./gmock/gmock.h:2028,
                 from /builddir/build/BUILD/fmt-3.0.0/test/gtest-extra.h:32,
                 from /builddir/build/BUILD/fmt-3.0.0/test/gtest-extra.cc:28:
/builddir/build/BUILD/fmt-3.0.0/fmt/format.h: In member function 'void fmt::internal::ArgFormatterBase<Impl, Char>::visit_char(int)':
/builddir/build/BUILD/fmt-3.0.0/fmt/format.h:1825:20: error: expected unqualified-id before numeric constant
     const unsigned CHAR_WIDTH = 1;
                    ^

Version-Release number of selected component (if applicable):
fmt-3.0.0

How reproducible:
Rebuild on f26 with gcc-6.2.1

Build log: https://copr-be.cloud.fedoraproject.org/results/sagitter/petsc/fedora-rawhide-x86_64/00465843-fmt/build.log.gz

Root log: https://copr-be.cloud.fedoraproject.org/results/sagitter/petsc/fedora-rawhide-x86_64/00465843-fmt/root.log.gz

Comment 1 Antonio T. (sagitter) 2016-10-19 14:50:31 UTC
Fixed in commit https://github.com/fmtlib/fmt/commit/abbefd71666055daac9e14e78262620f9e845850.

Please rebuild fmt.

Comment 2 Antonio T. (sagitter) 2016-11-15 10:40:17 UTC
This issue is blocking other builds on rawhide like that of 'mp'.

Comment 3 Dave Johansen 2016-11-16 04:42:02 UTC
Fixed: https://koji.fedoraproject.org/koji/taskinfo?taskID=16468542

I was able to build f25 in mock without the change, so I believe this is only an issue in rawhide (f26) and won't backport.