Virgo Logbook
UTC--:--:--
GPS-
Reports
Electronics and Software›Software Installation and Test #2864

(untitled)


I have finally installed the 2002 version of the Cernlib on the
Alpha workstations.
I could not do it at first because the binaries required the
shared library "libshift.so".
But then I realized that I could just provide a fake "libshift"
library with empty functions. The source is in
/usr/local/cern/2002/bin/libshift.c and the library in
/usr/local/cern/2002/bin/libshift.so.
Note: I have put it in "bin" and not in "lib" in order to avoid
confusions with the standard Cern libraries.

But then the problem was to load this library at run-time.
As I did not want to play directly with the "LD_LIBRARY_PATH"
variable, I decided to make an alias for the three commands that
use this library: paw, pawX11 and paw++.

These aliases are a bit tricky because I wanted them to work
both if the LD_LIBRARY_PATH variable was already set or not.
This would be easy in ksh/bash, but is a nightmare in csh/tcsh.
So here is an example:

alias paw 'env LD_LIBRARY_PATH=`test $?LD_LIBRARY_PATH == 1 &&
echo ${LD_LIBRARY_PATH}:${CERN_BIN} || echo ${CERN_BIN}` \ 
${CERN_BIN}/paw'

These aliases have been put in /virgoApp/cshrc-virgo.

2 comments

teuler · 15 Oct 2002 · 15:37 #2867

Actually, it was not so easy!

As I thought at first that actually Paw was not calling the rfio functions, I had provided empty versions of these calls.
But as a problem recently reported has shown, Paw does call the rfio functions.

As I have no documentation about these calls, and as I have found no information on the Cern Web site, I have made some reverse engineering which has shown that these calls should be identical to the standard C library calls.
So I have managed to call the standard functions through my fake rfio functions.

This seems to work for all the calls (rfio_open, rfio_close, rio_read, rfio_write).
It does not work for rfio_stat, but it is enough to return 0 from this call, so this is what I did.

Now, Paw is able at least to read a histogram from a file!
A test should be made to check if there are problems with writes.

teuler · 17 Oct 2002 · 14:34 #2876
I have done two tests that write files (one that writes a PostScript file with picture/print and one that writes a vector with vector/print) and they both succeeded.
Unfortunately, none of these two tests used rfio_write so, though everything seems to work, I cannot be sure that the fake version of rfio_write works.