[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #1287: csc -deploy fails with modules
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #1287: csc -deploy fails with modules |
Date: |
Fri, 27 May 2016 16:34:05 -0000 |
#1287: csc -deploy fails with modules
----------------------+---------------------
Reporter: nxg | Owner:
Type: defect | Status: new
Priority: minor | Milestone: someday
Component: unknown | Version: 4.10.x
Resolution: | Keywords:
----------------------+---------------------
Comment (by nxg):
For completeness, I should note that this doesn't work if I simply drop
`hello.so` and `hello.import.scm` into the `main/` directory; so that
doesn't count as 'deployment' of the library (not entirely surprisingly).
----
But you mentioned making this into an extension...
{{{
quaxo:/tmp/chicken> cat hello.scm
(module hello (hello)
(import scheme)
(define (hello)
(display "Hello, world")
(newline)))
quaxo:/tmp/chicken> cat hello.meta
((author "Me")
(synopsis "A cool hello-world library")
(license "BSD")
(files "hello.scm" "hello.setup"))
quaxo:/tmp/chicken> cat hello.setup
(standard-extension "hello")
quaxo:/tmp/chicken> cat main.scm
(use hello)
(hello)
quaxo:/tmp/chicken> chicken-install -deploy -prefix $PWD/main
retrieving ...
checking platform for `hello' ...
checking dependencies for `hello' ...
install order:
("hello")
installing hello: ...
changing current directory to .
'/Data/tools/chicken-4.11.0rc2-clang/bin/csi' -bnq -e "(require-library
setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e
"(extension-name-and-version '(\"hello\" \"\"))" -e "(destination-prefix
\"/tmp/chicken/main\")" -e "(runtime-prefix \"/tmp/chicken/main\")" -e
"(deployment-mode #t)" 'hello.setup'
'/Data/tools/chicken-4.11.0rc2-clang/bin/csc' -feature compiling-
extension -deployed -dynamic -optimize-level 3 -debug-level 1 hello.scm
-emit-import-library hello
'/Data/tools/chicken-4.11.0rc2-clang/bin/csc' -feature compiling-
extension -deployed -dynamic -optimize-level 3 -debug-level 0
hello.import.scm
mkdir -p '/tmp/chicken/main'
chmod a+x '/tmp/chicken/main'
cp -r 'hello.so' '/tmp/chicken/main/hello.so'
chmod a+r '/tmp/chicken/main/hello.so'
cp -r 'hello.import.so' '/tmp/chicken/main/hello.import.so'
chmod a+r '/tmp/chicken/main/hello.import.so'
chmod a+r '/tmp/chicken/main/hello.setup-info'
quaxo:/tmp/chicken> rm hello.import.so
quaxo:/tmp/chicken> csc -deploy main.scm
quaxo:/tmp/chicken> main/main
Hello, world
quaxo:/tmp/chicken>
}}}
I'm slightly surprised that I need to remove `hello.import.so` (`csc
-deploy main.scm` fails otherwise), but this appears to work.
Perhaps, therefore, this should be recategorised as a documentation
bugreport. At the end of http://wiki.call-cc.org/man/4/Deployment it
might^W would be useful to note that if one wishes to deploy a program
which uses modules, then it is necessary to wrap them up as (local)
extensions, as described in http://wiki.call-cc.org/man/4/Extensions#a
-simple-library
Also, if there were a way to detect this situation, and have a less
panicky error message, that would be most civil.
Hooray!
--
Ticket URL: <http://bugs.call-cc.org/ticket/1287#comment:10>
CHICKEN Scheme <http://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/23
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/24
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/26
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/26
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/26
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/27
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/27
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/27
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/27
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules, Chicken Trac, 2016/05/27
- Re: [Chicken-janitors] #1287: csc -deploy fails with modules,
Chicken Trac <=