Subject: [clisp-list] clisp on osx

From: james anderson <[email-masked]>
Date: Fri Aug 15 07:07:11 2003

i read in the documentation that clisp should build on osx, so i'm 
trying.

i've pulled the 2.30 distribution and am trying to follow the 
instructions. i'm using the standard apply development tools, as 
installed from Dec2002DevToolsCD.dmg. given osx 10.2.6, when i attempt 
to run configure, as in,

   ./configure with-apple-devtools

it runs to the point where it appears to trip over a syntax error in a 
shell file. as in,

creating libtool
checking for langinfo.h... no
checking for nl_langinfo... no
checking for nl_langinfo and CODESET... no
checking whether we are using the GNU C Library 2.1 or newer... no
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for setlocale... yes
updating cache ../config.cache
creating ./config.status
creating Makefile
creating lib/Makefile
creating config.h
config.h is unchanged
case "darwin6.6" in \
   aix3*) syntax=aix.old;; \
   aix*) syntax=aix.new;; \
   linux*) syntax=linux;; \
   *) syntax=sysv4;; \
esac; \
/bin/sh ./libtool --mode=compile gcc -x none -c 
../../ffcall/avcall/avcall-rs6000-${syntax}.s ; \
cp avcall-rs6000-${syntax}.lo avcall-rs6000.lo ; rm -f 
avcall-rs6000-${syntax}.lo ; \
if test -f avcall-rs6000-${syntax}.o; then mv avcall-rs6000-${syntax}.o 
avcall-rs6000.o; fi
gcc -x none -c ../../ffcall/avcall/avcall-rs6000-sysv4.s -o 
avcall-rs6000-sysv4.o
avcall-rs6000.c:3:Expected comma after segment-name
avcall-rs6000.c:3:Rest of line ignored. 1st junk character valued 32 ( 
).
avcall-rs6000.c:5:Unknown pseudo-op: .type
avcall-rs6000.c:5:Rest of line ignored. 1st junk character valued 95 
(_).
avcall-rs6000.c:5:Invalid mnemonic 'function'

is there a know fix for this?

if i just make believe this doesn't matter and continue as instructed, 
when i attempt make, the following eventually occurs

...

ln -s ../src/version.h version.h
gcc -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type  
-fomit-frame-pointer -Wno-sign-compare -O2 --traditional-cpp -DUNICODE 
-DNO_GETTEXT -DNO_SIGSEGV -c spvw.c
lispbibl.d:1950: unbalanced #endif
lispbibl.d:6683: unterminated #else conditional
spvw_objsize.d:110: unterminated #else conditional
make: *** [spvw.o] Error 1
[tschichold:Source/clisp-2.30/with-apple-devtools]

is there a known fix for this?

thanks
...

---

From: Douglas Philips <[email-masked]>
Date: Fri Aug 15 08:03:03 2003

> it runs to the point where it appears to trip over a syntax error in a 

Take a look at unix/PLATFORMS for the shell you need to do the 
configure with. Unfortunately, even with a good config I was getting 
the same preprocessor error. I've been able to limp along with the 1.29 
binary, so I haven't dove in to look at this in detail. I had pinged 
Sam about it and was waiting to see if any of the previous Mac porters 
were still active.
> is there a known fix for this?

My hunch  (not even a guess) is that somewhere darwin6.6 is passed in 
but 'darwin' is what is being tested for. Not (yet) being a autoconf 
wiz, I don't really know. FWIW, if anything.

Doug

---

From: james anderson <[email-masked]>
Date: Fri Aug 15 09:43:03 2003

On Friday, Aug 15, 2003, at 16:58 Europe/Berlin, Douglas Philips wrote:
> the same preprocessor error. I've been able to limp along with the 
> 1.29 binary,

that was a useful clue. i've no intrinsic interest in building from 
source, but must have overlooked the -darwin- entry under 2.29.
so now i've pulled that too. only thing, it wouldn't link. at least not 
where i put it. but i noticed that fink claimed availability of 2.29, 
so i just let it install that, which appears to have worked. in any 
case, w.r.t. the earlier attempt, i had tried it both with the 
suggested bash and with the standard tcsh shell.

now that it is running, i have more questions. at the moment, about 
logical pathnames.

should one expect logical pathnames to work correctly? are there any 
patches for them?

1. i would expect pathname to returns a logical pathname in the case:

[1]> (pathname "xml:xml-grammar.bnf")
#P"xml:xml-grammar.bnf"
[2]> (type-of *)
PATHNAME

2. given the logical host definition attached below i would expect the 
following example to have translated the pathname

