Skip to content
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 issues with GCC 7 #17

Closed
MatthewHambley opened this issue Aug 24, 2017 · 7 comments
Closed

Compilation issues with GCC 7 #17

MatthewHambley opened this issue Aug 24, 2017 · 7 comments

Comments

@MatthewHambley
Copy link

We have witnessed this issue while trying to compile XIOS, a library which makes use of blitz++, using GCC 7.1.0. The failure has also been seen by a Debian autobuilder, see this link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853333

It looks like this new version of GCC is stricter about some shady usage pattern which it was hitherto letting through without comment.

@mettbest
Copy link

mettbest commented Aug 28, 2017

I confirm there are issues with GCC 7.1.1:

../blitz/array/ops.h:127:1: note: in expansion of macro 'BZ_DECLARE_ARRAY_ET_SCALAR_OPS
BZ_DECLARE_ARRAY_ET_SCALAR_OPS(complex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../blitz/globeval.cc:34:0,
from ../blitz/array/ops.cc:38,
from ../blitz/array.cc:13,
from ../blitz/array-impl.h:2559,
from ../blitz/array.h:37,
from ../src/globals.cpp:12:
../blitz/tvevaluate.h: In instantiation of 'static void blitz::_tv_evaluator<unroll, N_length>::evaluate_unaligned(T_numtype*, const T_expr&, T_update) [with T_numtype = int; T_expr = blitz::_bz_ArrayExpr<blitz::FastTV2Iterator<int, 2> >; T_update = blitz::_bz_update<int, int>; bool unroll = false; int N_length = 2]':
../blitz/globeval.cc:303:7: required from 'static void blitz::chunked_updater<T_numtype, T_expr, T_update, N>::unaligned_update(T_numtype*, T_expr, blitz::diffType) [with T_numtype = int; T_expr = blitz::_bz_ArrayExpr<blitz::IndexPlaceholder<0> >; T_update = blitz::_bz_update<int, int>; int N = 2; blitz::diffType = long int]'
../blitz/globeval.cc:342:41: recursively required from 'static void blitz::_bz_meta_binaryAssign::assign(T_data*, T_expr, blitz::diffType, blitz::diffType, T_update) [with T_data = int; T_expr = blitz::_bz_ArrayExpr<blitz::IndexPlaceholder<0> >; T_update = blitz::_bz_update<int, int>; int I = 6; blitz::diffType = long int]'
../blitz/globeval.cc:342:41: required from 'static void blitz::_bz_meta_binaryAssign::assign(T_data*, T_expr, blitz::diffType, blitz::diffType, T_update) [with T_data = int; T_expr = blitz::_bz_ArrayExpr<blitz::IndexPlaceholder<0> >; T_update = blitz::_bz_update<int, int>; int I = 7; blitz::diffType = long int]'
../blitz/globeval.cc:404:13: required from 'void blitz::_bz_evaluateWithUnitStride(T_dest&, typename T_dest::T_iterator&, T_expr, blitz::diffType, T_update) [with T_dest = blitz::TinyVector<int, 1>; T_expr = blitz::_bz_ArrayExpr<blitz::IndexPlaceholder<0> >; T_update = blitz::_bz_update<int, int>; typename T_dest::T_iterator = blitz::FastTV2Iterator<int, 1>; blitz::diffType = long int]'
../blitz/globeval.cc:591:31: required from 'static void blitz::_bz_evaluator<1>::evaluateWithStackTraversal(T_dest&, T_expr, T_update) [with T_dest = blitz::TinyVector<int, 1>; T_expr = blitz::_bz_ArrayExpr<blitz::IndexPlaceholder<0> >; T_update = blitz::_bz_update<int, int>]'
../blitz/globeval.cc:279:58: required from 'void blitz::_bz_evaluate(T_dest&, T_expr, T_update) [with T_dest = blitz::TinyVector<int, 1>; T_expr = blitz::_bz_ArrayExpr<blitz::IndexPlaceholder<0> >; T_update = blitz::_bz_update<int, int>]'
../blitz/tvevaluate.h:135:17: required from 'static void blitz::_tv_evaluator<true, N_length>::select_evaluation(blitz::TinyVector<T, N_length>&, const T_expr&, T_update) [with T = int; T_expr = blitz::_bz_ArrayExpr<blitz::IndexPlaceholder<0> >; T_update = blitz::_bz_update<int, int>; int N_length = 1]'
../blitz/tvevaluate.h:179:57: required from 'void blitz::TinyVector<T, N>::_tv_evaluate(const T_expr&, T_update) [with T_expr = blitz::_bz_ArrayExpr<blitz::IndexPlaceholder<0> >; T_update = blitz::_bz_update<int, int>; P_numtype = int; int N_length = 1]'
../blitz/tinyvec2.cc:86:15: required from 'blitz::TinyVector<T, N>& blitz::TinyVector<T, N>::operator=(const blitz::ETBase<T_expr>&) [with T_expr = blitz::IndexPlaceholder<0>; P_numtype = int; int N_length = 1]'
../blitz/array/storage.h:412:17: required from 'blitz::ColumnMajorArray<N_rank>::ColumnMajorArray(blitz::paddingPolicy) [with int N_rank = 1]'
../blitz/array/storage.h:430:34: required from here
../blitz/tvevaluate.h:120:36: error: 'const class blitz::_bz_ArrayExpr<blitz::FastTV2Iterator<int, 2> >' has no member named 'fastRead'; did you mean 'fastRead_tv'?
T_update::update(data[i], expr.fastRead(i));
~~~~~^~~~~~~~
fastRead_tv
Makefile:430: recipe for target 'globals.lo' failed
make[1]: *** [globals.lo] Error 1
make[1]: Leaving directory '/data/pede_ma/workspace_eclipse/UPAS2_trunk/UPAS-L2/build/blitz-0.10/lib'
Makefile:451: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

@wperkins
Copy link
Contributor

With my #16 changes, I can build and run check-testsuite and check-examples without problems on Mac OS (Sierra) using GNU 7.2.0. That's the only platform I have access to a GNU 7 compiler.

@citibeth
Copy link
Contributor

citibeth commented Sep 28, 2017 via email

@183amir
Copy link

183amir commented Sep 28, 2017

I can confirm that #16 works on CentOS 6 and gcc 7.1

@wperkins
Copy link
Contributor

wperkins commented Oct 2, 2017

#16 is what I use now, so I think it ready to merge.

@MatthewHambley
Copy link
Author

I've just had a chance to try building Blitz 1.0.1 with GCC 7.3.0 and can confirm that the problem appears to be fixed.

@slayoo
Copy link
Member

slayoo commented May 27, 2018

Thanks! Closing the issue then

@slayoo slayoo closed this as completed May 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants