casacore / casacore

Suite of C++ libraries for radio astronomy data processing
http://casacore.github.io/casacore
Other
118 stars 87 forks source link

measures data not found during build test #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install on a system which does not have aips++
2. ./batchbuild.py test
3.

What is the expected output? What do you see instead?

During the test phase, lots of things have been failing because the
measures stuff fails to find its data.

What version of the product are you using? On what operating system?

casacore-0.3.0patched.tar.bz2
SuSE 10.3
gcc 4.2.2

Please provide any additional information below.

Untarring the data directly into casacore-0.3.0 as instructed by the build
instructions page did not work.  Copying the data to the stage directory
did work, but did not seem like a good end solution.  So, Ger suggested
making a .casarc file.

On Wed, 4 Jun 2008, Ger van Diepen wrote:
> The Measures need to know where they can find their data files which for
AIPS++ was defined in aipsrc files to be found using AIPSPATH.
> For casacore we still use the same mechanism, but the aipsrc (or whatever
name you give it) to be used can also be defined via CASARCFILES.  It was
on my todo-list to add some comments about the casa resource files (the old
aipsrc) to the casacore pages, but hadn't done it yet.

Ok, I had not enabled any environment variables or hidden files, as
the instructions did not say to do so.  I now have made a ~/.casarc
file, and an environment variable CASARCFILES points to that.  I also
decided to make a CASACOREROOT directory to point to the end location
of the libraries and data areas.

> I have a .casarc in my home directory containing:
> 
> measures.DE200.directory: $HOME/measures_data/ephemerides
> measures.DE405.directory: $HOME/measures_data/ephemerides
> measures.line.directory: $HOME/measures_data/ephemerides
> measures.sources.directory: $HOME/measures_data/ephemerides
> measures.comet.directory: $HOME/measures_data/ephemerides
> measures.ierseop97.directory: $HOME/measures_data/geodetic
> measures.ierspredict.directory: $HOME/measures_data/geodetic
> measures.tai_utc.directory: $HOME/measures_data/geodetic
> measures.igrf.directory: $HOME/measures_data/geodetic
> measures.observatory.directory: $HOME/measures_data/geodetic

I copied this, replacing $HOME with $CASACOREROOT, and measures_data with
just data, and it failed to
work.  I them replaced $CASACOREROOT with the explicit path, and it
worked.  So, is $HOME special?  Yes, but not to casacore.  SCons
insists on blasting away your environment variables, so when you run
through the tests, you only have LD_LIBRARY_PATH, PATH, PWD, SHLVL,
and HOME defined.  So, your specific use of $HOME in your .casarc file
would work, whereas my $CASACOREROOT failed because scons doesn't like
that.

Ok, after placing CASACOREROOT into the casacore_assay batch program, the
test programs are able to find their data.  Hooray.  But I'm not sure how
to fix scons for others so that this is a final solution.

Note, I believe that this also means that things like AIPSROOT and AIPSPATH
will not be defined during the scons test phase either.

Original issue reported on code.google.com by Anderson...@gmail.com on 4 Jun 2008 at 5:17

GoogleCodeExporter commented 9 years ago
scons deliberately starts from a clean environment. There has been plenty of
discussion on the mailing list, but the main advantage is you get a clean"
environment, where you exactly know which libraries etc contribute.

AIPSROOT and AIPSPATH are deprecated, they shouldn't be used anymore.
Ger has a ticket issue #6 to document the rc setting, which should help.
For now I have changed the BuildInstructions to say that the data should go 
into stage.
I'll discuss with Ger if we can find a better solution.

Original comment by Malte.Marquarding on 4 Jun 2008 at 11:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This has been addressed.

The solutions are

* add datadir=<path_to_ephemerides_and_geodetic_data> to the build options. 
This adds
the datadir to the default locations searched by measures

* use casarc files see CasaAipsRC

Original comment by Malte.Marquarding on 28 Oct 2008 at 3:51