Opened 4 years ago
Closed 3 years ago
#67353 closed defect (fixed)
QuantLib fails to build in Rosetta: error: '__and_' was not declared in this scope; did you mean 'std::__and_'?
| Reported by: | barracuda156 | Owned by: | ryandesign (Ryan Carsten Schmidt) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.8.1 |
| Keywords: | powerpc, snowleopard, rosetta | Cc: | |
| Port: | QuantLib |
Description
/bin/sh ../../../../libtool --tag=CXX --mode=compile /opt/local/bin/g++-mp-12 -DHAVE_CONFIG_H -I../../../.. -I../../../.. -I/opt/local/libexec/boost/1.76/include -I/opt/local/include -isystem /opt/local/libexec/boost/1.76/include -pipe -I/opt/local/libexec/boost/1.76/include -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT squarerootprocessrndcalculator.lo -MD -MP -MF $depbase.Tpo -c -o squarerootprocessrndcalculator.lo squarerootprocessrndcalculator.cpp &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: /opt/local/bin/g++-mp-12 -DHAVE_CONFIG_H -I../../../.. -I../../../.. -I/opt/local/libexec/boost/1.76/include -I/opt/local/include -isystem /opt/local/libexec/boost/1.76/include -pipe -I/opt/local/libexec/boost/1.76/include -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT squarerootprocessrndcalculator.lo -MD -MP -MF .deps/squarerootprocessrndcalculator.Tpo -c squarerootprocessrndcalculator.cpp -fno-common -DPIC -o .libs/squarerootprocessrndcalculator.o
In file included from /opt/local/libexec/boost/1.76/include/boost/math/tools/mp.hpp:341,
from /opt/local/libexec/boost/1.76/include/boost/math/policies/policy.hpp:11,
from /opt/local/libexec/boost/1.76/include/boost/math/tools/precision.hpp:16,
from /opt/local/libexec/boost/1.76/include/boost/math/tools/fraction.hpp:13,
from /opt/local/libexec/boost/1.76/include/boost/math/special_functions/gamma.hpp:19,
from /opt/local/libexec/boost/1.76/include/boost/math/distributions/non_central_chi_squared.hpp:14,
from squarerootprocessrndcalculator.cpp:24:
/opt/local/include/gcc12/c++/utility:94:14: error: '__and_' was not declared in this scope; did you mean 'std::__and_'?
94 | noexcept(__and_<is_nothrow_move_constructible<_Tp>,
| ^~~~~~
| std::__and_
In file included from /opt/local/include/gcc12/c++/bits/stl_pair.h:60,
from /opt/local/include/gcc12/c++/bits/stl_algobase.h:64,
from /opt/local/include/gcc12/c++/bits/specfun.h:45,
from /opt/local/include/gcc12/c++/cmath:1935,
from ../../../../ql/mathconstants.hpp:23,
from ../../../../ql/qldefines.hpp:126,
from ../../../../ql/types.hpp:28,
from ../../../../ql/methods/finitedifferences/utilities/riskneutraldensitycalculator.hpp:28,
from ../../../../ql/methods/finitedifferences/utilities/squarerootprocessrndcalculator.hpp:28,
from squarerootprocessrndcalculator.cpp:22:
/opt/local/include/gcc12/c++/type_traits:154:12: note: 'std::__and_' declared here
154 | struct __and_;
| ^~~~~~
/opt/local/include/gcc12/c++/utility:94:21: error: 'is_nothrow_move_constructible' was not declared in this scope; did you mean 'std::is_nothrow_move_constructible'?
94 | noexcept(__and_<is_nothrow_move_constructible<_Tp>,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| std::is_nothrow_move_constructible
/opt/local/include/gcc12/c++/type_traits:1102:12: note: 'std::is_nothrow_move_constructible' declared here
1102 | struct is_nothrow_move_constructible
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/gcc12/c++/utility:94:54: error: expected primary-expression before '>' token
94 | noexcept(__and_<is_nothrow_move_constructible<_Tp>,
| ^
/opt/local/include/gcc12/c++/utility:94:55: error: expected primary-expression before ',' token
94 | noexcept(__and_<is_nothrow_move_constructible<_Tp>,
| ^
/opt/local/include/gcc12/c++/utility:94:55: error: expected ')' before ',' token
94 | noexcept(__and_<is_nothrow_move_constructible<_Tp>,
| ~ ^
| )
/opt/local/include/gcc12/c++/utility:94:55: error: expected ';' before ',' token
94 | noexcept(__and_<is_nothrow_move_constructible<_Tp>,
| ^
| ;
/opt/local/include/gcc12/c++/utility:103:15: error: 'add_const_t' does not name a type
103 | constexpr add_const_t<_Tp>&
| ^~~~~~~~~~~
/opt/local/libexec/boost/1.76/include/boost/math/tools/mp.hpp:342:10: error: 'boost::math::tools::meta_programming::std::size_t' has not been declared
342 | template<std::size_t... I>
| ^~~
/opt/local/libexec/boost/1.76/include/boost/math/tools/mp.hpp:343:29: error: 'index_sequence' in namespace 'boost::math::tools::meta_programming::std' does not name a template type
343 | using index_sequence = std::index_sequence<I...>;
| ^~~~~~~~~~~~~~
/opt/local/libexec/boost/1.76/include/boost/math/tools/mp.hpp:345:10: error: 'boost::math::tools::meta_programming::std::size_t' has not been declared
345 | template<std::size_t N>
| ^~~
/opt/local/libexec/boost/1.76/include/boost/math/tools/mp.hpp:346:34: error: 'make_index_sequence' in namespace 'boost::math::tools::meta_programming::std' does not name a template type
346 | using make_index_sequence = std::make_index_sequence<N>;
| ^~~~~~~~~~~~~~~~~~~
/opt/local/libexec/boost/1.76/include/boost/math/tools/mp.hpp:349:33: error: 'index_sequence_for' in namespace 'boost::math::tools::meta_programming::std' does not name a template type
349 | using index_sequence_for = std::index_sequence_for<T...>;
| ^~~~~~~~~~~~~~~~~~
libtool: compile: /opt/local/bin/g++-mp-12 -DHAVE_CONFIG_H -I../../../.. -I../../../.. -I/opt/local/libexec/boost/1.76/include -I/opt/local/include -isystem /opt/local/libexec/boost/1.76/include -pipe -I/opt/local/libexec/boost/1.76/include -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -MT hestonrndcalculator.lo -MD -MP -MF .deps/hestonrndcalculator.Tpo -c hestonrndcalculator.cpp -o hestonrndcalculator.o >/dev/null 2>&1
make[5]: *** [squarerootprocessrndcalculator.lo] Error 1
Attachments (1)
Change History (6)
Changed 4 years ago by barracuda156
| Attachment: | QuantLib_10.6.8_log.txt added |
|---|
comment:1 follow-up: 2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 4 years ago by barracuda156
Replying to ryandesign:
QuantLib builds fine using clang on normal 10.6 and later systems so this must be specific to your system where you're building using gcc 12.
For the record, this is on a standard 10.6.8, so it is nothing about my system: neither OS nor compiler are modified in any way.
comment:3 follow-up: 4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
It is nonstandard in that you are asking to build for ppc.
comment:4 Changed 4 years ago by barracuda156
Replying to ryandesign:
It is nonstandard in that you are asking to build for ppc.
It is a bug in Boost 1.76: https://github.com/sccn/liblsl/issues/189#issuecomment-1501153750 Can we move the port to use other version of Boost?
comment:5 Changed 3 years ago by barracuda156
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.

QuantLib builds fine using clang on normal 10.6 and later systems so this must be specific to your system where you're building using gcc 12.
I found the same error message in this gcc bug report which was closed as invalid. There, the problem was that the user was including a header within a
namespacedirective, which is apparently not permitted. You could check whether any of the boost or QuantLib files mentioned do something like that.