SonATA Porting
From setiquest wiki
Contents |
Description
The project is the result of 20 years of development by many different programmers. Until recently there has never been an effort to make the software available to developers outside of the SETI organization. Now all that has changed. We have spent the last year cleaning up the code and addressing licensing issues. The first release of the setiQuest SonATA project was March 1st, 2011 on GitHub.[1]
Now that the source code is available to the public we need to make a few improvements to help it become easier to use and understand, thus opening the door to more people becoming involved in the project.
The project will involve the following:
- Become familiar with downloading, building and running the SonATA software.
- Create a list of the most popular Linux distributions that SonATA should be ported to. Include Mac OS X, Solaris, BSD, and if you think it is possible, Windows.
- Attempt to download, build and run the SonATA software on other Linux distributions.
- Document and fix and issues that make SonATA not run on any of the Linux distributions.
- Interact with SonATA programmers to fix any issues that involve code changes.
- Improve the installation procedures so the download, build, and install instructions are the same for all Linux distributions.
- Create a detailed report on the project and how the SonATA source code was improved. We would like to release this information as an open source project improvement case study.
- Improve the install instructions and procedures. We currently have a number of software packages that need to be installed before the software can be downloaded, built, and run. The instructions we have are cumbersome at best and need to be refined.
- Building the software is a bit complicated and prone to developer error. We would like an all comprehensive configure or cmake build system to be implemented to make this easier. We are also willing to entertain using ant.
- Improve the demos that are run by the developer once the software is built.
- Improve the structure of the documentation. Not all the software has the necessary Doxygen headers. The Doxygen template needs improvement.
- Create a detailed report on the project and how the SonATA source code was improved. We would like to release this information as an open source project improvement case study.
This project is GSoC funded[2]. This project is a combination of 2 projects. The original project descriptions are at:
- Enable the setiQuest SonATA software to run on many types of Linux distributions
- Improve the setiQuest Source Code Infrastructure
Members
- Jon Richards (mentor)
- Erik Olson (co-mentor)
- Khurram Baig (GSoC student)
Protocols
- Follow General Guidelines
- Follow Coding Standards
- Sign SETI Institute Contributor Licensing Agreement (CLA)
- Collaborative communication for this project will use a combination of the Talk:SonATA_Porting page and the #setiquest IRC channel.
- Issue tracking will be done at [[1]]. If you have not already done so, please create an account at this location. All things your work on should be listed and updated, as well as time estimates and actual time.
- We can keep an activity log and status updates on this page: Talk:SonATA_Porting_Status
- The source code will be hosted on GitHub.
- The #documentation will be hosted in this wiki page.
Milestones
This section outlines the general plan of the project. The mentor should add a list of project milestones here. When a milestone is reached a (date) should be added and the milestone stricken out.
At the end of each milestone we should have the equivalent of a "release". The changes will be checked in to GitHub.com and we should get several people to verify that they can build SonATA and benefit from the improvements.
First milestone
We will first concentrate on improving the current OpenSUSE build and demos system. Then move on to other OS's in future milestones.
Please help me refine this list.Jrseti 09:46, 18 May 2011 (PDT)
- Create a meta-package that depends upon all the extra packages necessary for operation.
- improve the build procedure to check for necessary installed packages.
- Can we make the configure script warn if there is not enough CPUs or RAM?
- Create one make procedure that builds everything. Including CppUnit, tclreadline, sse-pkg and sig-pkg.
- Modify the build instructions.
- Improve the build instructions. Can it be made easier?
At the end of this milestone the SonATA download and build procedure should be as easy as possible and not fail for others.
Second milestone
- Can we make it run with only 2GB memory? Investigate.
- Improve the demo/verification that SonATA is working (voyager demo).
Milestone n
GSoC calendar
- April 8 2011 - Deadline for GSoC student applications.
- April 25 2011 - Accepted student proposals announced on the Google Summer of Code 2011 site.
- April 27 2011 - Students get to know mentors, read documentation, get up to speed to begin working on their projects.
- May 25 2011 - Mentors give students a helping hand and guidance on their projects.
- July 11 2011 - Mentors and students can begin submitting mid-term evaluations.
- July 15 2011 - Mid-term evaluations deadline; Google begins issuing mid-term student payments provided passing student survey is on file.
- August 16 2011 - Suggested 'pencils down' date. Take to scrub code, write tests, improve documentation, etc.
- August 22 2011 - Firm 'pencils down' date. Mentors, students and organization administrators can begin submitting final evaluations to Google.
- August 26 2011 - Final evaluation deadline Google begins issuing student and mentoring organization payments provided forms and evaluations are on file.
- August 30 2011 - Final results of GSoC 2011 announced.
- August 31 2011 - Students can begin submitting required code samples to Google.
Initial Tasks
-
Khrm should get a github.com free account.(khrm) -
Discuss which Linux distributions we will target.Jrseti 18:25, 27 June 2011 (PDT) - Discuss how we are going to improve the build system.
- Discuss how we are going to make the software install easy.
- Discuss how we can make the SonATA be more reliable, run on 2GB machines.
- Start writing documentation from the beginning of the project.
- Create a project plan.
- Create a testing plan.
- Define individual stages to project completion.
Ported distribution versions
SonATA has been successfully ported to and tested on the following Linux distribution versions:[3]
- CentOS 5 (used by AWS)
- Debian 6 squeeze
- Fedora 14
- Fedora 15
- openSUSE 11.3 (SETI Institute's internal development platform)
- openSUSE 11.4
- Ubuntu 10.10
- Ubuntu 11.04
Discussion
Which Linux distributions should we target?
I found this interesting chart:
From this, I think the list should be in order;
- SuSE
- Fedora
- Ubuntu
- Centos
- Debian
- Red Hat
- Gentoo
I included SUSE for completeness. Fedora is second because I believe KHRM already did a lot of work with this during the GSoC application period. Ubuntu is becoming popular and we have started using it here for other projects, so that is 3rd. Jrseti 09:48, 12 May 2011 (PDT)
How are we going to improve the build system?
Currently there are several problems with the build system that we need to improve. Review the build instructions for reference [[2]].
Discussion at [3] is arriving at these conclusions:
- Possibly keep the autoconf build system we have now. But if we do this we'll have to improve the configure scripts to check for all the necessary installed packages.
- Create a configure/make in the main SonATA directory that configures and builds sse-pkg, sig-pkg, CppUnit, tclreadline all with one ./configure/make sequence.
- For each OS we create a meta-package depending upon the necessary extra software packages necessary for SonATA to build and run.
How are we going to improve the software?
Here are a few issues I see with the current software. These are up for discussion Jrseti 07:31, 17 May 2011 (PDT)
- Currently 4GB of memory is required. Can we make that 2GB? Also, can we make the software produce an error when it runs out of memory, instead of just hanging?
- Can we make the configure script check the number of CPUs and RAM available and complain if there is not enough? I do not know if this is possible.
- Can we upgrade the software to use the most current version of CppUnit? We include CppUnit in our release because it is an old version and the software has not been modified to work with the new CppUnit?
- Can we make the demo easier, more user friendly? By "demo" I mean like playing back the voyager data and seeing the waterfall.
Documentation
Build System of SonATA:
User's perspective:
A user have to undertake the following steps to build the SonATA:
i) Running the sonata_i.sh script ./gsoc/sonata_i.sh
ii) Running autotools using the script autogen.sh ./autogen.sh
iii) A user have to run the configure to generate Makefile: ./configure --with-tcl=/usr/lib64 -C
iv) A user have to build using make: make
- Options:
- a) -jNo where No is the number of jobs. You can put twice the number of cores to build efficiently and quickly.
- b) V=1 or V=0 verbose level . V=0 codes are builds much like in cmake.
v) Installing the SonATA:
sudo make install
sudo chown -R `whoami` ~/sonata_install
Package Maintainer Perspective:
SonATA consist SSE and Signal Processing code. Each having their own directories. There are also some other directories like scripts. And some other directories containing third party software needed to run SonATA.
They all have configure.ac and Makefile.am files. These files generate the configure and Makefile.in. It must be noted these directories are not just sub-directories but sub-directories with nested packages. Also sig-pkg has another optional deep nesting . In these sub- directories under sig-pkg are treated as a nested packages . Further, its sub-directory utilities treat its sub directories as nested packages. By default, this feature is disabled.
To enable it give –enable-deepnesting option while configuring.
This feature is quite useful for a maintainer. If a nested package has been changed only. Then he can distribute that only by make dist after he has configured and build it.
Other useful feature is VPATH builds (Parallel builds or objdir builds). Build directory and source directory can be different. A user can start building in another directory he has created ( let's say build). But this feature cannot be used on nested packages as they depend on other packages sometime. This can be only used from top directory.
e.g.
cd ~/SonATA
mkdir build
cd build
../configure
make (options)
sudo make install
sudo chown -R `whoami` ~/sonata_install
Developer's Perspective:
This describes some of the details of internal and external parts of the build system:
Metapackages and sonata_i.sh script:
i) sonata_i.sh: This interactive script automates generating of script installing dependencies using meta packages, generating keys , downloading the SonATA if need be and other components and changing the files.
ii) rpm.spec: This is used to generate the meta package rpm.
Autotools:
Following changes have been brought into the build system:
VPATH BUILDS implementation:
By default vpath builds are enabled in autotools but if care is not taken while writing automake files they can easily break. So following changes had to be made and should be taken care whenever a new files are written:
1) Equating top_sourcedir variable to ..
While on a glance this seems to be correct and buildsystem will works but when VPATH build is tried it will break. Reason being top_sourcedir is not equal to .. in VPATH. To solve this just remove the reference to that. Value of this variable is taken care by configure . Same is the case with top_builddir.
2) Path to header files and library:
Currently there are two method for this. e.g.
SSE_DX_INTERFACE_DIR = $(top_builddir)/../../../sse-pkg/sseDxInterfaceLib SSE_DX_INTERFACE_INCDIR = $(top_srcdir)/../../../sse-pkg/sseDxInterfaceLib SSE_DX_INTERFACE_LIBDIR = $(SSE_DX_INTERFACE_DIR) SSE_DX_INTERFACE_LIB = $(SSE_DX_INTERFACE_LIBDIR)/libsseDxInterface.a
Second is:
GAUSS_DIR = $(top_srcdir)/../../gaussLib GAUSS_INCDIR = $(GAUSS_DIR)/include GAUSS_LIBDIR = $(GAUSS_DIR)/src GAUSS_LIB = $(GAUSS_LIBDIR)/libGauss.a
In first library's path is correctly given as top_builddir but in second it is wrong even though it will work when top_srcdir is equal to top_builddir as is the case in non VPATH builds.
I changed the all the reference to include and library’s like this.
Also where swig is used like in sse-pkg ifc and sse-pkg tsig, we will have to give path to file being used.
Like in case of tsig, we changed it from:
swig -c++ -tcl -o TestSig_wrap.cpp -ltclsh.i TestSig.i
to:
swig -c++ -tcl -o TestSig_wrap.cpp -ltclsh.i @srcdir@/TestSig.i
Control Over Nesting
Even then I later out found former approach to deal with library and header files to be slightly wrong in case of SonATA. As it assumes that top_sourcedir with respect to package is always at fixed distance. It will not be the case if we go for two configure files based build system as is the case when we go for nesting controls. One sig-pkg and another its own. Earlier there was no such issue as package's configure was used for generating it. So to correct the above two I wrote them as:
SSE_INTERFACE_DIR = $(builddir)/../../../../sse-pkg/sseInterfaceLib SSE_INTERFACE_INCDIR = $(srcdir)/../../../../sse-pkg/sseInterfaceLib SSE_INTERFACE_LIBDIR = $(SSE_INTERFACE_DIR) SSE_INTERFACE_LIB = $(SSE_INTERFACE_DIR)/libsseInterface.a
and
GAUSS_DIR = $(srcdir)/../../../gaussLib GAUSS_INCDIR = $(GAUSS_DIR)/include GAUSS_LIBDIR = $(builddir)/../../../gaussLib/src GAUSS_LIB = $(GAUSS_LIBDIR)/libGauss.a
Now it works after I changed the configure file to give a choice over nesting of packages. By default it will be disabled.
Some other minor changes:
- I also changed the autoconf version used in SonATA to 2.5*-2.6* from 2.13.
- I have also added support for the silent verbose level.
- I change the default prefix in tclreadline so that it doesn't conflict with the CppUnit.
- I have disable the shared library in CppUnit because giving this option to configure causes conflict with tclreadline.
See also
References
- ↑ http://setiquest.org/forum/topic/open-sonata-source-code-released
- ↑ http://www.google-melange.com/gsoc/project/google/gsoc2011/khrm/21001
- ↑ http://irc.sigblips.com/setiQuest/2011/setiquest.07-26-2011.log
Documentation
External links
- https://github.com/khrm/SonATA/tree/gsoc (GSoC project version)
- https://github.com/setiQuest/SonATA (gold master version)
- http://issues.setiquest.org/projects/sonata-porting
- http://setiquest.org/forum/topic/gsoc-improve-sonata-software-infrastructure