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

Fails to build with gcc 14 #310

Closed
musicinmybrain opened this issue Jan 25, 2024 · 2 comments
Closed

Fails to build with gcc 14 #310

musicinmybrain opened this issue Jan 25, 2024 · 2 comments

Comments

@musicinmybrain
Copy link

Trying to rebuild linbox 1.7.0 with GCC 14.0.1 in Fedora Rawhide, I encounter the following errors:

In file included from ../../linbox/matrix/sparse-matrix.h:76:
../../linbox/matrix/sparsematrix/sparse-ell-matrix.h: In member function 'LinBox::SparseMatrix<_Field, LinBox::SparseM
atrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>& LinBox::SparseMatrix<_Field, LinBox::Spa
rseMatrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>::operator=(const LinBox::SparseMatrix
<_Field, LinBox::SparseMatrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>&)':
../../linbox/matrix/sparsematrix/sparse-ell-matrix.h:1216:44: error: assignment of read-only location '((LinBox::Spars
eMatrix<_Field, LinBox::SparseMatrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>*)this)->Li
nBox::SparseMatrix<_Field, LinBox::SparseMatrixFormat::ELL>::_IndexedIterator<index_iterator, element_iterator, Field>
::_ld'
 1216 |                                 _ld        = iter._ld ;
      |                                 ~~~~~~~~~~~^~~~~~~~~~
In file included from ../../linbox/matrix/sparse-matrix.h:77:
../../linbox/matrix/sparsematrix/sparse-ellr-matrix.h: In member function 'LinBox::SparseMatrix<_Field, LinBox::Sparse
MatrixFormat::ELL_R>::_Iterator<element_iterator, Field>& LinBox::SparseMatrix<_Field, LinBox::Spmake[4]: Leaving dire
ctory '/builddir/build/BUILD/linbox-1.7.0/linbox/algorithms'
arseMatrixFormat::ELL_R>::_Iterator<element_iterator, Field>::operator=(const LinBox::SparseMatrix<_Field, LinBox::Spa
rseMatrixFormat::ELL_R>::_Iterator<element_iterator, Field>&)':
../../linbox/matrix/sparsematrix/sparse-ellr-matrix.h:1108:47: error: no match for 'operator=' (operand types are 'con
st std::vector<long unsigned int>' and 'const std::vector<long unsigned int>')
 1108 |                                 _rowid = iter._rowid;
      |                                               ^~~~~~

More context is available in the downstream bug. I haven’t tried to investigate this more closely yet.

(I used the workaround in linbox-team/givaro#226 (comment) to build givaro with GCC 14.)

@jgdumas
Copy link
Member

jgdumas commented Jan 26, 2024

Hello, ok thank you for the reports.
Yes there are some 'const_cast' missing around the LHS.
This should be now corrected in b8f2d4c.
And linbox compiles completely with g++-14 for me

@jgdumas jgdumas closed this as completed Jan 26, 2024
@musicinmybrain
Copy link
Author

Thanks!

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

2 participants