[Bug 966257] New: snapper fails to build with GCC 6
http://bugzilla.novell.com/show_bug.cgi?id=966257 Bug ID: 966257 Summary: snapper fails to build with GCC 6 Classification: openSUSE Product: openSUSE Tumbleweed Version: 2015* Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: rguenther@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- In openSUSE:Factory:Staging:Gcc6 snapper fails to build with [ 127s] /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libxml2 -DCONFDIR='"/etc/sysconfig"' -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wno-error=misleading-indentation -Wno-error=narrowing -Wno-error=nonnull -Wno-error=unused-const-variable -g -DNDEBUG -std=c++0x -Wall -Wextra -Wformat=2 -Wnon-virtual-dtor -Wno-unused-parameter -MT BtrfsUtils.lo -MD -MP -MF .deps/BtrfsUtils.Tpo -c -o BtrfsUtils.lo BtrfsUtils.cc [ 127s] libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/libxml2 -DCONFDIR=\"/etc/sysconfig\" -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wno-error=misleading-indentation -Wno-error=narrowing -Wno-error=nonnull -Wno-error=unused-const-variable -g -DNDEBUG -std=c++0x -Wall -Wextra -Wformat=2 -Wnon-virtual-dtor -Wno-unused-parameter -MT BtrfsUtils.lo -MD -MP -MF .deps/BtrfsUtils.Tpo -c BtrfsUtils.cc -fPIC -DPIC -o .libs/BtrfsUtils.o [ 127s] In file included from /usr/include/c++/6/bits/char_traits.h:39:0, [ 127s] from /usr/include/c++/6/ios:40, [ 127s] from /usr/include/c++/6/istream:38, [ 127s] from /usr/include/c++/6/sstream:38, [ 127s] from ../snapper/Log.h:26, [ 127s] from BtrfsUtils.cc:38: [ 127s] /usr/include/c++/6/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2 [ 127s] min(const _Tp& __a, const _Tp& __b, _Compare __comp) [ 127s] ^ [ 127s] /usr/include/c++/6/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2 [ 127s] max(const _Tp& __a, const _Tp& __b, _Compare __comp) [ 127s] ^ [ 127s] In file included from /usr/include/c++/6/chrono:40:0, [ 127s] from ../snapper/AppUtil.h:37, [ 127s] from BtrfsUtils.cc:39: [ 127s] /usr/include/c++/6/limits:320:11: error: macro "min" requires 2 arguments, but only 1 given [ 127s] min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } [ 127s] ^ [ 127s] /usr/include/c++/6/limits:324:11: error: macro "max" requires 2 arguments, but only 1 given [ 127s] max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } [ 127s] ^ [ 127s] /usr/include/c++/6/limits:387:11: error: macro "min" requires 2 arguments, but only 1 given [ 127s] min() _GLIBCXX_USE_NOEXCEPT { return false; } [ 127s] ^ [ 127s] /usr/include/c++/6/limits:390:11: error: macro "max" requires 2 arguments, but only 1 given [ 127s] max() _GLIBCXX_USE_NOEXCEPT { return true; } [ 127s] ^ [ 127s] /usr/include/c++/6/limits:394:38: error: macro "min" requires 2 arguments, but only 1 given [ 127s] lowest() noexcept { return min(); } [ 127s] ^ ... I supect either it doesn't cope with the now default -std=gnu++14 or with the glibc update active in that repository. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=966257
Richard Biener
http://bugzilla.novell.com/show_bug.cgi?id=966257
http://bugzilla.novell.com/show_bug.cgi?id=966257#c3
Richard Biener
Only two include files already cause an error:
#include
#include <string>
Well, you can't blame the kernel (C code) for #defining min/max. If you need
to include C headers be prepared to #undef its macros.
Thus,
#include
http://bugzilla.novell.com/show_bug.cgi?id=966257
http://bugzilla.novell.com/show_bug.cgi?id=966257#c6
--- Comment #6 from Richard Biener
http://bugzilla.novell.com/show_bug.cgi?id=966257
http://bugzilla.novell.com/show_bug.cgi?id=966257#c7
David Sterba
http://bugzilla.novell.com/show_bug.cgi?id=966257
http://bugzilla.novell.com/show_bug.cgi?id=966257#c8
--- Comment #8 from Bernhard Wiedemann
http://bugzilla.novell.com/show_bug.cgi?id=966257
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=966257
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=966257
http://bugzilla.novell.com/show_bug.cgi?id=966257#c9
--- Comment #9 from Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com