
A thought about linking to changing libraries
Steve Isard writes
Quote:
> Date: Sun, 4 May 2003 20:01:03 +0100
[AS]
Quote:
> > A recurring problem with installing linux poplog has been the naming
> > of library files requiring links to be inserted
[SI]
Quote:
> Another way around the problem might be to link the libraries statically
> instead of dynamically. Then it wouldn't matter how the user's machine
> had its dynamic libraries set up. The Opera browser offers both static
> and dynamic Linux binaries for essentially this reason, as I understand
> it.
That may be necessary as a last resort, though I suspect there may be
other problems in doing that. I also don't know how much bigger it will
make the distributed system.
I think the best solution is for me (or someone with more time) to
look carefully at the code in
$popsrc/syscomp/*.p
that generates the $popsys/poplink_cmnd file and edit it so that
before it generates the poplink_cmnd file it sets up links for X11
stuff and motif as needed in $popexternlib, and changes the order of
the items in the poplink_cmnd so as to ensure searching is done
in the right place.
I think the top level procedure is in
$popsrc/syscomp/poplink_main.p
but lots of subsidiary procedures are in other files, and
unfortunately none of it is documented as far as I know.
Anyhow, the revised installation script could
1. first generate a version of poplog that doesn't need any of the X
libraries, doesn't include Ved, etc.
cd $popsys
./pglink -safe
(See http://www.cs.bham.ac.uk/research/poplog/sysdoc/popc )
2. Use that to rebuild the system tools including newpop
cp newpop11 corepop
ln -s corepop corepop11
$popsrc/mksyscomp poplink poplibr popc
Then use the new syscomp files to make newpop:
$popsrc/mknewpop
Then everything would be tailored to the current environment
and would work using the newly designed newpop.psv.
There should be an option to create a file specifying where standard
libraries are if they are not in standard places, e.g. if motif
(libXm.so...) is not in /usr/X11R6/lib but somewhere else.
(This might involve enriching the syntax used for this file
$popsrc/newpop_options
as described in HELP NEWPOP).
The revised newpop should also generate the poplink_cmnd script with
environment variables instead of full path names (easily done by
removing calls of sysfileok). This will make it easier to move poplog
around.
There is a huge amount of power and flexibility in the existing
system. The only problem is that the chief architect is no
longer available. However, the code is readable if one has the time.
Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html