[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Compiling eggs to .c
From: |
Norman Gray |
Subject: |
Re: [Chicken-users] Compiling eggs to .c |
Date: |
Thu, 08 Dec 2016 23:30:29 +0000 |
Greetings, once more.
...coming back to this after a pause (I am, just as before, trying to
compile a Chicken program, and its associated eggs, to C, for later
compilation without an installed Chicken system).
I'm trying, at one point in the compilation, to build the abnf egg,
alongside about 40 others (this is not the only remaining error, but it
might indicate what I'm doing wrong). It fails, giving an error:
Error: during expansion of (import ...) - unbound variable:
|\xcf\xfa\xed\xfe\x07\x00\x00\x01\x03\x00\x00\x00\x08\x00\x00\x00|
(the fuller output is below). This error message doesn't really signal
clearly what it is I'm doing wrong. The fuller output suggests that
something's going wrong importing the 'input-classes' module, but trying
CSC_OPTIONS="-unit abnf -include-path ../input-classes"
chicken-install -n
pointing towards the (apparently successfully built) input-classes egg,
doesn't help. Trying '-include-path ..' doesn't work either, but by
this stage I'm just guessing.
It's clearly _something_ to do with the dependencies on other eggs,
because an egg with no dependencies (eg 'make') builds OK.
chicken-install -h doesn't give any clues (the -scan option looks
promising, but when trying it, it clearly does something different from
what's needed here).
Looking through chicken-install.scm for things like 'include' or 'path',
and grepping the Chicken source's *.scm for 'include-path', doesn't
provide any sudden enlightenment.
Can I just check I've understood things: it is supposed to be possible,
isn't it, to compile a non-trivial Chicken program, which uses eggs, to
a collection of .c files which can be compiled without a Chicken
install? That's certainly what's suggested by the end of
<http://wiki.call-cc.org/man/4/Using%20the%20compiler>. That page says
'For more information, study the CHICKEN source code'; I'm game, but
that's... quite a tall order.
Any pointers would be much appreciated.
Best wishes,
Norman
% chicken-install -r abnf
retrieving ...
connecting to host "chicken.kitten-technologies.co.uk", port 80 ...
requesting "/henrietta.cgi?name=abnf&mode=default" ...
reading response ...
HTTP/1.1 200 OK
Date: Thu, 08 Dec 2016 22:59:25 GMT
Server: Apache/2.2.31 (Unix) DAV/2 PHP/5.5.36 mod_fastcgi/2.4.6
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain
reading chunks .
reading files ...
./abnf-charlist.scm
./abnf-consumers.scm
./abnf.meta
./abnf.scm
./abnf.setup
abnf located at /checkouts/itm/luggage/src/c/luggage/eggs/abnf
% cd abnf
% CSC_OPTIONS="-unit abnf" chicken-install -n
retrieving ...
checking platform for `abnf' ...
checking dependencies for `abnf' ...
install order:
("abnf")
installing abnf: ...
changing current directory to .
'/Data/tools/chicken-4.11.0/bin/csi' -bnq -setup-mode -e
"(require-library setup-api)" -e "(import setup-api)" -e
"(setup-error-handling)" -e "(extension-name-and-version '(\"abnf\"
\"\"))" -e "(keep-intermediates #t)" -e "(setup-install-mode #f)"
'abnf.setup'
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-setup-mode -k -O3 -d0 -S -s abnf.scm -j abnf
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-setup-mode -k -s abnf.import.scm
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-setup-mode -k -O3 -d0 -S -s abnf-charlist.scm -j abnf-charlist
Error: during expansion of (import ...) - unbound variable:
|\xcf\xfa\xed\xfe\x07\x00\x00\x01\x03\x00\x00\x00\x08\x00\x00\x00|
Call history:
<syntax> (##sys#require (quote input-classes))
<syntax> (quote input-classes)
<syntax> (##core#quote input-classes)
<syntax> (import input-classes)
input-classes.import.scm:3: eval
<syntax> (import scheme chicken ports typeclass)
<syntax> (##core#undefined)
input-classes.import.scm:4: ##sys#register-compiled-module
<syntax> (##core#undefined)
<syntax> (##core#begin (##core#begin (##core#begin (##sys#require
(quote abnf))) (import abnf)) (##core#undef...
<syntax> (##core#begin (##core#begin (##sys#require (quote abnf)))
(import abnf))
<syntax> (##core#begin (##sys#require (quote abnf)))
<syntax> (##sys#require (quote abnf))
<syntax> (quote abnf)
<syntax> (##core#quote abnf)
<syntax> (import abnf) <--
Error: shell command terminated with non-zero exit status 17920:
'/Data/tools/chicken-4.11.0/bin/chicken' 'abnf-charlist.scm'
-output-file 'abnf-charlist.c' -dynamic -feature chicken-compile-shared
-unit abnf -feature compiling-extension -setup-mode -optimize-level 3
-debug-level 0 -scrutinize -emit-import-library abnf-charlist
Error: shell command failed with nonzero exit status 256:
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-setup-mode -k -O3 -d0 -S -s abnf-charlist.scm -j abnf-charlist
Error: shell command terminated with nonzero exit code
17920
"'/Data/tools/chicken-4.11.0/bin/csi' -bnq -setup-mode -e
\"(require-library set...
% CSC_OPTIONS="-unit abnf -include-path ../input-classes"
chicken-install -n
#... same result, as far as I can see
% ls ../input-classes
input-classes.c input-classes.meta
input-classes.import.c input-classes.o
input-classes.import.o input-classes.scm
input-classes.import.scm input-classes.setup
input-classes.import.so* input-classes.so*
%
--
Norman Gray : https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Chicken-users] Compiling eggs to .c,
Norman Gray <=