From: Pierre THIERRY
Subject: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <pan.2006.07.14.15.43.18.88507@levallois.eu.org>
It's surely a FAQ, but I couldn't find in the SBCL documentation how to
compile Lisp code into an executable. is it possible? If not, do other
CL implementations permit this?

And when you distribute a Lisp application, how do your end-users use
it? Do you just use a wrapper script to start Lisp and then your entry
function?

Curiously,
Nowhere man
-- 
···········@levallois.eu.org
OpenPGP 0xD9D50D8A

From: Juanjo
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1152909453.442960.293180@m73g2000cwd.googlegroups.com>
Pierre THIERRY wrote:
> It's surely a FAQ, but I couldn't find in the SBCL documentation how to
> compile Lisp code into an executable. is it possible? If not, do other
> CL implementations permit this?

ECL definitely supports it. The documentation is rather old, but it is
described in
http://ecls.sourceforge.net/ecldev/devel_2.html#SEC2
and you also find an example in the source tree
http://common-lisp.net/cgi-bin/viewcvs.cgi/ecl/examples/build/readme.lisp?rev=1.1&root=ecl&view=auto

Besides that, you can use ASDF to build both libraries and executables.
http://common-lisp.net/cgi-bin/viewcvs.cgi/ecl/examples/asdf/readme.lisp?rev=1.1&root=ecl&view=auto

> And when you distribute a Lisp application, how do your end-users use
> it? Do you just use a wrapper script to start Lisp and then your entry
> function?

Just an EXE with the DLL available around. More info in the mailing
list

Juanjo
From: Javier
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1152919581.508025.103310@m79g2000cwm.googlegroups.com>
Juanjo wrote:
> Pierre THIERRY wrote:
> > It's surely a FAQ, but I couldn't find in the SBCL documentation how to
> > compile Lisp code into an executable. is it possible? If not, do other
> > CL implementations permit this?
>
> ECL definitely supports it. The documentation is rather old, but it is
> described in
> http://ecls.sourceforge.net/ecldev/devel_2.html#SEC2
> and you also find an example in the source tree
> http://common-lisp.net/cgi-bin/viewcvs.cgi/ecl/examples/build/readme.lisp?rev=1.1&root=ecl&view=auto
>
> Besides that, you can use ASDF to build both libraries and executables.
> http://common-lisp.net/cgi-bin/viewcvs.cgi/ecl/examples/asdf/readme.lisp?rev=1.1&root=ecl&view=auto
>
> > And when you distribute a Lisp application, how do your end-users use
> > it? Do you just use a wrapper script to start Lisp and then your entry
> > function?
>
> Just an EXE with the DLL available around. More info in the mailing
> list

I like very much ECL, but for some reason, it is not able to
autocomplete and show function argument information in real time using
Slime under Emacs in my system (SBCL does very well). Do you know how
to solve this?
From: Frank Buss
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <esy4zyizaz63.1t6emjqmewp9y$.dlg@40tude.net>
Pierre THIERRY wrote:

> It's surely a FAQ, but I couldn't find in the SBCL documentation how to
> compile Lisp code into an executable. is it possible? If not, do other
> CL implementations permit this?

See http://www.sbcl.org/manual/Saving-a-Core-Image.html and
http://clisp.cons.org/impnotes/image.html . Search for "executable" in both
pages. See http://www.frank-buss.de/lisp/clisp.html for getting rid of the
command prompt window for CLISP and Windows.

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Javier
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1152903216.733148.187750@35g2000cwc.googlegroups.com>
Frank Buss wrote:

> See http://www.sbcl.org/manual/Saving-a-Core-Image.html and
> http://clisp.cons.org/impnotes/image.html . Search for "executable" in both
> pages. See http://www.frank-buss.de/lisp/clisp.html for getting rid of the
> command prompt window for CLISP and Windows.

And, how to make a single executable being able to run without the need
for the user to install SBCL?
From: Frank Buss
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1xebpu1g92rdd$.cihzlr1wk35w.dlg@40tude.net>
Javier wrote:

> Frank Buss wrote:
> 
>> See http://www.sbcl.org/manual/Saving-a-Core-Image.html and
>> http://clisp.cons.org/impnotes/image.html . Search for "executable" in both
>> pages. See http://www.frank-buss.de/lisp/clisp.html for getting rid of the
>> command prompt window for CLISP and Windows.
> 
> And, how to make a single executable being able to run without the need
> for the user to install SBCL?

I've tried it for CLISP, only, but when you read the SBCL page I mentioned,
it looks like it is possible, too:

| :executable
| If true, arrange to combine the sbcl runtime and the core image to create a
| standalone executable. If false (the default), the core image will not be
| executable on its own. 

This should create an executable, which the user can start without any
installation.

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Rob Thorpe
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1152910929.585172.100700@s13g2000cwa.googlegroups.com>
Frank Buss wrote:
> Javier wrote:
>
> > Frank Buss wrote:
> >
> >> See http://www.sbcl.org/manual/Saving-a-Core-Image.html and
> >> http://clisp.cons.org/impnotes/image.html . Search for "executable" in both
> >> pages. See http://www.frank-buss.de/lisp/clisp.html for getting rid of the
> >> command prompt window for CLISP and Windows.
> >
> > And, how to make a single executable being able to run without the need
> > for the user to install SBCL?
>
> I've tried it for CLISP, only, but when you read the SBCL page I mentioned,
> it looks like it is possible, too:
>
> | :executable
> | If true, arrange to combine the sbcl runtime and the core image to create a
> | standalone executable. If false (the default), the core image will not be
> | executable on its own.
>
> This should create an executable, which the user can start without any
> installation.

