Subject: [clisp-list] clisp broken on all 64bit and one 32bit architecture

From: "Dr. Werner Fink" <[email-masked]>
Date: Mon Feb 16 07:26:07 2004

Hi,

    trying to buld clisp-2.32 on i386, ia64, ppc, ppc64, s390, s390x,
and x86_64, I found the following architecures broken:

         ia64                   `nilvector_type' undeclared
         ppc64                  `avcall-powerpc64.lo' target is missed
         s390                    compiler problem
         s390x                  `avcall-s390x.lo' target is missed
         x86_64                  no oint_type_len defined, after using
                                 that from ia64 I run onto `nilvector_type'
                                 undeclared

Is there a wy to get clisp working not only on i386 and ppc?
Used gcc is 3.3.2, Linux kernel 2.6.2.

       Werner

---

From: Will Newton <[email-masked]>
Date: Mon Feb 16 07:48:08 2004

>                                  that from ia64 I run onto `nilvector_type'

These have been broken since clisp 2.32. I have looked into the problem but 
made no progress. Alpha is also broken due to this issue.

>          s390                    compiler problem

This builds OK for Debian.

> Used gcc is 3.3.2, Linux kernel 2.6.2.

The Debian builds are here:

http://buildd.debian.org/build.php?arch=&pkg=clisp

Currently built on:
i386, powerpc, sparc, hppa, mips, mipsel, s390
Currently failing on:
alpha, ia64, arm, m68k

Some of those are built without FFI. arm should be quite easily fixable.

---

From: "Dr. Werner Fink" <[email-masked]>
Date: Mon Feb 16 08:32:01 2004

> made no progress. Alpha is also broken due to this issue.

It seems that for 64bit aka TYPECODES=1 the declaration for

  Array_type_nilvector
  Array_type_snilvector

and the types for that have been forgotten in src/lispbibl.d at line
4611 ff during implementation of allocate_nilvector().
For x86_64 the declaration for the full oint stuff is also missed in
src/lispbibl.d at line 2487 ff.

Is there something usefull around to implement nilvector_type and
snilvector_type for TYPECODES=1?  And clearly a developer familiar with
x86_64 internals may give us a hint to extend the missed oint stuff
for AMD64 (are the values for IA64 valid for AMD64)?

         Werner

---

From: Will Newton <[email-masked]>
Date: Mon Feb 16 09:53:05 2004

> src/lispbibl.d at line 2487 ff.

As I understand it, there is no space in typecodes to store the type 
information for nilvector, which is an optimization of a special case of 
vector. It should theoretically be possible, as I understand it, to remove 
the nilvector code entirely when building with typecodes and use the standard 
vector code, as was used in 2.31.

Is this correct Sam?

I experimented with this (using -DTYPECODES on i386) but the interpreter was 
aborting - it seemed it was finding a typecode it didn't recognize - but I 
don't know why this was, and have not investigated further.

---

From: "Dr. Werner Fink" <[email-masked]>
Date: Mon Feb 16 10:28:01 2004

> vector code, as was used in 2.31.

Hmmm ... -DNO_TYPECODES=1 for x86_64 aka AMD64 results in:

./lisp.run -B . -N locale -Efile UTF-8 -Eterminal UTF-8 -norc -m 750KW -x "(and (load \"init.lisp\") (sys::%saveinitmem) (ext::exit))"
Cannot map memory to address 0x99fcd000 . errno = ENOMEM: Not enough memory.
Trying to make room through a GC...
[...endless loop...]

btw: Why `KW' is used instead of `KB' ... besides this, the `0x%x' isn't
sufficient, I suppose the `%p' for getting the full address on 64bit. If
I replace `0x%x' with  `%p'  I get

Cannot map memory to address 0x1999999999fcd000 . errno = ENOMEM: Not enough memory.
Trying to make room through a GC...

On the other side, a simple grep for nilvector throughout the source
shows a lot of calls/references about.

> don't know why this was, and have not investigated further.

In other words: clisp is currently not portable to 64bit architecures?

         Werner

---

From: Will Newton <[email-masked]>
Date: Tue Feb 17 11:14:04 2004

> Hmmm ... -DNO_TYPECODES=1 for x86_64 aka AMD64 results in:

x86_64 is a WIDE_HARD acrhitecture. The comment around lispbibl.d:2424 seems 
to suggest that building without typecodes on such an arch is not feasible. I 
am not sure why this is.

> In other words: clisp is currently not portable to 64bit architecures?

64bit architectures with 64bit userland seem to be broken yes (e.g. it is 
possible to build on 32bit userland sparc and ppc).

This has been broken only in the last release so should be relatively simple 
for someone with the right knowledge to fix I believe.