axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Re: problem compiling wh-sandbox revision 571 on Windo


From: Waldek Hebisch
Subject: [Axiom-developer] Re: problem compiling wh-sandbox revision 571 on Windows
Date: Mon, 18 Jun 2007 22:07:19 +0200 (CEST)

CC-ing Camm, as the problem depends on very specific GCL behavoiur.

Bill Page wrote:
> Waldek,
> 
> The following change in revsion 571:
> 
> http://axiom.svn.sourceforge.net/viewvc/axiom/branches/wh-sandbox/src/lisp/Makefile.pamphlet?view=diff&r1=570&r2=571
> 
> seems to cause problems building wh-sandbox on Windows:
> 
> ...
> Finished compiling axiom-lisp.lisp.
> #p"axiom-lisp.o"
> 
> >echo '(compiler::link (quote ("axiom-package.lisp" "axiom-lisp.o")) "lisp" ' 
> >\
>               ' (format nil "(progn (let ((*load-path* (cons ~S 
> *load-path*))'\
>                                         ' (si::*load-types* ~S))' \
>                                        ' (compiler::emit-fn t))' \
>                                   ' (when (fboundp (quote si::sgc-on))' \
>                                         ' (si::sgc-on t))' \
>                                   ' (setq compiler::*default-system-p* t))"' \
>                       ' si::*system-directory* (quote (list ".lsp")))' \
>                '
> "C:/msys/1.0/home/Administrator/axiom-sandbox/src/lisp/../.././src/lib/bsdsignal.o
> C:/msys/1.0/home/Administrator/axiom-sandbox/src/lisp/../.././src/lib/cfuns-c.o
> C:/msys/1.0/home/Administrator/axiom-sandbox/src/lisp/../.././src/lib/sockio-c.o
> -lwsock32")' \
>             | /usr/local/bin/gcl
> GCL (GNU Common Lisp)  2.6.8 CLtL1    Apr 16 2007 00:20:36
> Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)
> Binary License:  GPL due to GPL'ed components: (UNEXEC)
> Modifications of this banner must retain notice of a compatible license
> Dedicated to the memory of W. Schelter
> 
> Use (help) to get some basic information on how to use GCL.
> Temporary directory for compiler files set to
> C:/msys/1.0/home/Administrator/axiom-sandbox/build/i686-pc-mingw32/
> 
> >
> Error: Unsupported on Windows platforms
> Fast links are on: do (si::use-fast-links nil) for debugging
> Error signalled by SYSTEM:FIND-INIT-NAME.
> Broken at SYSTEM:FIND-INIT-NAME.  Type :H for Help.
> >>/bin/install -c lisp.exe
> /home/Administrator/axiom-sandbox/build/i686-pc-mingw32/bin
> /bin/install: cannot stat `lisp.exe': No such file or directory
> make[2]: *** [do_it.gcl] Error 1
> make[2]: Leaving directory `/home/Administrator/axiom-sandbox/src/lisp'
> make[1]: *** [all-lisp] Error 2
> make[1]: Leaving directory `/home/Administrator/axiom-sandbox/src'
> make: *** [all-src] Error 2
> 
> ---------
> 
> Apparently GCL is complaining about "axiom-lisp.o". The following
> patch allowed the build to proceed further:
> 
> --- src/lisp/Makefile.pamphlet  (revision 613)
> +++ src/lisp/Makefile.pamphlet  (working copy)
> @@ -81,7 +81,7 @@
>         echo '(load "axiom-package.lisp")' \
>              '(setq compiler::*default-system-p* t)' \
>              '(compile-file "axiom-lisp.lisp")' | $(AXIOM_LISP)
> -       echo '(compiler::link (quote ("axiom-package.lisp"
> "axiom-lisp.$(OBJEXT)")) "lisp" ' \
> +       echo '(compiler::link (quote ("axiom-package.lisp"
> "axiom-lisp.lisp")) "lisp" ' \
>                ' (format nil "(progn (let ((*load-path* (cons ~S 
> *load-path*))'\
>                                          ' (si::*load-types* ~S))' \
>                                         ' (compiler::emit-fn t))' \
> 
> -----------
> 

Using 'axiom-lisp.lisp' is certainly wrong: 'axiom-lisp.lisp' contains
'clines' constuct which to work must be compiled.  I think that the
following procedure should work:

- first produce an auxilary image linking in the compiled C files, but no
  Lisp files (essentially what revisions earlier than 571 did).
- than start this image, load lisp files and use save-system to
  dump proper image.

Question to Camm:  I want to make an executable image which contains
a package and a few functions in this package.  Some functions call
extra C code.  What is the proper way to make such an executable?
In particular, how to do this in a way that works on all systems
supported by GCL?

My impression was that COMPILER:LINK was the way.  Namely, compile.texi
says:

On systems where dlopen is used for relocations, one cannot make custom
images containing loaded binary object files simply by loading the files
and executing save-system.  This function is provided for such cases.

IIUC save-system will not work if I want to load compiled Lisp code
and the platform uses dlopen.  However, messages in source code seem
to say that COMPILER:LINK does not really work on Windows -- namely
that it can not link Lisp code.


Bill, you may try the following. Camm, is this correct?

diff -u wh-sandbox.bb2/src/lisp/Makefile.pamphlet 
wh-sandbox/src/lisp/Makefile.pamphlet
--- wh-sandbox.bb2/src/lisp/Makefile.pamphlet   2007-06-18 21:47:51.000000000 
+0200
+++ wh-sandbox/src/lisp/Makefile.pamphlet       2007-06-18 22:03:50.000000000 
+0200
@@ -81,7 +81,7 @@
        echo '(load "axiom-package.lisp")' \
             '(setq compiler::*default-system-p* t)' \
             '(compile-file "axiom-lisp.lisp")' | $(AXIOM_LISP)
-       echo '(compiler::link (quote ("axiom-package.lisp" 
"axiom-lisp.$(OBJEXT)")) "lisp" ' \
+       echo '(compiler::link nil "prelisp" ' \
               ' (format nil "(progn (let ((*load-path* (cons ~S *load-path*))'\
                                         ' (si::*load-types* ~S))' \
                                        ' (compiler::emit-fn t))' \
@@ -91,6 +91,9 @@
                       ' si::*system-directory* (quote (list ".lsp")))' \
                '  "$(lisp_c_objects) @axiom_c_runtime_extra@")' \
             | $(AXIOM_LISP)
+       echo '(load "axiom-package.lisp") (load "axiom-lisp.$(OBJEXT)")' \
+            '(in-package "AXIOM-LISP") (save-core "lisp$(EXEEXT)")' \
+           | ./prelisp$(EXEEXT)
        $(INSTALL_PROGRAM) lisp$(EXEEXT) $(OUT)
        $(STAMP) $@
 


-- 
                              Waldek Hebisch
address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]