In file included from /usr/local/lib/gcc6/include/c++/bits/char_traits.h:39:0, from /usr/local/lib/gcc6/include/c++/ios:40, from /usr/local/lib/gcc6/include/c++/ostream:38, from /usr/local/lib/gcc6/include/c++/iostream:39, from uselibSNL.cpp:28: /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2 min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2 max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ In file included from ../../libSNL/src/snlCurveBase.h:23:0, from ../../libSNL/src/snlCurve.h:25, from ../../libSNL/src/snlSurface.h:20, from uselibSNL.cpp:30: ../../libSNL/src/snlKnotVector.h:115:18: error: macro "max" requires 2 arguments, but only 1 given knot max() const; // Max knot val. ^ ../../libSNL/src/snlKnotVector.h:116:18: error: macro "min" requires 2 arguments, but only 1 given knot min() const; // Min knot val. ^ In file included from ./cgx.h:25:0, from uselibSNL.h:8, from uselibSNL.cpp:26: /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:195:5: error: expected unqualified-id before 'const' min(const _Tp& __a, const _Tp& __b) ^ /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:195:5: error: expected ')' before 'const' /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:195:5: error: expected ')' before 'const' /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:195:5: error: expected initializer before 'const' /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:219:5: error: expected unqualified-id before 'const' max(const _Tp& __a, const _Tp& __b) ^ /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:219:5: error: expected ')' before 'const' /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:219:5: error: expected ')' before 'const' /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:219:5: error: expected initializer before 'const' In file included from /usr/local/lib/gcc6/include/c++/bits/char_traits.h:39:0, from /usr/local/lib/gcc6/include/c++/ios:40, from /usr/local/lib/gcc6/include/c++/ostream:38, from /usr/local/lib/gcc6/include/c++/iostream:39, from uselibSNL.cpp:28: /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:243:5: error: 'std::min' declared as an 'inline' variable min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^~~ /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:246:7: error: expected primary-expression before 'if' if (__comp(__b, __a)) ^~ /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:246:7: error: expected '}' before 'if' /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:246:7: error: expected ';' before 'if' /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:248:7: error: expected unqualified-id before 'return' return __a; ^~~~~~ /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:265:5: error: 'max' declared as an 'inline' variable max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^~~ /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:268:7: error: expected primary-expression before 'if' if (__comp(__a, __b)) ^~ /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:268:7: error: expected '}' before 'if' /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:268:7: error: expected ';' before 'if' /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:270:7: error: expected unqualified-id before 'return' return __a; ^~~~~~ /usr/local/lib/gcc6/include/c++/bits/stl_algobase.h:271:5: error: expected declaration before '}' token } ^ build log: http://sprunge.us/dXhE
CalculiX graphiX (cgx) is the half of calculix that is failing to build. Even if it builds, it will coredump due to libstdc++ vs libc++ issues. ccx, the other part, has to be built with GCC (for fortran). The solution seems to be to split the ccx and cgx parts into different ports, which is not at all difficult since both are different programs/tarballs.
I split the port so the graphic stuff builds with clang.
(In reply to Pedro F. Giffuni from comment #2) > I split the port so the graphic stuff builds with clang. Thanks, Pedro. Pedro, Maho-san, this is now one of only two PRs blocking the update to GCC 6. Can you help getting this closed? That'd be awesome!
(In reply to Gerald Pfeifer from comment #3) ... Unfortunately Maho released maintainership of the port and I am not a ports committer. If someone approves PRs 220433 and 220434, I can commit it.
As of r447973, the code in question is built with clang, so this should not be an issue anymore.
Is there anything left to do here or can we close this one as fixed?
I think we're done. :-) Thank you, guys!