I seem to be taking a very long and convoluted route to reach a goal
which I'm sure must be easier by some other fashion. Any advice is
most welcome.
We need to compile our package for distribution under Solaris 2.4 so
that it runs under both 2.4 and 2.5 as 2.5 binaries aren't guaranteed
to run under 2.4. (Oddly enough I was told by someone at Sun that
dynamically linked 2.3 binaries should run under 2.4, 2.4 binaries
under 2.5, but not 2.3 under 2.5. Bizarre.)
We also wish to have 2.5 in use on this machine, and we need it for
testing anyway. So the natural solution is a dual booted system. No -
we don't want another physical machine. It's hot (no air conditioning)
and cramped enough in here as it is.
This works fine. However I then decided that it'd be nice to compile
2.4 binaries under 2.5. The reason being that this workstation is in
use and it's hassle for everyone to require it to be rebooted each
time we distribute programs. I could probably play with using -L and
-I, but I simply don't trust the compilers (Sun's f77 and GNU gcc) to
do this. So I come up with the following hack.
Start up a chrooted environment under /24 (my 2.4 root directory). Now
this hasn't got the necessary disks mounted, and the automounter
thinks that /net/arran/home5 (which is really /24/net/arran/home5) is
already mounted. So I do this manually with a second mount. That's the
first question - does NFS mounting the same disk twice to different
positions cause problems? It lets me do it and it _appears_ to work.
Then, because I need some stuff in /usr/local, I have to export (in non
chrooted environ.) /usr/local from this machine to itself, and then
NFS mount it in the chrooted environment. So - does this cause
problems? It sounds pretty iffy - NFS mounting localhost:/usr/local to
/usr/local. However, once more, it works.
Finally, because I keep running out of /tmp space, I realised that
when really booted under 2.4 /tmp is tmpfs mounted. So I then did a
final mount to mount /tmp as tmpfs. So how about that last one - can
we mount tmpfs in two different locations?
The code now compiles away fine. However df (2.5) now core dumps! So
am I really expecting just a tad too much, or should I be able to do
such ghastly things? :-)
Of course, if anyone can suggest a simpler solution then it would be
most greatfully recieved!
James
--
Medical Research Council - Laboratory of Molecular Biology,
Hills Road, Cambridge, CB2 2QH, England.
Also see Staden Package WWW site at http://www.mrc-lmb.cam.ac.uk/pubseq/