[Top][All Lists]

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

Re: wam2ma

From: Daniel Diaz
Subject: Re: wam2ma
Date: Wed, 16 Jan 2013 15:37:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2


To find its sub-compilers (pl2wam, wam2ma,...), gplc searches first determines its root path. For this it:
  1. reads the PL_PATH environment variable, if it is valid then use it
  2. looks at argv[0] and if it is a full path and it is valid then use it
  3. looks at the PATH variable to see from where comes the 'gplc'.

In case 2 and 3 symbolic links dereferenced (using realpath(3)). If the (real) path found is /some/...../thing/bin/gplc the gprolog root PATH is /some/...../thing/ (skipping the gplc exec name and the last sub-directory).

From this root path, gplc searches its sub-compilers in root_path/bin (the includes in root_path/include, the libs in root_path/lib, ...).

Since links are followed it is always possible to create a link (ln -s) to the gplc executable (but you should not move it nor copy it).

For instance, a linux installation can place gprolog in /usr/local/gprolog-1.4.2 (with sub-dirs, bin, lib, include, ...) and links for the binaries in /usr/bin/

In your case, see where gplc resides, following the links you should arrive to a subtree with the sub-dirs bin, lib, include,.. and in bin you should have pl2wam, wam2ma,...

From what you say, it seems your gprolog is installed in /usr/bin/gprolog-iso (since you have a bin subdir with wam2ma inside). Check you also have the gplc executable (together with gprolog, pl2wam, ma2asm, fd2c,...). You should also have a lib and an include subdir. If it is the case you gprolog is well installed.

Executing the following command to compile a file FILE should work (under bash):

   PATH=/usr/bin/gprolog-iso/bin:$PATH gplc FILE

To fix your problem now. Maybe your gplc is not a link but a copy (or a move). Check where comes gplc. Use:

   which gplc

then use ls -l to check it is really a link to /usr/lib/gprolog-iso/bin/gplc

   ls -l `which gplc`

if not create the link:

   ln -sf /usr/bin/gprolog-iso/bin/gplc `which gplc`

NB: You can pass the -v option to gplc -v to see the root path used.


Le 16/01/2013 14:06, mcculloch a écrit :
Since no one else seems to have this problem, I assume it's not a bug.  I
have version 1.4.2 and I found wam2ma at /usr/lib/gprolog-iso/bin/wam2ma on
my Linux 12.04-64 (Ubuntu) system.

However, gplc can't seem to find it.  Where should it be?


Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé.

reply via email to

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