From: Valentino Kyriakides
Subject: Re: gcl for linux
Date: 
Message-ID: <34C5E49A.35BA@lavielle.com>
Sam Steingold wrote:
> 
> I tried to compile GCL for Linux, and to my surprise, failed (the
> compilation errors appended). I have the kernel sources installed (and I
> have compiled my own kernel as well as numerous other software, so I
> am at a loss as to what could be wrong). I e-mailed Bill Schelter
> (···@math.utexas.edu) but he never replied, so, I guess, this newsgroup
> is my last resort...
> 
> Where can I get GCL binaries? (I have redhat5, so I cannot install the
> debian gcl package). I tried sunsite patches for gcl, but they didn't
> help.
> ...
> gcc -pipe -fwritable-strings  -DVOL=volatile -I/usr/src/gcl-2.2.2/o -fsigned-char -c -O  -I../gcl-tk -I../h/ -O4   gbc.c
> In file included from /usr/include/ctype.h:39,
>                  from ../h/include.h:45,
>                  from gbc.c:31:
> /usr/include/endian.h:37: warning: `LITTLE_ENDIAN' redefined
> ../h/config.h:176: warning: this is the location of the previous definition
> In file included from /usr/include/signal.h:45,
>                  from sgbc.c:24,
>                  from gbc.c:1321:
> ...
> ...
> In file included from sgbc.c:24,
>                  from gbc.c:1321:
> /usr/include/signal.h:48: warning: redefinition of `__sighandler_t'
> /usr/include/asm/signal.h:80: warning: `__sighandler_t' previously declared here
> /usr/include/signal.h:164: conflicting types for `sigset_t'
> /usr/include/asm/signal.h:4: previous declaration of `sigset_t'
> In file included from /usr/include/signal.h:201,
>                  from sgbc.c:24,
>                  from gbc.c:1321:
> /usr/include/sigaction.h:22: redefinition of `struct sigaction'
> In file included from sgbc.c:24,
>                  from gbc.c:1321:
> /usr/include/signal.h:270: warning: `struct sigcontext' declared inside parameter list
> /usr/include/signal.h:270: warning: its scope is only this definition or declaration,
> /usr/include/signal.h:270: warning: which is probably not what you want.
> /usr/include/signal.h:271: warning: `struct sigcontext' declared inside parameter list
> ...
> ...


I can't tell you were to get Linux gcl binaries from, but I think I can tell you what 
might have get wrong with your gcl compilation.

As you can see from your gcc compiler output, there is lot of redefined stuff, which means
that all of those have been defined twice and at some compilation stage wrong, which finally 
lead up to fail the compilation of the file "gbc.c".

At a first quick look, the problem seems to be that two signal header files are included,
"/usr/include/signal.h and /usr/include/asm/signal.h" which overwrite each others definitions
and one of these isn't the correct one to use.

You should take a deeper look at both "signal.h" header files and make sure to include only
one of these (hopefully the right one, which seems to be /usr/include/asm/signal.h, but since
I don't have/use Linux, I can't tell you for shure if my assumtion is right).

/usr/include/signal.h:48: warning: redefinition of `__sighandler_t'
/usr/include/asm/signal.h:80: warning: `__sighandler_t' previously declared here
/usr/include/signal.h:164: conflicting types for `sigset_t'       <-------* HERE!
/usr/include/asm/signal.h:4: previous declaration of `sigset_t'   <-------* HERE!
...
...
/usr/include/signal.h:270: warning: `struct sigcontext' declared inside parameter list
/usr/include/signal.h:270: warning: its scope is only this definition or declaration,
/usr/include/signal.h:270: warning: which is probably not what you want.
/usr/include/signal.h:271: warning: `struct sigcontext' declared inside parameter list
...
  ^
  |
  -------  This doesn't look well !!!
...
...
sgbc.c: In function `sgc_quit':
In file included from gbc.c:1321:
sgbc.c:1072: warning: assignment makes pointer from integer without a cast
sgbc.c:1074: warning: assignment makes integer from pointer without a cast
sgbc.c: In function `memprotect_handler':
sgbc.c:1124: dereferencing pointer to incomplete type  <-----* HERE is another point to look for!



Maybe this isn't a help to you, if you are not familiar with C programming. In this case
some kind Linux user might tell you were to get gcl binaries.


- VKyr

-- 
Valentino Kyriakides

Lavielle EDV Systemberatung GmbH & Co.  Tel.: +49(0)40 / 65 80 8 - 997
Lotharstrasse 2b, D-22041 Hamburg, Germany  Fax.:  +49(0)40 / 65 808-202
http://www.lavielle.com/                    mailto: ····@lavielle.com