Bug 216772 - games/warsow: fails to build with libc++ 4.0
Summary: games/warsow: fails to build with libc++ 4.0
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: freebsd-ports-bugs (Nobody)
Keywords: needs-patch
Depends on:
Blocks: 216008
  Show dependency treegraph
Reported: 2017-02-04 05:31 UTC by Jan Beich
Modified: 2017-02-06 02:01 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2017-02-04 05:31:07 UTC
In file included from angelwrap/qas_angelwrap.cpp:25:
In file included from angelwrap/addon/addon_dictionary.h:20:
In file included from /usr/include/c++/v1/map:442:
/usr/include/c++/v1/__tree:1111:55: error: too few arguments provided to function-like macro invocation
                numeric_limits<difference_type >::max());}
angelwrap/../gameshared/q_math.h:127:9: note: macro 'max' defined here
#define max( a, b ) ( ( a ) > ( b ) ? ( a ) : ( b ) )
In file included from angelwrap/qas_angelwrap.cpp:32:
In file included from /usr/include/c++/v1/list:180:
/usr/include/c++/v1/__undef_min_max:17:2: warning: : macro min is incompatible with C++.  #undefing min [-W#warnings]
#warning: macro min is incompatible with C++.  #undefing min
/usr/include/c++/v1/__undef_min_max:29:2: warning: : macro max is incompatible with C++.  #undefing max [-W#warnings]
#warning: macro max is incompatible with C++.  #undefing max
2 warnings and 1 error generated.

regressed by: https://github.com/llvm-mirror/libcxx/commit/ef3060ef96f9 (r287729)
Comment 1 Jan Beich freebsd_committer 2017-02-04 05:32:37 UTC
While adding "#undef max" into angelwrap/addon/addon_dictionary.h helps, I think, libc++ should include <__undef_min_max> within <map> or <__tree> instead.
Comment 2 Eric Fiselier 2017-02-04 20:40:39 UTC
I would pester the angelwrap maintainer, since #defining those symbols is evil.

None the less I'll merge the suggested libc++ changes into the 4.0 branch today.
Comment 3 Eric Fiselier 2017-02-04 22:48:31 UTC
The fix was merged into the 4.0 branch in r294103.
Comment 4 Dimitry Andric freebsd_committer 2017-02-05 21:50:44 UTC
I imported Eric's fix in r313300 (in the project/clang400-import branch).
Comment 5 Jan Beich freebsd_committer 2017-02-06 02:01:04 UTC
I confirm, the port builds fine now: http://sprunge.us/Edgh