-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation failure with g++-4.8 #13
Comments
Thank you. It seems bit odd. |
What is the minor version of gcc4.8? |
I have looked into it a little bit more, and managed to shrink the existing CT-HYB code to the following minimal example that still shows the error: #include <complex>
#include <boost/multiprecision/cpp_bin_float.hpp>
typedef boost::multiprecision::cpp_bin_float_quad EXTENDED_REAL;
template<typename T>
class wcomplex;
typedef wcomplex<EXTENDED_REAL> EXTENDED_COMPLEX;
// (1) Commenting this out eliminates the error:
template<typename T>
wcomplex<T>
operator*(EXTENDED_REAL z, const wcomplex<T> &w) {
return w * z;
}
// (2) Moving this to the 1st line eliminates the error:
#include <Eigen/Dense> As the comments indicate, commenting out the function template definition (1) OR moving the Compilation script: CC=/usr/bin/g++-5
BOOST_INC=/usr/include
EIGEN_INC=/usr/local/eigen/eigen_3.3.4
$CC -I$BOOST_INC -I$EIGEN_INC -o min_test.cpp.o -c min_test.cpp A funny thing is that this minimal example shows the error both with g++-4.8.5 and g++-5.4.0, and with Boost 1.58, 1.63 and 1.65.1 (which is the latest), as well as with Eigen 3.3.4 and with the latest unstable Eigen3. It does not show the error with Eigen 3.3.1. As a proof of concept, i copied I guess it's a viable workaround to include the Eigen headers only once and before any Boost headers; the open question is what's going on and whether it's Eigen, Boost, or C++ bug. |
I have pushed the workaround and also tweaked Jenkins task configuration a bit to address occasional running out of memory. The code compiles now. |
Thank you! BTW, I implemented our own complex number class for multi precision floating points because instantiating the template std::complex for any other types than float, double, long double is unspecified. |
The compilation fails with g++-4.8 and Boost 1.60, but seems to work fine with g++-5.4 and Boost v. 1.58
Although it has been triggered by the update of ALPSCore, it does not seem to be caused by the ALPSCore code. It might be due to a specific combination of Boost 1.60, g++ 4.8 and Eigen 3.3.4 ...
The error is:
The text was updated successfully, but these errors were encountered: