[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] chicken-install -deploy and unbound variables
From: |
Norman Gray |
Subject: |
[Chicken-users] chicken-install -deploy and unbound variables |
Date: |
Fri, 03 Feb 2017 22:07:42 +0000 |
Greetings.
Using chicken-install -deploy, to build a simple program with modules,
fails for me in a rather perplexing way. Transcript below (Makefile
output).
The notes at <http://wiki.call-cc.org/man/4/Deployment> only really show
how to deploy a program with no modules (but including extensions).
I'm broadly following the build procedure that worked in a trivial case
in <https://bugs.call-cc.org/ticket/1287> (thanks to zbigniew for help,
there), but there's some further step that's required in order to let it
work in the presence of modules.
I've tried adding this program's modules as extensions, with and without
(needs) clauses in the .meta files (do I really need to package modules
as full eggs in order to deploy them locally?). There's text in the
Deployment page above which indicates that I have to install extensions
before I can deploy them (and I'm now guessing that that applies to
program-local modules, regarded as extensions, as well), but when I
consult <http://wiki.call-cc.org/man/4/Extensions> on creating a local
per-project repository to install them in, I try
% pwd
/checkouts/itm/luggage/src
% /Data/tools/chicken-4.11.0/bin/chicken-install -deploy -prefix
$PWD/deploy
Error: (require) cannot load extension: setup-download
% echo $CHICKEN_REPOSITORY
/checkouts/itm/luggage/src/local-repo/lib/chicken/6
% ls local-repo/lib/chicken/6
% chicken-install -init $CHICKEN_REPOSITORY
Error: (require) cannot load extension: setup-download
% chicken-install -p local-repo
Error: (require) cannot load extension: setup-download
The only similar unbound variable error I can find is mentioned in
<https://bugs.call-cc.org/ticket/570>, but that's six years old.
I am now completely stuck: I appear to have read all of the
documentation, read chunks of the csc source code, googled my way
through bugs.call-cc.org, but still can't get a simple program to
deploy, much less compile to *.c. Am I doing something incredibly
stupid here?
I'm aware that there is a new CHICKEN build framework in preparation for
CHICKEN 5 -- is that in a state where I could try playing with it?
Best wishes,
Norman
----
Further details below:
The same code builds happily in a 'non-deploy' mode, with:
/Data/tools/chicken-4.11.0/bin/csc -shared -o util.so
-emit-all-import-libraries util.scm
/Data/tools/chicken-4.11.0/bin/csc -shared util.import.scm
/Data/tools/chicken-4.11.0/bin/csc -shared -o static-content.so
-emit-all-import-libraries static-content.scm
/Data/tools/chicken-4.11.0/bin/csc -shared static-content.import.scm
/Data/tools/chicken-4.11.0/bin/csc -shared -o datetime.so
-emit-all-import-libraries datetime.scm
/Data/tools/chicken-4.11.0/bin/csc -shared datetime.import.scm
/Data/tools/chicken-4.11.0/bin/csc -shared -o db.so
-emit-all-import-libraries db.scm
Warning: imported identifier doesn't exist in module chicken:
dynamic-wind
/Data/tools/chicken-4.11.0/bin/csc -shared db.import.scm
/Data/tools/chicken-4.11.0/bin/csc -shared -o server.so
-emit-all-import-libraries server.scm
Warning: imported identifier doesn't exist in module chicken:
dynamic-wind
/Data/tools/chicken-4.11.0/bin/csc -shared server.import.scm
/Data/tools/chicken-4.11.0/bin/csc -o luggage main.scm -extend util
-extend static-content -extend datetime -extend db -extend server
% make check
....
% ...all OK
That is, the code does appear to have all its dependencies declared and
passes all its unit tests.
I've despairingly given up trying to compile to separately-buildable *.c
files; I would quite like to get this deployment technique working, but
am on the point of giving up with this, too.
The modules util, static-content, datetime, db and server are all
modules sitting beside a main program in luggage.scm. As you can see,
util and static-content are apparently built and deployed into
$PWD/deploy/, but the build of server complains about an unbound
variable named
|\xcf\xfa\xed\xfe\x07\x00\x00\x01\x03\x00\x00\x00\x08\x00\x00\x00|
echo '(standard-extension "util")' >util.setup
echo '((license "BSD") (synopsis "A module") (files "util.scm"
"util.setup"))' >util.meta
echo '(standard-extension "static-content")' >static-content.setup
echo '((license "BSD") (synopsis "A module") (files "static-content.scm"
"static-content.setup"))' >static-content.meta
echo '(standard-extension "datetime")' >datetime.setup
echo '((license "BSD") (synopsis "A module") (files "datetime.scm"
"datetime.setup"))' >datetime.meta
echo '(standard-extension "db")' >db.setup
echo '((license "BSD") (synopsis "A module") (files "db.scm"
"db.setup"))' >db.meta
echo '(standard-extension "server")' >server.setup
echo '((license "BSD") (synopsis "A module") (files "server.scm"
"server.setup"))' >server.meta
/Data/tools/chicken-4.11.0/bin/chicken-install -deploy -prefix
$PWD/deploy
retrieving ...
checking platform for `datetime' ...
checking dependencies for `datetime' ...
checking platform for `db' ...
checking dependencies for `db' ...
checking platform for `server' ...
checking dependencies for `server' ...
checking platform for `static-content' ...
checking dependencies for `static-content' ...
checking platform for `util' ...
checking dependencies for `util' ...
install order:
("util" "static-content" "server" "db" "datetime")
installing util: ...
changing current directory to .
'/Data/tools/chicken-4.11.0/bin/csi' -bnq -e "(require-library
setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e
"(extension-name-and-version '(\"util\" \"\"))" -e "(destination-prefix
\"/checkouts/itm/luggage/src/deploy\")" -e "(runtime-prefix
\"/checkouts/itm/luggage/src/deploy\")" -e "(deployment-mode #t)"
'util.setup'
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-deployed -dynamic -optimize-level 3 -debug-level 1 util.scm
-emit-import-library util
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-deployed -dynamic -optimize-level 3 -debug-level 0 util.import.scm
cp -r 'util.so' '/checkouts/itm/luggage/src/deploy/util.so'
chmod a+r '/checkouts/itm/luggage/src/deploy/util.so'
cp -r 'util.import.so'
'/checkouts/itm/luggage/src/deploy/util.import.so'
chmod a+r '/checkouts/itm/luggage/src/deploy/util.import.so'
chmod a+r '/checkouts/itm/luggage/src/deploy/util.setup-info'
installing static-content: ...
changing current directory to .
'/Data/tools/chicken-4.11.0/bin/csi' -bnq -e "(require-library
setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e
"(extension-name-and-version '(\"static-content\" \"\"))" -e
"(destination-prefix \"/checkouts/itm/luggage/src/deploy\")" -e
"(runtime-prefix \"/checkouts/itm/luggage/src/deploy\")" -e
"(deployment-mode #t)" 'static-content.setup'
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-deployed -dynamic -optimize-level 3 -debug-level 1 static-content.scm
-emit-import-library static-content
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-deployed -dynamic -optimize-level 3 -debug-level 0
static-content.import.scm
cp -r 'static-content.so'
'/checkouts/itm/luggage/src/deploy/static-content.so'
chmod a+r '/checkouts/itm/luggage/src/deploy/static-content.so'
cp -r 'static-content.import.so'
'/checkouts/itm/luggage/src/deploy/static-content.import.so'
chmod a+r
'/checkouts/itm/luggage/src/deploy/static-content.import.so'
chmod a+r
'/checkouts/itm/luggage/src/deploy/static-content.setup-info'
installing server: ...
changing current directory to .
'/Data/tools/chicken-4.11.0/bin/csi' -bnq -e "(require-library
setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e
"(extension-name-and-version '(\"server\" \"\"))" -e
"(destination-prefix \"/checkouts/itm/luggage/src/deploy\")" -e
"(runtime-prefix \"/checkouts/itm/luggage/src/deploy\")" -e
"(deployment-mode #t)" 'server.setup'
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-deployed -dynamic -optimize-level 3 -debug-level 1 server.scm
-emit-import-library server
Warning: imported identifier doesn't exist in module chicken:
dynamic-wind
Error: during expansion of (import ...) - 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 db))
<syntax> (quote db)
<syntax> (##core#quote db)
<syntax> (import db)
db.import.scm:3: eval
<syntax> (import scheme chicken posix extras (prefix sqlite3 sql:)
util)
<syntax> (import scheme chicken foreign srfi-1 srfi-13 srfi-18
srfi-69 data-structures extras lolevel type-er...
<syntax> (import scheme chicken foreign (only data-structures
->string conc))
<syntax> (##core#undefined)
<syntax> (import chicken scheme type-errors)
<syntax> (##core#undefined)
<syntax> (import scheme (only chicken define-for-syntax optional void
unless warning gensym dynamic-wind) (on...
<syntax> (##core#undefined)
<syntax> (import scheme (only chicken when unless handle-exceptions
let-optionals make-parameter add1 sub1))
<syntax> (##core#undefined)
<syntax> (##core#undefined) <--
Error: shell command terminated with non-zero exit status 17920:
'/Data/tools/chicken-4.11.0/bin/chicken' 'server.scm' -output-file
'server.c' -dynamic -feature chicken-compile-shared -feature
compiling-extension -optimize-level 3 -debug-level 1
-emit-import-library server
Error: shell command failed with nonzero exit status 256:
'/Data/tools/chicken-4.11.0/bin/csc' -feature compiling-extension
-deployed -dynamic -optimize-level 3 -debug-level 1 server.scm
-emit-import-library server
Error: shell command terminated with nonzero exit code
17920
"'/Data/tools/chicken-4.11.0/bin/csi' -bnq -e \"(require-library
setup-api)\" -e...
make: *** [deploy/luggage] Error 1
rm util.setup static-content.setup server.setup datetime.setup db.setup
--
Norman Gray : https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK
- [Chicken-users] chicken-install -deploy and unbound variables,
Norman Gray <=