BuildingAipsppOnDebianAmd64
Following the AIPS++ System Manual, doing a sneeze was straightforward enough, but lots of things failed. Specifically:
-
glish needs to be built separately. Go into code/aips/glish and type make.
-
glish needs the
flex-old
package to build, with newer flexes it falls over. -
plain
pgplot5
is not good enough, it needs XmPgplot.h. So I had to build PGPLOT from source, which is an extra pain. -
linking binaries is plagued by errors such as "foo referenced in section
.rodata' of bar defined in discarded section blah". Googling produced no clear answers, but suggested that
binutils` may be to blame. I have therefore downgraded binutils and everything that entailed (gcc etc.) to the stable branch, let's see if the build is any better.
- 4a. OK, dowgrading binutils to
binutils/stable 2.15-6
seems to have fixed the above linking errors.
- Now the remaining problem is in
casa/wcslib/wcsulex.l
andwcsutrn.l
:
/aips++/amd64/code/casa/wcslib/wcsulex.l: In function yy_get_next_buffer': /aips++/amd64/code/casa/wcslib/wcsulex.l:1215: warning: implicit declaration of function
read'
In file included from /aips++/amd64/code/casa/wcslib/wcsulex.l:1540:
/usr/include/unistd.h: At top level:
/usr/include/unistd.h:312: error: conflicting types for 'read'
/aips++/amd64/code/casa/wcslib/wcsulex.l:1215: error: previous implicit declaration of 'read' was here
"""]]Oh great, this was fixed by installing flex
again over flex-old
. Too bad they're mutually exclusive. So, you must have one version of flex on hand to build glish, and another to build wcslib... joy of joys...
6. OK, most things actually link now. Remaining errors:
/aips++/amd64/code/demo/implement/MeasurementEquations/pSimulator.cc: In function int main()': /aips++/amd64/code/demo/implement/MeasurementEquations/pSimulator.cc:174: error: no matching function for call to
image::image(casa::String&, casa::String&, casa::Index&, casa::Bool&, casa::Bool&)'
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/app_image/DOimage.h:157: note: candidates are: image::image(const casa::ImageInterfacecasa::Float&)
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/app_image/DOimage.h:154: note: image::image(const image&)
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/app_image/DOimage.h:151: note: image::image(const casa::String&, const casa::String&, const casa::GlishRecord&, const casa::String&, casa::Bool, casa::Bool)
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/app_image/DOimage.h:146: note: image::image(const casa::String&, const casa::String&, casa::Bool, const casa::GlishRecord&)
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/app_image/DOimage.h:142: note: image::image(const casa::String&, const casa::Vectorcasa::String&, casa::Index, casa::Bool, casa::Bool, casa::Bool)
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/app_image/DOimage.h:138: note: image::image(const casa::String&, const casa::Vectorcasa::Int&, const casa::GlishRecord&, casa::Bool, casa::Bool, casa::Bool)
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/app_image/DOimage.h:133: note: image::image(const casa::String&, const casa::Arraycasa::Float&, const casa::GlishRecord&, casa::Bool, casa::Bool, casa::Bool)
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/app_image/DOimage.h:128: note: image::image(const casa::String&, const casa::String&, casa::Index, casa::Index, casa::Bool, casa::Bool, casa::Bool)
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/app_image/DOimage.h:123: note: image::image(const casa::String&)
/aips++/amd64/code/demo/implement/MeasurementEquations/pSimulator.cc:233: error: no matching function for call to `imager::setimage(casa::Int&, casa::Int&, casa::Quantity&, casa::Quantity&, casa::String&, casa::Bool&, casa::MDirection&, casa::Quantity&, casa::Quantity&, casa::String&, casa::Int&, casa::Int&, casa::Int&, casa::MRadialVelocity&, casa::MRadialVelocity&, casa::Vectorcasa::Int&, casa::Int&, casa::Int&, casa::Quantity&)'
/aips++/amd64/code/demo/implement/MeasurementEquations/../../../appsglish/apps/imager/DOimager.h:171: note: candidates are: casa::Bool imager::setimage(casa::Int, casa::Int, const casa::Quantity&, const casa::Quantity&, const casa::String&, casa::Bool, const casa::MDirection&, const casa::Quantity&, const casa::Quantity&, const casa::String&, casa::Int, casa::Int, casa::Int, const casa::MRadialVelocity&, const casa::MRadialVelocity&, const casa::Vectorcasa::Int&, casa::Int, casa::Int, const casa::Quantity&, const casa::Float&, const casa::Float&)
gmake[3]: [/aips++/amd64/linux_gnu/tmp/demo/opt/pSimulator.lock] Error 1 (ignored)
/usr/bin/ld: /aips++/amd64/linux_gnu/tmp/display/opt/gDisplay.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /aips++/amd64/linux_gnu/tmp/display/opt/gDisplay.o: could not read symbols: Bad value gmake[3]: [/aips++/amd64/linux_gnu/lib/gDisplay.so] Error 1 (ignored)
g/aips++/amd64/code/appsglish/apps/msplot_new/DOmsplot.cc: In member function casa::Int msplot<T>::flagdata(casa::Int, casa::Int) [with T = casa::Float]': /aips++/amd64/code/appsglish/apps/msplot_new/DOmsplot.h:212: instantiated from here /aips++/amd64/code/appsglish/apps/msplot_new/DOmsplot.cc:1305: error: no matching function for call to
casa::MsPlotcasa::Float::flagData(casa::PtrBlock<casa::BasePlotcasa::Float>&, casa::TPPlottercasa::Float&, int, casa::Int&, casa::Int&)'
/aips++/amd64/code/include/tables/TablePlot/TablePlot.h:338: note: candidates are: casa::Int casa::TablePlot::flagData(casa::PtrBlock<casa::BasePlot>&, casa::TPPlotter&, casa::Int, casa::Int, casa::Int, casa::Int) [with T = casa::Float]
/aips++/amd64/code/appsglish/apps/msplot_new/DOmsplot.h:212: instantiated from here
/aips++/amd64/code/appsglish/apps/msplot_new/DOmsplot.cc:1310: error: no matching function for call to casa::MsPlot<casa::Float>::flagData(casa::PtrBlock<casa::BasePlot<casa::Float>*>&, casa::TPPlotter<casa::Float>&, int, casa::Int&, casa::Int&)' /aips++/amd64/code/include/tables/TablePlot/TablePlot.h:338: note: candidates are: casa::Int casa::TablePlot<T>::flagData(casa::PtrBlock<casa::BasePlot<T>*>&, casa::TPPlotter<T>&, casa::Int, casa::Int, casa::Int, casa::Int) [with T = casa::Float] gmake[3]: [/aips++/amd64/linux_gnu/bin/msplot_new] Error 1 (ignored) """]]Of these, only
gDisplay.so` appears to be worth fixing...