A thought about linking to changing libraries 
Author Message
 A thought about linking to changing libraries

A recurring problem with installing linux poplog has been the naming
of library files requiring links to be inserted, e.g. a link from

    /usr/X11R6/lib/libXm.so.3

to

    /usr/X11R6/lib/libXm.so

in RedHat 8.

This is now proving also to be a problem with libXt, libXext and
libX11

I am not happy with the solution that requires telling people to
insert symbolic links in system libraries.

Following a suggestion from one of our computer officers, I've just
tried doing the following:

    Insert suitably named symbolic links from $popexternlib to
    the appropriate files in /usr/X11R6/lib/
E.g. link

    /usr/X11R6/lib/libXm.so.3

to
    /usr/local/poplog/pop/extern/lib/libXm.so

Then alter the re-linking command file

    $popsys/poplink_cmnd

so that the lines
    -lXm \
    -lXt \
    -lXext \
    -lX11 \

Come before
    -L/usr/X11R6/lib \

That enables the new poplog to be linked without doing anything in
/usr/X11R6/lib

Now I can put links in there that I know will work for redhat 8
but they may not work for something else, e.g. a version of
linux that has libXm.so.4 etc.

I can have instructions that tell the user to change the links
in $popexternlib but they are going to be messy.

Can anyone think of any objection to this, or how to make it
cleaner?

Another possibility would be to copy the library files and
distribute them with poplog in $popexternlib

-rwxr-xr-x    1 root       903248 Sep  6  2002 /usr/X11R6/lib/libX11.so.6.2
-rwxr-xr-x    1 root        53264 Sep  6  2002 /usr/X11R6/lib/libXext.so.6.4
-rwxr-xr-x    1 root       328944 Sep  6  2002 /usr/X11R6/lib/libXt.so.6.0
-rwxr-xr-x    1 root      2684934 Aug 27  2002 /usr/X11R6/lib/libXm.so.3.0.1

Or put them in a separate tar file that can be un-tarred into that
directory (with symbolic links to the .so version).

I think this is all XFree stuff with a licence that is similar to
that of poplog's.

However that could lead to compatibility problems with whatever else
is on the linux system.

Any suggestions?

Aaron
====
Aaron Sloman, ( http://www.*-*-*.com/ ~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK

PAPERS: http://www.*-*-*.com/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.*-*-*.com/



Wed, 19 Oct 2005 01:36:51 GMT  
 A thought about linking to changing libraries

Quote:

> A recurring problem with installing linux poplog has been the naming
> of library files requiring links to be inserted, e.g. a link from

>     /usr/X11R6/lib/libXm.so.3

> to

>     /usr/X11R6/lib/libXm.so

...
<snip: analysis of the problem and proposals>
...

Quote:
> Any suggestions?

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.

The static pop11 would be a lot larger, of course.  And there's also the
issue of whether the licences of the particular libraries in question
would permit distribution as part of poplog.  That would also come up,
maybe in a slightly different form, for Aaron's proposal to distribute
the dynamic libraries from the poplog site.  Would the licence
conditions require putting the library source on the site as well as the
binaries?

Stephen Isard



Fri, 21 Oct 2005 03:01:03 GMT  
 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



Fri, 21 Oct 2005 06:07:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. pgplot library and linking; finding libraries

2. Thinking of a change

3. problems linking to C code (I think)

4. tcl8's expr changes: why I think it's bad

5. More Thoughts on Standard TCL library

6. thoughts on an official set of library modules

7. Think C Library and MPW

8. To think or not to think ;-)

9. Thinking about thinking

10. Thinking about thinking

 

 
Powered by phpBB® Forum Software