[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jun 29 22:01:49 2003 
Subject:Re: 'errno' problem for poplog in redhat 9: Further progress 
From:Aaron Sloman 
Volume-ID:1030629.02 

I wrote:

> Step 2:
>  ....
>
>  define active DO_ERRNO_VAL() -> _x;
>      _extern get_libc_errno() -> _x
>  enddefine;
>
>  define updaterof active DO_ERRNO_VAL(_x);
>      _extern set_libc_errno(_x)
>  enddefine;

A little more thought suggested that that should be changed to ensure
that the conversions between pop11 integers and system integers are
right:

 define active DO_ERRNO_VAL() -> _x;
     _extern get_libc_errno() -> _x;
     _pint(_x) -> _x;
 enddefine;


 define updaterof active DO_ERRNO_VAL(_x);
     _extern set_libc_errno(_int(_x))
 enddefine;

After those changes rebuilding the system produced a version
that went much further. I recompiled all the pop11 sources,
as before, archived them using pglibr, used pglink -xm
to create a version of newpop11 including motif, then
tried running it.

If I do all that with the new sources on a redhat 8 machine it all
runs perfectly. If I copy over the linked binaries to redhat 9
they produce a warning message about errno when they start up,
but still run perfectly.

However if I link the executables on redhat 9 from the same libraries
and the same .o files, I get a new executable that I can start up
without the warning message, and which will do many things (including
creating saved images).

But no version that has been linked on redhat 9 works perfectly.

It doesn't report mishaps properly and will not start an
empty file:

 : ved fooo

 ;;; MISHAP - CAN'T OPEN FILE (Resource temporarily unavailable)
 ;;; INVOLVING:  <SYSTEM_OBJECT 40419A68>
 ;;; DOING    :  runproc pop_setpop_compiler


I can use it run ved, read files, load libraries. I can compile
a definition of factorial and compute and print out factorial 600.
But factorial 1000 triggers a garbage collection and it crashes.
I also can't create $popsavelib/startup.psv

And some error messages are still wrong:
: "two" + 3 =>

;;; MISHAP - NUMBER(S) NEEDED
;;; INVOLVING:  3 <SYSTEM_OBJECT 401A4048>
;;; DOING    :  + pop_setpop_compiler

This is puzzling because, as far as I can see the things I have
changed do not affect the error handling in the arithmetic
procedures.

So the attempt to read a nonexistent file is producing an
error, even though if the file exists there is no problem.

I am beginning to suspect that there may be more changes to the linux
libraries or the linker that the poplog sources have to take account of
than the change requiring the errno fix.

If I build a system on redhat 8 with exactly the same sources, and link
it on a redhat 8 machine, then copy it to the redhat 9 machine, it
produces the warning message when it starts up, but runs perfectly.

If I re-link on redhat 9, I get a system that starts up without the
'errno' warning message, runs OK for some tasks, but crashes for
others.

It seems that the linking process must introduce something
that is different on redhat 9.

(Poplog has revealed bugs in many linkers in the past, because
its requirements are very demanding.)

I wonder if there's a list of changes somewhere that might give clues?

I notice that the glibc libraries for redhat 9 are now available as
version
    2.3.2-27.9

I wonder if I should upgrade: mine (straight off the redhat 9 CD)
is at version 2.3.2-11.9

Has anyone else tried upgrading?

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