Compile error in msselection.cpp
WSClean is a fast widefield interferometric imager
Brought to you by:
anoko
On some Debian platforms (seem to be the 32-bit ones), I get the following error during build:
[ 14%] Building CXX object CMakeFiles/wsclean-object.dir/msselection.cpp.o
/usr/bin/c++ -DHAVE_GSL -I/<<PKGBUILDDIR>>/aocommon/include -I/usr/include/casacore -I/usr/include/hdf5/serial -I/<<PKGBUILDDIR>>/obj-i686-linux-gnu -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=c++11 -O3 -Wall -DNDEBUG -fPIC -o CMakeFiles/wsclean-object.dir/msselection.cpp.o -c /<<PKGBUILDDIR>>/msselection.cpp
In file included from /<<PKGBUILDDIR>>/msselection.cpp:4:
/<<PKGBUILDDIR>>/serialistream.h: In instantiation of ‘SerialIStream& SerialIStream::UInt64(T&) [with T = const unsigned int]’:
/<<PKGBUILDDIR>>/serialistream.h:189:4: required from ‘SerialIStream& SerialIStream::VectorUInt64(std::vector<T>&) [with T = unsigned int]’
/<<PKGBUILDDIR>>/msselection.cpp:24:26: required from here
/<<PKGBUILDDIR>>/serialistream.h:42:9: error: assignment of read-only reference ‘value’
42 | value = (T) read<uint64_t>();
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [CMakeFiles/wsclean-object.dir/build.make:222: CMakeFiles/wsclean-object.dir/msselection.cpp.o] Error 1
That happens on ARM, i386, MIPS, x32. Full build log for i386 is here.
Thanks for reporting Ole. This was indeed a bug. I've released 2.10.1 which should fix this issue. I have only released it as a tar.bz2 file and have not updated the master branch on the SourceForge repository anymore, because I've switched to GitLab (https://gitlab.com/aroffringa/wsclean/). I've tagged 2.10.1 there as well on the repository (but not as a release). Future releases (>= 2.11) will be done only on GitLab, but since this was a problem with 2.10 I've also released it on SF.
Thank you! I can confirm that it works.
Great, thanks!