[28]> (translate-logical-pathname #p"xml:xml-grammar.bnf")
#P"xml:xml-grammar.bnf"

3. what is the issue behind this error message?

[22]> (TRANSLATE-LOGICAL-PATHNAME "xml:code;patch;cmucl.lisp")

1. Trace: (TRANSLATE-LOGICAL-PATHNAME '"xml:code;patch;cmucl.lisp")
*** - TRANSLATE-PATHNAME: replacement pieces ((:DIRECTORY "patch") 
"cmucl" "lisp" NIL) do not fit into #P"xml:root;code;**;*.*.*"
1. Break [23]> :a

[24]> (TRANSLATE-LOGICAL-PATHNAME "xml:code;patch;cmucl.lisp.newest")

1. Trace: (TRANSLATE-LOGICAL-PATHNAME 
'"xml:code;patch;cmucl.lisp.newest")
*** - TRANSLATE-PATHNAME: replacement pieces ((:DIRECTORY "patch") 
"cmucl" "lisp" NIL) do not fit into #P"xml:root;code;**;*.*.*"
1. Break [25]>

the logical host definition was as follows

2. Break [4]> (logical-pathname-translations "xml")
((#S(LOGICAL-PATHNAME :HOST "XML" :DEVICE NIL
      :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE "BIN" 
:VERSION :WILD)
   #P"*.fas")
  (#S(LOGICAL-PATHNAME :HOST "XML" :DEVICE NIL
      :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE "BIN" 
:VERSION :WILD)
   #P"*.fas")
  (#S(LOGICAL-PATHNAME :HOST "XML" :DEVICE NIL
      :DIRECTORY (:ABSOLUTE "CODE" :WILD-INFERIORS) :NAME :WILD :TYPE 
:WILD
      :VERSION :WILD)
   "xml:root;code;**;*.*.*")
  (#S(LOGICAL-PATHNAME :HOST "XML" :DEVICE NIL
      :DIRECTORY (:ABSOLUTE "ROOT" :WILD-INFERIORS) :NAME :WILD :TYPE 
:WILD
      :VERSION :WILD)
   #P"/Development/Source/cl-xml-0-949/**/*.*")
  (#S(LOGICAL-PATHNAME :HOST "XML" :DEVICE NIL
      :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE "BNF" 
:VERSION :WILD)
   "xml:root;bnf;*.*.*")
  (#S(LOGICAL-PATHNAME :HOST "XML" :DEVICE NIL
      :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE "BNF" 
:VERSION :WILD)
   "xml:root;bnf;*.*.*")
  (#S(LOGICAL-PATHNAME :HOST "XML" :DEVICE NIL
      :DIRECTORY (:ABSOLUTE :WILD-INFERIORS) :NAME :WILD :TYPE :WILD 
:VERSION :WILD)
   "xml:root;**;*.*.*"))

...

---

From: Sam Steingold <[email-masked]>
Date: Fri Aug 15 09:58:03 2003

> * In message <[email-masked]>
> * On the subject of "clisp on osx"
> * Sent on Fri, 15 Aug 2003 16:01:06 +0200
> * Honorable james anderson <[email-masked]> writes:
>

try
$ CONFIG_SHELL=/bin/bash ./configure ...

> avcall-rs6000.c:5:Invalid mnemonic 'function'

try other syntaxes?

> make: *** [spvw.o] Error 1

did you see any errors in processing lispbibl.d --> lispbibl.c?

please try cvs head - there have been many many changes...

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Live free or die.

---

From: james anderson <[email-masked]>
Date: Fri Aug 15 10:23:06 2003

> $ CONFIG_SHELL=/bin/bash ./configure ...

i had. to the same effect.
>> avcall-rs6000.c:5:Invalid mnemonic 'function'

i'll keep that in mind if i have to go back to building from source.
suggestions as to which? would "linux" be the place to start?
pointers as to which file was problematic so that i might compare it 
with the version which fink managed to build?

> please try cvs head - there have been many many changes...

will do, if i need to build from source.

...

---

From: Sam Steingold <[email-masked]>
Date: Fri Aug 15 13:25:06 2003

> * In message <[email-masked]>
> * On the subject of "logical pathnames [ was:  clisp on osx"
> * Sent on Fri, 15 Aug 2003 18:13:41 +0200

<http://clisp.cons.org/impnotes.html#parsename>
<http://clisp.cons.org/impnotes.html#ansi>

> [28]> (translate-logical-pathname #p"xml:xml-grammar.bnf")

the argument was not a logical pathname.

>       "cmucl" "lisp" NIL) do not fit into #P"xml:root;code;**;*.*.*"

you need separate entries:
(("**/*" "...**/*")
 ("**/*.*" "...**/*.*")
 ("**/*.*.*" "...**/*.*.*"))

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
My inferiority complex is the only thing I can be proud of.

---

From: james anderson <[email-masked]>
Date: Fri Aug 15 15:08:04 2003

>> [1]> (pathname "xml:xml-grammar.bnf")
i thought i had tried it with -ansi for these reasons. i'll try it 
again, is this perhaps a known 2.29 bug?

>> [28]> (translate-logical-pathname #p"xml:xml-grammar.bnf")

part of the problem is that the initial datum was a string. see above. 
(the example is out of context.)

> the argument was not a logical pathname.

the reader macro is defined to act as if it applies parse-namestring to 
the argument. it should have produced a logical pathname.

> you need separate entries:

is this really necessary? there are other lisps which automatically 
transform the "incomplete" entries to add the missing components. i'll 
have to check what they will do with the triplicate entries.

in any case i had wondered about that, which is why i had tried the 
second case in my message

...

---

From: james anderson <[email-masked]>
Date: Sat Aug 16 00:21:04 2003

is there something special required to defining metaclasses?

an attempt to do it in a standard way fails:

[39]> (defclass funcallable-clause-metaobject-class (standard-class) ())

*** - DEFCLASS FUNCALLABLE-CLAUSE-METAOBJECT-CLASS: superclass 
#<STRUCTURE-CLASS STANDARD-CLASS> should belong to class STANDARD-CLASS
1. Break [40]> :a

i observe that
[45]> (clos::standard-class-p (find-class 'clos::standard-class))
NIL

and

[47]> (defclass funcallable-clause-metaobject-class (standard-class) ()
          (:metaclass STRUCTURE-CLASS))
#<STRUCTURE-CLASS FUNCALLABLE-CLAUSE-METAOBJECT-CLASS>

is this the way things are supposed to be?
(n.b. i'm now in "maximum" ansi mode)
...