Im not sure if this is important, but If the compiller is switched to gcc/g++ 8.1, the following warning appears. The compilation finishes successfully. This warning is not present under standard in Ubuntu 16.04.6 gcc/g++ 5.
[ 93%] Building CXX object CMakeFiles/wsclean-object.dir/aterms/lofarbeamterm.cpp.o
In file included from /WSClean/build/wsclean-2.6/uvector.h:4,
from /WSClean/build/wsclean-2.6/nlplfitter.h:7,
from /WSClean/build/wsclean-2.6/nlplfitter.cpp:1:
/WSClean/build/wsclean-2.6/aocommon/uvector_11.h: In instantiation of ‘void ao::uvector<tp, alloc="">::enlarge(ao::uvector<tp, alloc="">::size_t) [with Tp = std::pair<double, double="">; Alloc = std::allocator<std::pair\<double, double=""> >; ao::uvector<tp, alloc="">::size_t = long unsigned int]</tp,></std::pair\<double,></double,>’:
/WSClean/build/wsclean-2.6/aocommon/uvector_11.h:529:4: required from ‘void ao::uvector<tp, alloc="">::push_back(Tp&&) [with Tp = std::pair<double, double="">; Alloc = std::allocator<std::pair\<double, double=""> >]</std::pair\<double,></double,>’
/WSClean/build/wsclean-2.6/nlplfitter.cpp:363:46: required from here
/WSClean/build/wsclean-2.6/aocommon/uvector_11.h:993:9: warning: ‘void memcpy(void, const void, size_t)’ writing to an object of type ‘struct std::pair<double, double="">’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(newStorage, _begin, size() * sizeof(Tp));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/bits/stl_algobase.h:64,
from /usr/include/c++/8/memory:62,
from /WSClean/build/wsclean-2.6/nlplfitter.h:5,
from /WSClean/build/wsclean-2.6/nlplfitter.cpp:1:
/usr/include/c++/8/bits/stl_pair.h:198:12: note: ‘struct std::pair<double, double="">’ declared here
struct pair
^~~~
In file included from /WSClean/build/wsclean-2.6/uvector.h:4,
from /WSClean/build/wsclean-2.6/polynomialchannelfitter.h:4,
from /WSClean/build/wsclean-2.6/polynomialchannelfitter.cpp:1:
/WSClean/build/wsclean-2.6/aocommon/uvector_11.h: In instantiation of ‘void ao::uvector<tp, alloc="">::enlarge(ao::uvector<tp, alloc="">::size_t) [with Tp = std::pair<double, double="">; Alloc = std::allocator<std::pair\<double, double=""> >; ao::uvector<tp, alloc="">::size_t = long unsigned int]</tp,></std::pair\<double,></double,>’:
/WSClean/build/wsclean-2.6/aocommon/uvector_11.h:529:4: required from ‘void ao::uvector<tp, alloc="">::push_back(Tp&&) [with Tp = std::pair<double, double="">; Alloc = std::allocator<std::pair\<double, double=""> >]</std::pair\<double,></double,>’
/WSClean/build/wsclean-2.6/polynomialchannelfitter.h:13:67: required from here
/WSClean/build/wsclean-2.6/aocommon/uvector_11.h:993:9: warning: ‘void</tp,></tp,></tp,></double,></double,> memcpy(void, const void, size_t)’ writing to an object of type ‘struct std::pair<double, double="">’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(newStorage, _begin, size() * sizeof(Tp));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/utility:70,
from /usr/include/c++/8/algorithm:60,
from /WSClean/build/wsclean-2.6/aocommon/uvector_11.h:4,
from /WSClean/build/wsclean-2.6/uvector.h:4,
from /WSClean/build/wsclean-2.6/polynomialchannelfitter.h:4,
from /WSClean/build/wsclean-2.6/polynomialchannelfitter.cpp:1:
/usr/include/c++/8/bits/stl_pair.h:198:12: note: ‘struct std::pair<double, double="">’ declared here
struct pair
^~~~
In file included from /WSClean/build/wsclean-2.6/uvector.h:4,
from /WSClean/build/wsclean-2.6/polynomialchannelfitter.h:4,
from /WSClean/build/wsclean-2.6/polynomialchannelfitter.cpp:1:
/WSClean/build/wsclean-2.6/aocommon/uvector_11.h: In instantiation of ‘void ao::uvector<tp, alloc="">::enlarge(ao::uvector<tp, alloc="">::size_t) [with Tp = std::pair<long unsigned="" int,="" double="">; Alloc = std::allocator<std::pair\<long unsigned="" int,="" double=""> >; ao::uvector<tp, alloc="">::size_t = long unsigned int]</tp,></std::pair\<long></long>’:
/WSClean/build/wsclean-2.6/aocommon/uvector_11.h:529:4: required from ‘void ao::uvector<tp, alloc="">::push_back(Tp&&) [with Tp = std::pair<long unsigned="" int,="" double="">; Alloc = std::allocator<std::pair\<long unsigned="" int,="" double=""> >]</std::pair\<long></long>’
/WSClean/build/wsclean-2.6/polynomialchannelfitter.h:18:51: required from here
/WSClean/build/wsclean-2.6/aocommon/uvector_11.h:993:9: warning: ‘void memcpy(void, const void, size_t)’ writing to an object of type ‘struct std::pair<long unsigned="" int,="" double="">’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
memcpy(newStorage, _begin, size() * sizeof(Tp));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/utility:70,
from /usr/include/c++/8/algorithm:60,
from /WSClean/build/wsclean-2.6/aocommon/uvector_11.h:4,
from /WSClean/build/wsclean-2.6/uvector.h:4,
from /WSClean/build/wsclean-2.6/polynomialchannelfitter.h:4,
from /WSClean/build/wsclean-2.6/polynomialchannelfitter.cpp:1:
/usr/include/c++/8/bits/stl_pair.h:198:12: note: ‘struct std::pair<long unsigned="" int,="" double="">’ declared here
struct pair
^~~~
/WSClean/build/wsclean-2.6/fftresampler.cpp: In member function ‘void FFTResampler::runThread()’:
/WSClean/build/wsclean-2.6/fftresampler.cpp:56:79: warning: ‘void</long></long> memset(void, int, size_t)’ clearing an object of non-trivial type ‘struct std::complex<double>’; use assignment or value-initialization instead [-Wclass-memaccess]
memset(newfftData, 0, fftOutWidth</double>_outputHeightsizeof(std::complex<double>));
^
In file included from /usr/include/boost/detail/container_fwd.hpp:98,
from /usr/include/boost/functional/hash/extensions.hpp:22,
from /usr/include/boost/functional/hash/hash.hpp:558,
from /usr/include/boost/functional/hash.hpp:6,
from /usr/include/boost/thread/detail/thread.hpp:38,
from /usr/include/boost/thread/thread_only.hpp:22,
from /usr/include/boost/thread/thread.hpp:12,
from /WSClean/build/wsclean-2.6/fftresampler.h:9,
from /WSClean/build/wsclean-2.6/fftresampler.cpp:1:
/usr/include/c++/8/complex:1221:12: note: ‘struct std::complex<double>’ declared here
struct complex<double>
^~~~~~~~~~~~~~~
/WSClean/build/wsclean-2.6/wsclean/wstackinggridder.cpp: In member function ‘void WStackingGridder::StartInversionPass(size_t)’:
/WSClean/build/wsclean-2.6/wsclean/wstackinggridder.cpp:122:65: warning: ‘void</double></double></double> memset(void, int, size_t)’ clearing an object of non-trivial type ‘struct std::complex<double>’; use assignment or value-initialization instead [-Wclass-memaccess]
memset(_layeredUVData[i], 0, _width</double>_height * sizeof(double)*2);
^
In file included from /opt/casacore/include/casacore/casa/BasicSL/Complexfwd.h:45,
from /opt/casacore/include/casacore/casa/BasicSL/Complex.h:35,
from /opt/casacore/include/casacore/casa/Utilities/DataType.h:32,
from /opt/casacore/include/casacore/ms/MeasurementSets/MSTable.h:33,
from /opt/casacore/include/casacore/ms/MeasurementSets/MeasurementSet.h:33,
from /WSClean/build/wsclean-2.6/wsclean/../multibanddata.h:6,
from /WSClean/build/wsclean-2.6/wsclean/wstackinggridder.h:10,
from /WSClean/build/wsclean-2.6/wsclean/wstackinggridder.cpp:1:
/usr/include/c++/8/complex:1221:12: note: ‘struct std::complex<double>’ declared here
struct complex<double>
^~~~~~~~~~~~~~~
In file included from /WSClean/build/wsclean-2.6/dftpredictionalgorithm.cpp:1:
/WSClean/build/wsclean-2.6/dftpredictionalgorithm.h: In member function ‘void DFTPredictionInput::InitializeFromModel(const Model&, long double, long double, const BandData&)’:
/WSClean/build/wsclean-2.6/dftpredictionalgorithm.h:42:7: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
class DFTPredictionComponent
^~~~~~~~~~~~~~~~~~~~~~
[ 93%] Built target wsclean-object</anonymous></double></double></tp,></tp,></tp,></double,></double,></tp,></tp,></tp,>
Hi Alex,
Thanks for reporting. Don't worry about these warnings, they are not a problem, they're just the compiler saying some things could be nicer. They will be fixed in the next release. I'm compiling with gcc 8.3 and currently no warnings are reported on master.
Regards,
André
Thank you, it is good to know.
Btw., can you please tell how should we compile FFTW for WSClean master? To signle, double or sth. else?
Best regards,
Alex
Last edit: Alex 2019-04-08
I think you only need the double-version of the library if you build wsclean without IDG. I do always install the float library as well though. If you build with IDG, you need both, so it's probably best to install both. They can be compiled both, and then two different libraries are installed.
By the way, it seems that Ubuntu Bionic and later provide a fftw library that is new enough.