Closed aroffringa closed 3 years ago
is this backwards compatible?
No
thought so, just checking.
It would be useful to merge only the first commit, but in a backward compatible way. That would require making a typedef rownr_t
for older versions of casacore, as happens for DP3.
Hi, I am trying to get casarest building against casacore 3.4.0 for openSUSE, but the compilation fails even after patching casarest with the commits in this pr. The issue is the following:
[ 16s] ../calibration/CalTables/CalSet.tcc: In instantiation of 'void casacore::CalSet<T>::store(const casacore::String&, const casacore::String&, const Bool&, const casacore::String&) [with T = float; casacore::Bool = bool]':
[ 16s] ../synthesis/MeasurementComponents/EPJones.cc:634:51: required from here
[ 16s] ../calibration/CalTables/CalSet.tcc:560:7: warning: variable 'nHist' set but not used [-Wunused-but-set-variable]
[ 16s] 560 | Int nHist = 0;
[ 16s] | ^~~~~
[ 16s] In file included from ../calibration/CalTables/CalSet.h:226,
[ 16s] from ../synthesis/MeasurementComponents/SolvableVisCal.h:41,
[ 16s] from ../synthesis/MeasurementComponents/EPJones.h:34,
[ 16s] from ../synthesis/MeasurementComponents/EPJones.cc:27:
[ 16s] ../calibration/CalTables/CalSet.tcc: In instantiation of 'void casacore::CalSet<T>::load(const casacore::String&, const casacore::String&) [with T = float]':
[ 16s] ../calibration/CalTables/CalSet.tcc:175:3: required from 'casacore::CalSet<T>::CalSet(const casacore::String&, const casacore::String&, const Int&, const Int&, const Int&) [with T = float; casacore::Int = int]'
[ 16s] ../synthesis/MeasurementComponents/EPJones.cc:337:80: required from here
[ 16s] ../calibration/CalTables/CalSet.tcc:454:14: warning: variable 'lastTime' set but not used [-Wunused-but-set-variable]
[ 16s] 454 | Double lastTime(-1.0), thisTime(0.0), thisInterval(0.0);
[ 16s] | ^~~~~~~~
[ 16s] ../calibration/CalTables/CalSet.tcc:305:7: warning: variable 'jonesType' set but not used [-Wunused-but-set-variable]
[ 16s] 305 | Int jonesType = 0;
[ 16s] | ^~~~~~~~~
[ 16s] In file included from /usr/include/casacore/casa/Arrays/Array.h:38,
[ 16s] from /usr/include/casacore/casa/Containers/RecordInterface.h:40,
[ 16s] from /usr/include/casacore/casa/Containers/Record.h:36,
[ 16s] from ../synthesis/MeasurementComponents/EPJones.h:32,
[ 16s] from ../synthesis/MeasurementComponents/EPJones.cc:27:
[ 16s] /usr/include/casacore/casa/Arrays/Storage.h: In instantiation of 'casacore::arrays_internal::Storage<T, Alloc>::Storage(Integral, Integral, const Alloc&, std::true_type) [with Integral = const char*; T = casacore::String; Alloc = std::allocator<casacore::String>; std::true_type = std::integral_constant<bool, true>]':
[ 16s] /usr/include/casacore/casa/Arrays/Storage.h:60:10: required from 'casacore::arrays_internal::Storage<T, Alloc>::Storage(InputIterator, InputIterator, const Alloc&) [with InputIterator = const char*; T = casacore::String; Alloc = std::allocator<casacore::String>]'
[ 16s] /usr/include/casacore/casa/Arrays/Array.tcc:170:10: required from 'casacore::Array<T, Alloc>::Array(const casacore::IPosition&, InputIterator, const Alloc&, std::false_type) [with InputIterator = const char*; T = casacore::String; Alloc = std::allocator<casacore::String>; std::false_type = std::integral_constant<bool, false>]'
[ 16s] /usr/include/casacore/casa/Arrays/Array.tcc:163:81: required from 'casacore::Array<T, Alloc>::Array(const casacore::IPosition&, InputIterator, const Alloc&) [with InputIterator = const char*; T = casacore::String; Alloc = std::allocator<casacore::String>]'
[ 16s] ../calibration/CalTables/CalSet.tcc:638:17: required from 'void casacore::CalSet<T>::store(const casacore::String&, const casacore::String&, const Bool&, const casacore::String&) [with T = float; casacore::Bool = bool]'
[ 16s] ../synthesis/MeasurementComponents/EPJones.cc:634:51: required from here
[ 16s] /usr/include/casacore/casa/Arrays/Storage.h:150:21: error: invalid conversion from 'const char*' to 'size_t' {aka 'long unsigned int'} [-fpermissive]
[ 16s] 150 | _data(construct(n, val)),
[ 16s] | ^
[ 16s] | |
[ 16s] | const char*
[ 16s] /usr/include/casacore/casa/Arrays/Storage.h:184:23: note: initializing argument 1 of 'T* casacore::arrays_internal::Storage<T, Alloc>::construct(size_t, const T&) [with T = casacore::String; Alloc = std::allocator<casacore::String>; size_t = long unsigned int]'
[ 16s] 184 | T* construct(size_t n, const T& val)
[ 16s] | ~~~~~~~^
[ 16s] /usr/include/casacore/casa/Arrays/Storage.h:151:16: error: invalid operands of types 'casacore::String*' and 'const char*' to binary 'operator+'
[ 16s] 151 | _end(_data + n),
[ 16s] | ~~~~~~^~~
It seems additional fixes are required to build against casacore 3.4.0, or am I doing something wrong? Full build sources here. Thanks in advance for any help.
Also contains fixes for the regex and 64-bit row-nr changes.