Bug 219294 - games/openlierox: fails to build with lang/gcc6 or later
Summary: games/openlierox: fails to build with lang/gcc6 or later
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks: 219275
  Show dependency treegraph
 
Reported: 2017-05-14 22:12 UTC by Jan Beich
Modified: 2017-08-12 13:17 UTC (History)
3 users (show)

See Also:
rakuco: maintainer-feedback-


Attachments
Proposed patch (6.64 KB, patch)
2017-07-26 13:29 UTC, Raphael Kubo da Costa
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2017-05-14 22:12:14 UTC
In file included from ./include/Options.h:25:0,
                 from ./include/LieroX.h:26,
                 from ./include/CClient.h:37,
                 from ./include/DeprecatedGUI/Menu.h:30,
                 from src/client/AuxLib.cpp:64:
./include/StaticAssert.h:18:80: error: pasting "static_assert_typedef_" and ""state_type must be CopyAssignable, CopyConstructible"" does not give a valid preprocessing token
  typedef static_assert_test< (int)sizeof(static_assert_failure< (bool)(X) >) > static_assert_typedef_##desc;
                                                                                ^
In file included from ./include/FindFile.h:23:0,
                 from src/client/AuxLib.cpp:66:
/usr/local/lib/gcc6/include/c++/fstream:86:42: error: macro "static_assert" passed 3 arguments, but takes just 2
       "pos_type must be fpos<state_type>");
                                          ^
--- CMakeFiles/openlierox.dir/src/main.o ---
In file included from ./include/Options.h:25:0,
                 from ./include/LieroX.h:26,
                 from src/main.cpp:17:
./include/StaticAssert.h:18:80: error: pasting "static_assert_typedef_" and ""state_type must be CopyAssignable, CopyConstructible"" does not give a valid preprocessing token
  typedef static_assert_test< (int)sizeof(static_assert_failure< (bool)(X) >) > static_assert_typedef_##desc;
                                                                                ^
In file included from ./include/FindFile.h:23:0,
                 from src/main.cpp:25:
/usr/local/lib/gcc6/include/c++/fstream:86:42: error: macro "static_assert" passed 3 arguments, but takes just 2
       "pos_type must be fpos<state_type>");
                                          ^
--- CMakeFiles/openlierox.dir/src/client/CClient.o ---
In file included from ./include/Options.h:25:0,
                 from ./include/LieroX.h:26,
                 from src/client/CClient.cpp:17:
./include/StaticAssert.h:18:80: error: pasting "static_assert_typedef_" and ""state_type must be CopyAssignable, CopyConstructible"" does not give a valid preprocessing token
  typedef static_assert_test< (int)sizeof(static_assert_failure< (bool)(X) >) > static_assert_typedef_##desc;
                                                                                ^
In file included from ./include/FindFile.h:23:0,
                 from src/client/CClient.cpp:23:
/usr/local/lib/gcc6/include/c++/fstream:86:42: error: macro "static_assert" passed 3 arguments, but takes just 2
       "pos_type must be fpos<state_type>");
                                          ^
In file included from ./include/Options.h:25:0,
                 from ./include/LieroX.h:26,
                 from src/client/CClient.cpp:17:
./include/StaticAssert.h:18:80: error: pasting "static_assert_typedef_" and ""template argument not an integral type"" does not give a valid preprocessing token
  typedef static_assert_test< (int)sizeof(static_assert_failure< (bool)(X) >) > static_assert_typedef_##desc;
                                                                                ^
--- CMakeFiles/openlierox.dir/src/client/CClient_Parse.o ---
In file included from ./include/Options.h:25:0,
                 from ./include/LieroX.h:26,
                 from src/client/CClient_Parse.cpp:21:
./include/StaticAssert.h:18:80: error: pasting "static_assert_typedef_" and ""state_type must be CopyAssignable, CopyConstructible"" does not give a valid preprocessing token
  typedef static_assert_test< (int)sizeof(static_assert_failure< (bool)(X) >) > static_assert_typedef_##desc;
                                                                                ^
In file included from ./include/FindFile.h:23:0,
                 from src/client/CClient_Parse.cpp:27:
/usr/local/lib/gcc6/include/c++/fstream:86:42: error: macro "static_assert" passed 3 arguments, but takes just 2
       "pos_type must be fpos<state_type>");
                                          ^
In file included from ./include/Options.h:25:0,
                 from ./include/LieroX.h:26,
                 from src/client/CClient_Parse.cpp:21:
./include/StaticAssert.h:18:80: error: pasting "static_assert_typedef_" and ""template argument not an integral type"" does not give a valid preprocessing token
  typedef static_assert_test< (int)sizeof(static_assert_failure< (bool)(X) >) > static_assert_typedef_##desc;
                                                                                ^

build log: http://sprunge.us/jNRD
Comment 1 Raphael Kubo da Costa freebsd_committer freebsd_triage 2017-07-26 13:29:32 UTC
Created attachment 184723 [details]
Proposed patch

The attached patch fixes all the "GCC-isms" and remaining issues; I've tested it to work with both clang from base as well as GCC 6.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-08-12 13:16:16 UTC
A commit references this bug:

Author: rakuco
Date: Sat Aug 12 13:15:48 UTC 2017
New revision: 447827
URL: https://svnweb.freebsd.org/changeset/ports/447827

Log:
  Fix build errors with clang and GCC 6.

  Add a few patches to fix several different build errors that prevented the port
  from building with GCC 6 (which uses C++14 by default) as well as clang from
  base.

  PR:		219294
  Approved by:	maintainer timeout (amdmi3, 17 days)

Changes:
  head/games/openlierox/Makefile
  head/games/openlierox/files/patch-include_GfxPrimitives.h
  head/games/openlierox/files/patch-include_StaticAssert.h
  head/games/openlierox/files/patch-libs_pstreams_pstream.h