From: zlatozar
Subject: slime, debian(testing, 2.6.8), sbcl(0.9.16)
Date: 
Message-ID: <1159298745.439061.212990@d34g2000cwd.googlegroups.com>
Hi all,

I'm newbie Lisper and try to setup my environment. I have installed
slime and sbcl through apt-get.
Here is my simple .emacs file:

(setq inferior-lisp-program "sbcl")
(require 'slime)
(slime-setup :autodoc t)

The problem is that I can't run slime (M-x slime).
First time:

  The ANSI Standard, Macro DEFPACKAGE
; compiling file "/usr/share/common-lisp/source/slime/nregex.lisp"
(written 05 AUG 2006 09:18:33 PM):

;
/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/nregex.fasl
written
; compilation finished in 0:00:01
;; loading
#P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/nregex.fasl"
; compiling file "/usr/share/common-lisp/source/slime/swank-sbcl.lisp"
(written 06 SEP 2006 06:23:48 AM):
(/usr/lib/sbcl/sb-bsd-sockets/constants.lisp

/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/constants.fasl

/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/constants.fasl

/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c

/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/a.out

/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/constants.lisp-temp)
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:1:19:
error: stdio.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:2:23:
error: sys/types.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:3:24:
error: sys/socket.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:4:22:
error: sys/stat.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:5:20:
error: unistd.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:6:20:
error: sys/un.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:7:24:
error: netinet/in.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:8:30:
error: netinet/in_systm.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:9:24:
error: netinet/ip.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:10:20:
error: net/if.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:11:19:
error: netdb.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:12:19:
error: errno.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:13:25:
error: netinet/tcp.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:14:19:
error: fcntl.h: No such file or directory
/var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:
In function 'main':
....more....

and everytime after:

; loading #P"/usr/share/common-lisp/source/slime/swank-loader.lisp"
;; loading
#P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/swank-backend.fasl"
;; loading
#P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/nregex.fasl"

debugger invoked on a SB-FASL::FASL-HEADER-MISSING in thread #<THREAD
"initial thread" {A7C0499}>:
  File

"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/swank-sbcl.fasl"
  has a fasl file type, but no fasl header:
Expected
  "# FASL", but got #(0 0 0 0 0 0).

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-FASL::INTERNAL-LOAD

#P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/swank-sbcl.fasl"

#P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/swank-sbcl.fasl"
 :ERROR
 T
 NIL
 NIL
 :DEFAULT)
0]

Please advice!

Regards,
Zlatozar

From: Javier
Subject: Re: slime, debian(testing, 2.6.8), sbcl(0.9.16)
Date: 
Message-ID: <1159304393.855928.295280@i42g2000cwa.googlegroups.com>
zlatozar ha escrito:

> error: stdio.h: No such file or directory
> error: sys/types.h: No such file or directory
> error: sys/socket.h: No such file or directory
> error: sys/stat.h: No such file or directory
> error: unistd.h: No such file or directory
> error: sys/un.h: No such file or directory
> error: netinet/in.h: No such file or directory
> error: netinet/in_systm.h: No such file or directory
> error: netinet/ip.h: No such file or directory
> error: net/if.h: No such file or directory
> error: netdb.h: No such file or directory
> error: errno.h: No such file or directory
> error: netinet/tcp.h: No such file or directory
> error: fcntl.h: No such file or directory

I think you need to install GCC and kernel headers. It is very strange
that it is not able to include so simple headers like stdio.h (which
are usually already avaiable without having to touch the -I directive
in the C compiler).
What I don't understand is what GCC has to do with SBCL in this case.
Is SBCL calling GCC for compiling some kind of external libraries?
O hope it helps!
From: Christopher Brown
Subject: Re: slime, debian(testing, 2.6.8), sbcl(0.9.16)
Date: 
Message-ID: <1159338260.346752.186100@h48g2000cwc.googlegroups.com>
Javier wrote:
> zlatozar ha escrito:
>
> > error: stdio.h: No such file or directory
> > error: sys/types.h: No such file or directory
> > error: sys/socket.h: No such file or directory
> > error: sys/stat.h: No such file or directory
> > error: unistd.h: No such file or directory
> > error: sys/un.h: No such file or directory
> > error: netinet/in.h: No such file or directory
> > error: netinet/in_systm.h: No such file or directory
> > error: netinet/ip.h: No such file or directory
> > error: net/if.h: No such file or directory
> > error: netdb.h: No such file or directory
> > error: errno.h: No such file or directory
> > error: netinet/tcp.h: No such file or directory
> > error: fcntl.h: No such file or directory
>
> I think you need to install GCC and kernel headers. It is very strange
> that it is not able to include so simple headers like stdio.h (which
> are usually already avaiable without having to touch the -I directive
> in the C compiler).
> What I don't understand is what GCC has to do with SBCL in this case.
> Is SBCL calling GCC for compiling some kind of external libraries?
> O hope it helps!

