strange behaviour of LIB mkind on redhat 7.3 (sysfileok problem) 
Author Message
 strange behaviour of LIB mkind on redhat 7.3 (sysfileok problem)

This is a cautionary tale. I found a very strange symptom that led me
at first to think there might be some obscure bug in RedHat 7.3, and
then found it was all due to (a) how I had set up environment
variables, and (b) how the pop11 utility sysfileok works.

In order to rebuild the indexes for ENTER sourcefile, I use this
command:

    $popsys/pop11 %noinit  $poplocal/local/lib/mkind.p

which, instead of the standard $popliblib/mkind.p file uses
a version that includes all our local libraries in the index.
That file is here:
    http://www.*-*-*.com/

I set the variable Preserve_env true, so that the index entries
use the environment variables instead of expanded file names.

Normally this works fine, e.g. in solaris, digital unix, redhat 7.1,
redhat 7.2 and redhat 8.0

However I discovered that if I run it in redhat 7.3 then some file names
get their leading character removed, so that ENTER sourcefile no longer
works for those entries.

It's very strange. The problem arises only for some path names but not
others:

Examples:

This entry is fine
    actor_answer $poplocal/local/lib/newactor.p

but this entry is not
    actor_answer $popliblib/ctor.p

It should be
    actor_answer $popliblib/actor.p

Likewise this is wrong:
    add_accessproc $popautolib/ewc_dec.p
it should be
    add_accessproc $popautolib/newc_dec.p

All the *local* entries seem to be fine, but only some of the
entries for poplog  system directories.

E.g. these are OK
    all_same_case $usepop/pop/lisp/src/util.p
    all_solutions $usepop/pop/plog/src/findall.p
    all_infs $usepop/pop/lib/objectclass/src/inheritance.p

but these have a character removed from the beginning of the file name:
    allbutfirst $popsrc/llbutfirst.p
    allfields $popliblib/ewobj.p
    andnotcase $popautolib/witchon.p
    blocks $popdatalib/omains.p
    check_aliases $popvedlib/ed_send.p

The pattern seems to be that the character is removed from the file name
when the environment variable refers to a system directory and there is
no subdirectory in the path name.

For a while I thought the problem might be a bug in RedHat 7.3

However, after writing the above, and thinking a bit, I looked more
carefully and found that the mkind program uses sysfileok. If I
tested some of the path names they included '//' instead of '/'.
E.g.

sysfileok('$popvedlib')=>
** /bham/common/com/packages/poplog/linux.7.3//pop/lib/ved

I eventually traced this to the fact that in our local login script for
redhat 7.3 I had

        setenv usepop /bham/common/com/packages/poplog/linux.7.3/

instead of
        setenv usepop /bham/common/com/packages/poplog/linux.7.3

That was easy to fix, and now the index files are built correctly and
ENTER sourcefile works. However it left me wondering whether sysfileok
should be changed to check for and remove repeated occurrences or
trailing occurrences of '/'

I suppose if this has never caused any problems for anyone else it
should be left as it is.

There's a similar possible problem with dir_><, the string concatenator
for joining a directory name with a file name:

    'fooo/' dir_>< 'baz' =>
    ** fooo/baz

    'fooo' dir_>< 'baz' =>
    ** fooo/baz

    'fooo' dir_>< '/baz' =>
    ** fooo/baz

but

    'fooo/' dir_>< '/baz' =>
    ** fooo//baz

The code for sysfileok and dir_>< is in $popsrc/sysfileok.p

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/



Mon, 20 Jun 2005 21:31:58 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. PHP 4.1.2 on apache 1.3.23, on RedHat 7.3 - weird problem with LoadModule php4_module

2. oh *drat*, xved falls over on redhat 7.3

3. relinking poplog for redhat 7.3

4. bash via ved:imsh under Redhat 7.3

5. Ruby in Redhat 7.3

6. PHP 4.2.2 or 4.2.3 on RedHat 7.3

7. RedHat 7.3

8. RedHat 7.3 (Kevin Dahlhausen)

9. RedHat 7.3 and Python2.2.1

10. Redhat 7.3 PHP RPM + Payflow Pro functions -- HELP

11. PyXML-0.7.1, python-2.2.1, and Redhat 7.3

12. Help Porting PHP Sites from Solaris to RedHat 7.3

 

 
Powered by phpBB® Forum Software