Subject: [clisp-list] clisp on os X?

From: Sunil Mishra <[email-masked]>
Date: Tue, 27 Mar 2001 22:25:02 -0800

Hi,

Just got OS X final release, and got the new version of clisp. The good 
news is that most of the problems I had had with the previous released 
version of clisp with the public beta have been solved. The bad news is 
that I have a whole new set of problems, this time with IPV6 support. 
Has anyone attempted compiling clisp on OS X? I have tried adding 
-UHAVE_IPV6 to cflags in the makefile, to no avail. Any other 
suggestions?

Here's a sampling of the errors I'm getting:

In file included from socket.d:40:
lispbibl.d:6882: warning: volatile register variables don't work as you 
might wish
socket.d: In function `C_machine_instance':
socket.d:196: structure has no member named `in6_u'
socket.d:196: structure has no member named `in6_u'
...

Thanks,

Sunil

---

From: Bruno Haible <[email-masked]>
Date: Wed, 28 Mar 2001 13:32:47 +0200 (CEST)

Sunil Mishra writes:
> I have tried adding 

I'd try to add 

   #undef HAVE_IPV6

in socket.d, right after #include "lispbibl.c", around line 41.

And please tell us what a "struct in6_addr" looks like on MacOS X, so
we can fix the ipv6_ntop macro.

Bruno

---

From: Sunil Mishra <[email-masked]>
Date: Wed, 28 Mar 2001 09:53:02 -0800

OK, that hack got me past that error. Here's the in6_addr definition, in 
netinet6/in6.h:

struct in6_addr {
         union {
                 u_int8_t   __u6_addr8[16];
                 u_int16_t  __u6_addr16[8];
                 u_int32_t  __u6_addr32[4];
         } __u6_addr;                    /* 128-bit IP6 address */
};

There are other errors I ran into as well. The following is a more 
complete log of everything I have done thus far.

First and foremost, configure requires an explicit host declaration 
(configure --host=powerpc ...). It appears there are multiple configure 
scripts scattered through the system, and one of them is failing.

Next, I followed the make instructions that configure printed out, and 
ran into this error:

ln -s ../src/version.h version.h
cc -O -traditional-cpp -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit 
-Wretur\
n-type -fomit-frame-pointer -Wno-sign-compare -O2 -DUNICODE -c spvw.c
In file included from spvw.d:21:
lispbibl.d:1426: #error "Preferred integer sizes depend on CPU -- 
Gr\303\266\30\
3\237en intBWsize, intWLsize, intBWLsize neu einstellen!"
lispbibl.d:1600: #error "Preferred digit size depends on CPU -- 
Gr\303\266\303\\
237e intDsize neu einstellen!"
In file included from spvw.d:21:
lispbibl.d:1995: warning: `TIME_ABSOLUTE' redefined
/usr/include/mach/clock_types.h:119: warning: this is the location of 
the previ\
ous definition
make: *** [spvw.o] Error 1

It looks like the integer sizes for the powerpc are not defined. To get 
around this problem, I added -DRS6000 to CFLAGS in the makefile. Then 
execution continued until I ran into the ipv6 problem my original 
message described. I applied the #undef and continued the make, to run 
into this error:

cc -O -traditional-cpp -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit 
-Wretur\
n-type -fomit-frame-pointer -Wno-sign-compare -O2 -DUNICODE -DRS6000 -c 
time.c
In file included from time.d:4:
lispbibl.d:1995: warning: `TIME_ABSOLUTE' redefined
/usr/include/mach/clock_types.h:119: warning: this is the location of 
the previ\
ous definition
In file included from time.d:4:
lispbibl.d:6882: warning: volatile register variables don't work as you 
might w\
ish
time.d:170: conflicting types for `get_real_time'
lispbibl.d:6608: previous declaration of `get_real_time'
time.d: In function `get_real_time':
time.d:173: warning: implicit declaration of function `get_time'
time.d:173: invalid operands to binary -
time.d:174: warning: control reaches end of non-void function
time.d: At top level:
time.d:204: conflicting types for `get_real_time'
time.d:172: previous declaration of `get_real_time'
time.d:206: redefinition of `get_real_time'
time.d:204: `get_real_time' previously defined here
time.d: In function `init_time':
time.d:783: incompatible types in assignment
make: *** [time.o] Error 1

Again, I have no idea how to fix this.

Thanks for the help.

Sunil

On Wednesday, March 28, 2001, at 03:32 AM, Bruno Haible wrote:

> _______________________________________________
> clisp-list mailing list
> [email-masked]
> http://lists.sourceforge.net/lists/listinfo/clisp-list
>

---

From: Bruno Haible <[email-masked]>
Date: Wed, 28 Mar 2001 21:57:01 +0200 (CEST)

>          } __u6_addr;                    /* 128-bit IP6 address */

Doesn't really help - all these fields are private (start with __),
clisp cannot use them. Aren't there macros for accessing them?

> scripts scattered through the system, and one of them is failing.

Should be fixed in the next release.

> lispbibl.d:6608: previous declaration of `get_real_time'

It seems this /usr/include/mach/clock_types.h header file defines both
TIME_RELATIVE and TIME_ABSOLUTE. This heavily confuses clisp. Can you
add #undef statements for them in lispbibl.d, near "#undef CBLOCK" and
"#undef hz"?

Bruno