For both sb-bsd-sockets and sb-posix (and maybe others?), sbcl needs to
determine the set of constants in the appropriate header files
available to your system (certainly beats guessing).  It does this by
building & running a small c program.  The source is in 'foo.c',
probably in e.g. /usr/local/lib/sbcl/sb-bsd-sockets/foo.c.  Often on
debian systems, there's no C build environment installed by default.
I believe 'apt-get install build-essentials' is the shortest route to
set up.

Peace,
Chris
From: zlatozar
Subject: Re: slime, debian(testing, 2.6.8), sbcl(0.9.16)
Date: 
Message-ID: <1159342452.726465.255440@m7g2000cwm.googlegroups.com>
apt-get install build-essential 

Thank you!
From: Richard S. Hall
Subject: Re: slime, debian(testing, 2.6.8), sbcl(0.9.16)
Date: 
Message-ID: <OnfSg.1667$Y24.70@newsread4.news.pas.earthlink.net>
Sounds like your INCLUDE environment variable isn't set (correctly).  These 
are actually C compiler errors.  I never realized that it compiled anything 
in C as part of the installation process but I guess the BSD sockets 
compatibility package must use a Foreign Function interface to a C module. 
Having already had my environment variables correct for C I never saw 
these...

Set the INCLUDE variable to point to the base location of these header 
files, usually /usr/include i.e.
export INCLUDE=/usr/include
 and then rebuild from scratch

"zlatozar" <········@gmail.com> wrote in message 
·····························@d34g2000cwd.googlegroups.com...
> Hi all,
>
> I'm newbie Lisper and try to setup my environment. I have installed
> slime and sbcl through apt-get.
> Here is my simple .emacs file:
>
> (setq inferior-lisp-program "sbcl")
> (require 'slime)
> (slime-setup :autodoc t)
>
> The problem is that I can't run slime (M-x slime).
> First time:
>
>  The ANSI Standard, Macro DEFPACKAGE
> ; compiling file "/usr/share/common-lisp/source/slime/nregex.lisp"
> (written 05 AUG 2006 09:18:33 PM):
>
> ;
> /var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/nregex.fasl
> written
> ; compilation finished in 0:00:01
> ;; loading
> #P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/nregex.fasl"
> ; compiling file "/usr/share/common-lisp/source/slime/swank-sbcl.lisp"
> (written 06 SEP 2006 06:23:48 AM):
> (/usr/lib/sbcl/sb-bsd-sockets/constants.lisp
>
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/constants.fasl
>
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/constants.fasl
>
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c
>
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/a.out
>
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/constants.lisp-temp)
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:1:19:
> error: stdio.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:2:23:
> error: sys/types.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:3:24:
> error: sys/socket.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:4:22:
> error: sys/stat.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:5:20:
> error: unistd.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:6:20:
> error: sys/un.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:7:24:
> error: netinet/in.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:8:30:
> error: netinet/in_systm.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:9:24:
> error: netinet/ip.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:10:20:
> error: net/if.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:11:19:
> error: netdb.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:12:19:
> error: errno.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:13:25:
> error: netinet/tcp.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:14:19:
> error: fcntl.h: No such file or directory
> /var/cache/common-lisp-controller/1000/sbcl/local/usr/lib/sbcl/sb-bsd-sockets/foo.c:
> In function 'main':
> ....more....
>
> and everytime after:
>
> ; loading #P"/usr/share/common-lisp/source/slime/swank-loader.lisp"
> ;; loading
> #P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/swank-backend.fasl"
> ;; loading
> #P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/nregex.fasl"
>
> debugger invoked on a SB-FASL::FASL-HEADER-MISSING in thread #<THREAD
> "initial thread" {A7C0499}>:
>  File
>
> "/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/swank-sbcl.fasl"
>  has a fasl file type, but no fasl header:
> Expected
>  "# FASL", but got #(0 0 0 0 0 0).
>
> Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
>
> restarts (invokable by number or by possibly-abbreviated name):
>  0: [ABORT] Exit debugger, returning to top level.
>
> (SB-FASL::INTERNAL-LOAD
>
> #P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/swank-sbcl.fasl"
>
> #P"/var/cache/common-lisp-controller/1000/sbcl/swank/fasl/sbcl-0.9.16-linux-x86/swank-sbcl.fasl"
> :ERROR
> T
> NIL
> NIL
> :DEFAULT)
> 0]
>
> Please advice!
>
> Regards,
> Zlatozar
>