You can also do it with GCL, if the option of using it is open to you.
See the manual for the command si:save-system.
From: Javier
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1152919394.523440.210820@35g2000cwc.googlegroups.com>
Frank Buss wrote:

> > And, how to make a single executable being able to run without the need
> > for the user to install SBCL?
>
> I've tried it for CLISP, only, but when you read the SBCL page I mentioned,
> it looks like it is possible, too:

Not really. The executable doesn't work if you don't have SBCL
installed. It doesn't statically link the libraries of SBCL.

I'd like to find something like Chicken, but for Lisp. It is able to
link statically and make really stand-alone executables.
From: Javier
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1152924789.077560.186150@h48g2000cwc.googlegroups.com>
Javier wrote:

> Not really. The executable doesn't work if you don't have SBCL
> installed. It doesn't statically link the libraries of SBCL.

Sorry, I'm wrong, it does work pretty good, except that the executable
does not allow to load any package and makes a really big image, about
22Mb only with the basic. Elsewhere, using zip to compress it, the
resulting archive is 7Mb, somewhat acceptable considering that you have
a complete CL system being integrated.
From: Pascal Bourguignon
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <87r70nwu5j.fsf@thalassa.informatimago.com>
"Javier" <·······@gmail.com> writes:

> Javier wrote:
>
>> Not really. The executable doesn't work if you don't have SBCL
>> installed. It doesn't statically link the libraries of SBCL.
>
> Sorry, I'm wrong, it does work pretty good, except that the executable
> does not allow to load any package 

This is meaningless, until you implement and show us a function called
LOAD-PACKAGE. 
Do you mean my COM.INFORMATIMAGO.COMMON-LISP.PACKAGE:LOAD-PACKAGE?

In Common Lisp, you can only load files, or define/make package, and
both operations can be done in saved images, whether executable or
not, as long as the program doesn't go to extraordinary lengths to
prevent you to do so.


> and makes a really big image, about
> 22Mb only with the basic. Elsewhere, using zip to compress it, the
> resulting archive is 7Mb, somewhat acceptable considering that you have
> a complete CL system being integrated.

Ah! :-)


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

In a World without Walls and Fences, 
who needs Windows and Gates?
From: Javier
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1152956414.041353.268810@p79g2000cwp.googlegroups.com>
Pascal Bourguignon wrote:
> "Javier" <·······@gmail.com> writes:
>
> > Javier wrote:
> >
> >> Not really. The executable doesn't work if you don't have SBCL
> >> installed. It doesn't statically link the libraries of SBCL.
> >
> > Sorry, I'm wrong, it does work pretty good, except that the executable
> > does not allow to load any package
>
> This is meaningless, until you implement and show us a function called
> LOAD-PACKAGE.
> Do you mean my COM.INFORMATIMAGO.COMMON-LISP.PACKAGE:LOAD-PACKAGE?
>
> In Common Lisp, you can only load files, or define/make package, and
> both operations can be done in saved images, whether executable or
> not, as long as the program doesn't go to extraordinary lengths to
> prevent you to do so.

REQUIRE seems to do not work in executable files generated by SBCL, at
least in my system.
From: Pierre THIERRY
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <pan.2006.07.14.23.49.05.470894@levallois.eu.org>
Le Fri, 14 Jul 2006 18:16:15 +0200, Frank Buss a écrit :
> See http://www.sbcl.org/manual/Saving-a-Core-Image.html and
> http://clisp.cons.org/impnotes/image.html . Search for "executable" in
> both pages.

OK. I've found the SBCL page, but didn't understand what a core file was
exactly. So I didn't read it thoroughly...

BTW, I end up with a 28Mb core file with :executable t and 27Mb when
nil. Why is it so heavy?

Lightly,
Nowhere man
-- 
···········@levallois.eu.org
OpenPGP 0xD9D50D8A
From: Patrick Frankenberger
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <e9akb0$3i6$03$1@news.t-online.com>
Pierre THIERRY wrote:
> BTW, I end up with a 28Mb core file with :executable t and 27Mb when
> nil. Why is it so heavy?

Because SBCL just concatenates everything that might be needed into a 
single file.

That prohibits sharing of common data. Installing SBCL on the target 
computer and distributing .fasl files (or .lisp files) together with a 
startup-script is a better way to deploy lisp-apps, but it's not as 
convenient.

HTH,
Patrick
From: Kaz Kylheku
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1153082778.468244.306120@75g2000cwc.googlegroups.com>
Pierre THIERRY wrote:
> BTW, I end up with a 28Mb core file with :executable t and 27Mb when
> nil. Why is it so heavy?

In Lisp, NIL is so overloaded with many important meanings, that it
takes nearly a full megabyte to implement them all.

:)
From: Rob Thorpe
Subject: Re: Couldn't find how to build an executable out of Lisp code
Date: 
Message-ID: <1153265818.761715.325340@p79g2000cwp.googlegroups.com>
Pierre THIERRY wrote:
> Le Fri, 14 Jul 2006 18:16:15 +0200, Frank Buss a écrit :
> > See http://www.sbcl.org/manual/Saving-a-Core-Image.html and
> > http://clisp.cons.org/impnotes/image.html . Search for "executable" in
> > both pages.
>
> OK. I've found the SBCL page, but didn't understand what a core file was
> exactly. So I didn't read it thoroughly...
>
> BTW, I end up with a 28Mb core file with :executable t and 27Mb when
> nil. Why is it so heavy?

If it is possible for you to use them GCL and ECLs "distributable"
forms are lighter.  You could probably distributed ~5MB for a small
program - less if zipped.