- changed status to wontfix
Blaze Compilation Issues with gcc version 4.8.5 20150623 (Red Hat 4.8.5-11)
I intend to use the high performance blaze library as a part of my VLSI CAD thesis project. I have followed the installation instructions and have started with the example program:
#include <iostream>
#include <blaze/Math.h>
using blaze::StaticVector;
using blaze::DynamicVector;
using namespace std;
int main()
{
StaticVector<int,3UL> a{4, -2, 5};
DynamicVector<int> b(3UL);
b[0] = 2;
b[1] = 5;
b[2] = -3;
DynamicVector<int> c = a + b;
cout << "c = \n" << c << "\n";
return 0;
}
The compiler seems to have the problem with the following syntax:
error: expected primary-expression before ‘auto’ BLAZE_ALWAYS_INLINE decltype(auto) operator()( const T& a ) const
I tend to get the same error over and over again for multiple header files included in the library.
The compilation command I am using:
g++ -std=gnu++11 -I /home/bodhi91/MyDevelopment/blaze-3.1 -I /home/bodhi91/MyDevelopment/boost_1_63_0 -O3 -DNDEBUG -mavx -o TryingBlaze TryingBlaze.cpp
It will also be fair to acknowledge that I am new to the blaze library. Is it a compiler issue that is bugging me?
Comments (3)
-
-
reporter Hi Klaus,
Thanks for the fast response. I changed the compiler flag to -std=c++1y to support C++14. The problems seem to persist. I guess I need to upgrade my compiler. Should any version after 4.8.5 work perfectly with blaze?
Thanks, Bodhi
-
Hi Bodhisatta!
As stated before, GCC 4.8.x is not supported anymore since it doesn't have all the required C++14 features. The
-std=c++1y
unfortunately doesn't help. You will have to update your compiler. All later GCC versions (4.9 through 7.0) work perfectly with Blaze.Best regards,
Klaus!
- Log in to comment
Hi Bodhisatta!
Blaze is a C++14 library. The problem is that you are trying to compile Blaze as C++11 library (by using the
-std=gnu++11
compiler flag), which causes compilation problems with all C++14 features (such asdecltype(auto)
). Also, GCC 4.8 is not officially supported anymore since it lacks many required C++14 features. Please see our main page for a list of supported compilers. I hope this helps you to get started with Blaze,Best regards,
Klaus!