There are now various versions of openmotif and lesstif
and this is causing problems for my attempts to produce a
generic automated installation script. The current version
is
http://www.cs.bham.ac.uk/research/poplog/com/INSTALL_MOTIF_POPLOG
which also invokes
http://www.cs.bham.ac.uk/research/poplog/com/INSTALL_LIKE_BHAM
and is included in bham-linux-poplog.tar.gz file
The problem is coping with all the versions of motif that
may exist, when there is no libXm.so file
For instance, having installed RedHat 8.0 I found that the
command
ls -l /usr/X11R6/lib/libXm.so*
gives
lrwxrwxrwx 1 root root 14 Nov 23 23:35 /usr/X11R6/lib/libXm.so.3 -> libXm.so.3.0.1
-rwxr-xr-x 1 root root 2684934 Aug 27 00:16 /usr/X11R6/lib/libXm.so.3.0.1
Whereas on other systmes we find thyings like
libXm.so.1, libXm.so.2, libXm.so.2.0.1
etc.
Poplog works with all of these, but only if libXm.so exists
as a link to one of them. So on redhat 8 it should be a link
to libXm.so.3
It seems that by default openmotif is installed without such
a link. In that case the attempt to link (or run) poplog
fails.
The script for linking (which is automatically generated by
the newpop command -- see HELP NEWPOP) is
$popsys/poplink_cmnd
The crucial line of that script, for linking motif is this:
-lXm \
I have investigatd man files and info files for gcc and for
ld on my linux system and find that, for instance "man ld"
says about the -l option:
On systems which support shared libraries, ld may also
search for libraries with extensions other than ".a".
Specifically, on ELF and SunOS systems, ld will search
a directory for a library with an extension of ".so"
before searching for one with an extension of ".a".
By convention, a ".so" extension indicates a shared
library.
I have found nothing about how to make it accept an
extension with a version number, like
.so.2
.so.3
.so.3.0.1
etc.
I would have thought that if one of those existed but not
the .so version the linker would then automatically choose
the most recent, but apparently there is no way to make this
happen.
I could easily write a pop-11 script to search for all of
these, find the latest and create the link. But on the
systems we are considering pop11 may not run.
I could also write a shell script with a lot of conditional
expressions testing for the latest possible version and
working backwards, but it would be very ugly and as I am
not an experienced shell programmer it will take me a long
time -- starting from a script once provided by Andrew
Sayer, which coped only with the case where libXm.so.2 is
present
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=98k2vj%2421ve%241%40soapbox.cs.bham.ac.uk&rnum=16
So: if anyone can tell me how (on linux) to modify
poplink_cmnd to make the linker search for the most recent
file matching libXm.so* that would be great.
If that's impossible, as I suspect, then if anyone can can
provide me with a shell script to be run as root to create a
link libXm.so to the appropriate file matching libXm.so*
(when there may already be several) I can then further
automate my poplog installation script!
Otherwise I'll have to find time to write the multi-branch
conditional to deal with the cases I know about -- which
will break the next time there's a new version of motif!
Thanks.
Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk (ReadATas@please !)
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
|