[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon, 16 May 2005 00:05:29 +0000 (UTC) 
Subject:Re: Porting problems 
From:A . Sloman 
Volume-ID: 

On 15 May 2005, Pete Goodeve wrote:

[AS]
> >If you plan to communicate frequently to pop-forum during the porting
> >process, it would be useful if you could join the list so that I don't
> >have to 'approve' every message. (I suppress quite a lot of spam.)
[PG]
> (I assume you mean you vet the relay from usenet?

Not exactly.

All that happens is that any message sent to pop-forum which comes from
someone not on the list gets blocked until I approve it. So if I am
away, that can be delayed. This happens to messages knowingly sent to
pop-forum and messages sent to comp.lang.pop, which are all relayed to
pop-forum. A pop-forum list member posting to comp.lang.pop does not
trigger blocking.

Much spam posted either to comp.lang.pop or pop-forum never gets to me
because other filters operate.

> Don't think there's
> much one can do about the current spamming of the newsgroup.  Sadly.)
> OK -- if I find I need to post a lot, I will.  At the moment, I'd
> rather not if you don't mind, because it also means I have to set up
> handling at this end.

Fine. I've just approved your latest message!

Good luck with the port.

Ideally, instead of producing a port to BeOS it would be good to produce
mechanisms to generate the BeOS port from the latest version of linux
poplog. But maybe that will be too difficult.

If not too many system sources have to be changed, then the changes
could be inserted in conditional compilation commands in the main
sources in $popsrc and $popsrc/syscomp, and after that it should be
possible to copy the latest version of linux poplog to BeOs, insert a
working corepop, use it to rebuild saved images for popc, poplibr and
poplink, use those saved images to recompile and relink all the poplog
sources and executables except corepop, then rebuild newpop and run it.
On a modern computer that would take at most a few minutes.

(Running the install script for linux poplog V15.6, i.e. rebuilding all
the system saved images then re-linking and running newpop to relink and
build user saved images, indexes etc., on a 2010 ghz AMD64 takes less
than 12 seconds. That includes compiling the poplog widget set. It does
not include recompiling and archiving the main poplog system sources.
That would add several minutes I expect.)

Likewise it should be possible using such a mechanism to generate
debian, freebsd and amd64 versions of poplog. I had hoped we would be
able to do that with OSX poplog, but it still seems to be quite far from
that.

> ....

The next bit should be in a FAQ, and I think I'll copy this to a file in
the sysdoc directory

    http://www.cs.bham.ac.uk/research/poplog/sysdoc/pop11-executables.txt

[PG]
> ....Though I do admit to still being
> confused about the intended purpose of the various '***pop11's.
> 'newpop11' is just what a freshly linked system is named, I gather,
> and 'corepop' and 'corepop11' are the same file (historical difference),
> but in the end we have 'corepop11', 'basepop11', and plain 'pop11'.
> Why are they all there?  How do they differ?

Since you've asked here's what I understand the answer to be.

1. basepop11

The commands invoked by normal users all use basepop11. E.g. pop11
invokes
    basepop11 +popsavelib

prolog invokes

    basepop11 +popsavelib +prolog

pml invokes

    basepop11 +popsavelib +pml

The precise mechanisms depend on a very messy but surprisingly portable
scheme using environment variables $pop_pop11 $pop_prolog $pop_pml
$pop_clisp etc. plus the use of hard or symbolic links in $popsys

E.g. pop11 is a link to basepop11. If you run basepop11 with a command
xxxx and $pop_xxx is an environment variable, then that is equivalent
to running basepop11 followed by the value of $pop_xxx. So

    pop11  is equivalent to:  basepop11 $pop_pop11
    pml    is equivalent to:  basepop11 $pop_pml
    clisp  is equivalent to:  basepop11 $pop_clisp

etc. (See REF SYSTEM/'Additional Startup Mechanism in Unix')

Because there are hard links to basepop11 in $popsys, 'mv' should never
be used to install a new basepop11. It should always be done using 'cp'
so that the links are preserved.
(I think symbolic links did not exist when that scheme was invented.
They are more flexible than hard links).

2. corepop and corepop11

Only corepop is really needed now in the latest linux poplog.

corepop11 is a symbolic link to it which I have left in case some
obscure script still uses it. It should be removed.

corepop was at one time called 'safepop11' I think.

The corepop executable is a 'minimal' version of pop11 without Ved, and
without X facilities. In solaris poplog version 15.53 there are still
three executables of increasing size: corepop, corepop11, basepop11

I don't know why!

On 32-bit linux poplog V15.6 on x86 architectures the size of the
basepop11 file linked on RedHat 8 is currently 1803756 bytes and the
size of corepop is 1300338 bytes. (For some reason the files are smaller
when linked on Fedora core 3 running on AMD64).

The 'size' command gives

       text    data     bss     dec     hex filename
    1437816   62656  243332 1743804  1a9bbc basepop11
    1037955   41252  242504 1321711  142aef corepop


The corepop executable is used both to create and to run the
system-building saved images in $popsys

    popc.psv        - for compiling poplog sources
                      invoked as $popsys/pgcomp

    poplibr.psv     - for building archives from compiled code
                      invoked as $popsys/pglibr

    poplink.psv     - for creating poplink_cmnd and the required
                      .o files files for re-linking poplog
                      invoked as $popsys/pglink

    newpop.psv      - for running pglink and various other things
                      including creating user saved images, indexes
                      etc.
                      invoked as $popsrc/newpop

Once you have a working corepop on a system it should not be upgraded
every time you change poplog. That's because your changes may introduce
a bug that stops corepop working, and then you will not be able to
compile, archive or link poplog sources to fix the bug.

corepop is created as described in
    http://www.cs.bham.ac.uk/research/poplog/sysdoc/rebuilding-corepop

by running one of these two (equivalent commands):

    pglink -core
    pglink -safe

That should produce required .o files and a shell script poplink_cmnd,
which it then runs to create a reduced newpop11 executable that can be
tested to see if it runs, and if so copied to to corepop (after saving
corepop somewhere as a precaution -- using 'cp' not 'mv'!).

3. newpop11

Every time you run pglink it produces a new executable called newpop11
as described above. What sort of executable it is, e.g. whether it
includes Ved or links to X facilities, or whether it is shareable or
not, etc. depend on flags you give to pglink. See the shell script
    $popsys/pglink

E.g. to produce a candidate newpop11 to be used as a new basepop11
linked with ved, X11 facilities, motif, etc. and a symbol map in
newpop11.map use

    pglink -map -xm

to produce newpop11 with no X facilities do

    pglink -nox

to create a newpop11 that runs X facilities using only Athena widgets,
not motif, use

    pglink -map

Once you have a version of newpop11 that you want to use as basepop11
you can copy it to basepop11, then rebuild all saved images using the
scripts in $usepop/pop/com

4. rsvpop11

On some versions of poplog (e.g. Solaris poplog) you will find another
executable rsvpop11. If it runs it exits immediately, unless run with a
saved image.

This is a relic of a time when poplog was a commercial product and
basepop11 would run only if evidence of a poplog licence for that
machine was available. In order to allow users to produce products that
could run without a poplog licence, a mechanism was introduced that
allowed products to start up using instead of basepop11 the rsvpop11
executable that was created at the same time. Then any saved image
produced by the basepop11 could be run using the rsvpop11. This did not
fully prevent end users of poplog-based products (like Clementine) from
gaining access to the full functionality of poplog, but made it more
difficult.

5. basepop11.old

This is automatically created when basepop11 is over-written by the
installation scripts. It allows reversion to an old version if something
goes wrong. Once everything is working basepop11.old and its 'map' file
can be deleted.

I hope that helps.

Aaron
http://www.cs.bham.ac.uk/~axs/