bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Workspace and wslib? search path


From: Juergen Sauermann
Subject: Re: [Bug-apl] Workspace and wslib? search path
Date: Mon, 26 Jun 2017 12:11:00 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Fred,

conceptually the )libs command shows the directories that will be used
for the different library numbers (ranging from 0-9 with 0 being the default
library number of none is given).

The other (non-library number) argument of the lib command is a directory, and
to be distinguished from a library reference number it should contain a /.

I suppose the first thing going wrong in your examples below is that the )lib argument
seems to be a workspace name while the )lib command expects either a library reference
number like 0..9 or the path to a directory.

So if ../workspaces/ contains workspace plotsincos.xml then the command

)lib ../workspaces

should display it. For example:

      )host pwd
/home/eedjsa/projects/juergen/apl-1.7/src

0

      )lib ../
autom4te.cache/     debian/     debian_tmp/     devel_doc/
doc/                erlang/     ftp-upload/     gnu-apl.d/
html/               m4/         rpm/            src/
support-files/      tools/      web-home/       workspaces/
wslib1/             wslib2/     wslib3/         wslib4/
wslib5/
      )lib ../workspaces
APL_CGI             LSQRL       RU1     RU2         RUBIK   SCRIPT
ScalarBenchmark     XSudoku     sudoku  sudoku_DLX  test    tt



Now the locations of library directories can be specified in different ways. The library root mechanism
assumes a single directory that contains (at least) two subdirectories named workspaces and wslib1.
These names come from the IBM APL2 interpreter which is using a similar scheme (but without giving
any rules for it).

GNU APL starts with this library root scheme, but each directory can be overridden by either the system's
preference file and/or the user's preference file. the )LIBS command then tells how the library paths for
the different library reference numbers were computed. For example:
---------------------------------------------------------------------------
Ref Conf  Path                                                State   Err
---------------------------------------------------------------------------
 0 BIN   /home/eedjsa/projects/juergen/apl-1.7/src/workspaces present
 1 BIN   /home/eedjsa/projects/juergen/apl-1.7/src/wslib1     present
 2 BIN   /home/eedjsa/projects/juergen/apl-1.7/src/wslib2     missing (2)
 3 PSYS  /usr/local/lib/apl/wslib3                            present
 4 PSYS  /usr/local/lib/apl/wslib4                            present
 5 PSYS  /usr/local/lib/apl/wslib5                            present
 6 BIN   /home/eedjsa/projects/juergen/apl-1.7/src/wslib6     missing (2)
 7 BIN   /home/eedjsa/projects/juergen/apl-1.7/src/wslib7     missing (2)
 8 BIN   /home/eedjsa/projects/juergen/apl-1.7/src/wslib8     missing (2)
 9 BIN   /home/eedjsa/projects/juergen/apl-1.7/src/wslib9     missing (2)
===========================================================================


This tells us that libraries 3, 4, and 5 were specified by PSYS (system preferences file, e.g.
/usr/local/etc/gnu-apl.d/preferences) while the others are computed from the current directory (BIN).
The State and Err columns tell if the directory is accessible and the errno if not.

If I remember correctly then the )lib command wants either a library reference number (0-9) or a
path, but not both. If it fails, then )more tells which directory was tried (I fixed the spelling mistake)
and the strerror(errno) of the failed operation:

      )lib xxx
IMPROPER LIBRARY REFERENCE 'xxx': No such file or directory
      )more
path 'xxx' could not be openend as directory: No such file or directory

Best Regards,
/// Jürgen


On 06/26/2017 06:07 AM, Frederick Pitts wrote:
Hello Jürgen,

	The apl.html doc indicates that if environment variable
APL_LIB_ROOT is not defined, the subject search path will be from the
current directory '.' up to the root directory '/' stopping when a
directory containing two directories ’workspaces’ and ’wslib1’ is
found.

	The above does not work on my platform, Fedora 25. For
instance, 'plotsincos.xml' is in ../workspaces relative the current
directory.

	)lib plotsincos

yields

IMPROPER LIBRARY REFERENCE 'plotsincos': No such file or directory

and

	)lib 0 plotsincos

yields

IMPROPER LIBRARY REFERENCE '0': No such file or directory.

Is this a bug or has the feature been removed and the documentation is
out of date.

	A related question is if the feature were to work correctly,
would the )libs command use the feature so its output reflects the
location of the library directory paths that will be used by the )lib
command.  Currently, it does not.

Regards,

Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]