source: project/wiki/man/4/Extensions @ 33354

Last change on this file since 33354 was 33354, checked in by sjamaan, 5 years ago

Synch wiki manual with 4.11.0 release manual (some small updates, plus a new Debugging chapter)

File size: 25.7 KB
Line 
1[[tags: manual]]
2[[toc:]]
3
4== Extensions
5
6=== Extension libraries
7
8Extension libraries (''eggs'') are extensions to the core
9functionality provided by the basic CHICKEN system, to be built and
10installed separately.  The mechanism for loading compiled extensions
11is based on dynamically loadable code and as such is only available on
12systems on which loading compiled code at runtime is
13supported. Currently these are most UNIX-compatible platforms that
14provide the {{libdl}} functionality like Linux, Solaris, BSD, Mac OS X
15and Windows using Cygwin.
16
17Note: Extension may also be normal applications or shell scripts, but
18are usually libraries.
19
20Extensions are technically nothing but dynamically loadable compiled
21files with added meta-data that describes dependencies to other
22extensions, version information and things like the author/maintainer
23of the extension. Three tools provide an easy to use interface for
24installing extensions, removing them and querying the current
25status of installed extensions.
26
27
28=== Installing extensions
29
30To install an extension library, run the {{chicken-install}} program
31with the extension name as argument. The extension archive is
32downloaded, its contents extracted and the contained ''setup'' script
33is executed. This setup script is a normal Scheme source file, which
34will be interpreted by {{chicken-install}}. The complete language
35supported by {{csi}} is available, and the library units {{srfi-1
36regex utils posix tcp}} are loaded. Additional libraries can be loaded
37at run-time.
38
39The setup script should perform all necessary steps to build the new
40library (or application). After a successful build, the extension can
41be installed by invoking one of the procedures {{install-extension}},
42{{install-program}} or {{install-script}}.  These procedures will copy
43a number of given files into the local extension repository or in the
44path where the CHICKEN executables are located (in the case of
45executable programs or scripts). Additionally the list of installed
46files, and user-defined metadata is stored in the repository.
47
48If no extension name is given on the command-line, then all {{.setup}}
49scripts in the current directory are processed, in the order given
50on the command line.
51
52==== Installing extensions that use libraries
53
54Sometimes an extension requires a C library to compile. Compilation
55can fail when your system has this library in a nonstandard
56location. Normally the C compiler searches in the default locations
57{{/usr}} and {{/usr/local}}, and in the prefix where CHICKEN itself
58was installed. Sometimes this is not enough, so you'll need to supply
59{{chicken-install}} with some extra hints to the C compiler/linker. Here's
60an example:
61
62  CSC_OPTIONS='-I/usr/pkg/include/mysql -L/usr/pkg/lib/mysql -L -R/usr/pkg/lib/mysql' chicken-install mysql
63
64This installs the mysql egg with the extra compiler options -I and -L
65to set the include path and the library search path. The second -L
66switch passes the -R option directly to the linker, which causes the
67library path to get hardcoded into the resulting extension file (for
68systems that do not use {{ld.so.conf}}).
69
70The environment variables {{CHICKEN_C_INCLUDE_PATH}} and {{CHICKEN_C_LIBRARY_PATH}}
71can also be used to override include- and linker-paths. Each of these variables
72may contain one or more directory names, separated by {{:}} or {{;}} and will
73be passed using {{-I}} and {{-L}} to the C compiler.
74
75=== Creating extensions
76
77An extension can be created by placing its code and some special
78files in a directory named after it. For example, if your
79extension is called {{foo}}, create a directory called {{foo}}
80and put the extension code in it.
81
82Extensions need two special files: an {{<extension name>.setup}}
83file and an {{<extension name>.meta}} file (where {{<extension
84name>}} is the name of your extension).  The former indicates how
85the egg is to be compiled and the latter provides some information
86about the extension (author, license, dependencies etc).  See the
87[[/eggs tutorial|eggs tutorial]] for further information about
88how to create extensions.
89
90
91=== Procedures and macros available in setup scripts
92
93==== install-extension
94
95<procedure>(install-extension ID FILELIST [INFOLIST])</procedure>
96
97Installs the extension library with the name {{ID}}. All files given in the list of strings
98{{FILELIST}} will be copied to the extension repository. It should be noted here that
99the extension id has to be identical to the name of the file implementing the extension. The
100extension may load or include other files, or may load other extensions at runtime specified
101by the {{require-at-runtime}} property.
102
103{{FILELIST}} may be a filename, a list of filenames, or a list of pairs of
104the form {{(SOURCE DEST)}} (if you want to copy into a particular sub-directory - the
105destination directory will be created as needed). If {{DEST}} is a relative pathname,
106it will be copied into the extension repository.
107
108The optional argument {{INFOLIST}} should be an association list that
109maps symbols to values, this list will be stored as {{ID.setup-info}} at the same
110location as the extension code. Currently the following properties are used:
111
112===== syntax
113
114 [extension property] (syntax)
115
116Marks the extension as syntax-only. No code is compiled, the extension is intended
117as a file containing macros to be loaded at compile/macro-expansion time.
118
119===== require-at-runtime
120
121 [extension property] (require-at-runtime ID ...)
122
123Specifies extensions that should be loaded (via {{require}}) at runtime. This is mostly
124useful for syntax extensions that need additional support code at runtime.
125
126===== import-only
127
128  [extension property] (import-only)
129
130Specifies that this extension only provides a expansion-time code in an import library and
131does not require code to be loaded at runtime.
132
133===== version
134
135 [extension property] (version STRING)
136
137Specifies version string.
138
139===== egg-name
140
141 [extension property] (egg-name STRING)
142
143This is reserved for internal use. It is only listed here to tell you that you should
144avoid using this property.
145
146
147==== install-program
148
149<procedure>(install-program ID FILELIST [INFOLIST])</procedure>
150
151Similar to {{install-extension}}, but installs an executable program in the
152executable path (usually {{/usr/local/bin}}).
153
154==== install-script
155
156<procedure>(install-script ID FILELIST [INFOLIST])</procedure>
157
158Similar to {{install-program}}, but additionally changes the file permissions of all
159files in {{FILELIST}} to executable (for installing shell-scripts).
160
161==== standard-extension
162
163<procedure>(standard-extension ID [VERSION] #!key info)</procedure>
164
165A convenience procedure that combines the compilation and installation of
166a simple single-file extension. This is roughly equivalent to:
167
168  (compile -s -O3 -d1 ID.scm -j ID)
169  (compile -s -O3 -d0 ID.import.scm)
170 
171  (install-extension
172   'ID
173   '("ID.so" "ID.import.so")
174   '((version VERSION)
175     ... `INFO' ...
176     ))
177
178{{VERSION}} may be {{#f}} or can be omitted, in that case the version
179obtained from where the extension has been retrieved wil be taken. If
180installed directly from a local directory, the version will default to
181{{"unknown"}}.
182
183
184==== run
185
186<macro>(run FORM ...)</macro>
187
188Runs the shell command {{FORM}}, which is wrapped in an implicit {{quasiquote}}.
189{{(run (csc ...))}} is treated specially and passes {{-v}} (if {{-verbose}} has been given
190to {{chicken-install}}) and {{-feature compiling-extension}} options to the compiler.
191
192
193==== compile
194
195<macro>(compile FORM ...)</macro>
196
197Equivalent to {{(run (csc FORM ...))}}.
198
199
200==== patch
201
202<procedure>(patch WHICH REGEX SUBST)</procedure>
203
204Replaces all occurrences of the regular expression {{REGEX}} with the string {{SUBST}},
205in the file given in {{WHICH}}. If {{WHICH}} is a string, the file will be patched and
206overwritten. If {{WHICH}} is a list of the form {{OLD NEW}}, then a different file named
207{{NEW}} will be generated.
208
209==== copy-file
210
211<procedure>(copy-file FROM TO)</procedure>
212
213Copies the file or directory (recursively) given in the string {{FROM}} to the destination
214file or directory {{TO}}.
215
216==== move-file
217
218<procedure>(move-file FROM TO)</procedure>
219
220Moves the file or directory (recursively) given in the string {{FROM}} to the destination
221file or directory {{TO}}.
222
223==== remove-file*
224
225<procedure>(remove-file* PATH)</procedure>
226
227Removes the file or directory given in the string {{PATH}}, if it exists.
228
229
230==== find-library
231
232<procedure>(find-library NAME PROC)</procedure>
233
234Returns {{#t}} if the library named {{libNAME.[a|so]}} (unix) or {{NAME.lib}} (windows)
235could be found by compiling and linking a test program. {{PROC}} should be the name of a
236C function that must be provided by the library. If no such library was found or the function could not
237be resolved, {{#f}} is returned.
238
239==== find-header
240
241<procedure>(find-header NAME)</procedure>
242
243Returns {{#t}} if a C include-file with the given name is available, or {{#f}} otherwise.
244
245==== try-compile
246
247<procedure>(try-compile CODE #!key cc cflags ldflags compile-only c++)</procedure>
248
249Returns {{#t}} if the C code in {{CODE}} compiles and links successfully, or {{#f}} otherwise.
250The keyword parameters {{cc}} (compiler name, defaults to the C compiler used to build this system),
251{{cflags}} and {{ldflags}} accept additional compilation and
252linking options. If {{compile-only}} is true, then no linking step takes place.
253If the keyword argument {{c++}} is given and true, then the code will be compiled in C++ mode.
254
255
256==== create-directory/parents
257
258<procedure>(create-directory/parents PATH)</procedure>
259
260Creates the directory given in the string {{PATH}}, with all parent directories as needed.
261
262
263==== extension-name-and-version
264
265<parameter>extension-name-and-version</parameter>
266
267Returns a list containing the name and version of the currently installed
268extension as strings. If the setup script is not invoked via {{chicken-install}},
269then name and version will be empty.
270
271
272==== version>=?
273
274<procedure>(version>=? V1 V2)</procedure>
275
276Compares the version numbers {{V1}} and {{V2}} and returns {{#t}} if
277{{V1}} is "less" than {{V2}} or {{#f}} otherwise. A version number can
278be an integer, a floating-point number or a string. {{version>=?}}
279handles dot-separated version-indicators of the form {{"X.Y. .."}}.
280
281If one version number is the prefix of the other, then the shorter version
282is considered "less" than the longer.
283
284
285==== installation-prefix
286
287<procedure>(installation-prefix)</procedure>
288
289An alternative installation prefix that will be prepended to extension
290installation paths if specified. It is set by the {{-prefix}}
291option or environment variable {{CHICKEN_INSTALL_PREFIX}}.
292
293
294==== program-path
295
296<parameter>(program-path [PATH])</parameter>
297
298Holds the path where executables are installed and defaults to either {{$CHICKEN_PREFIX/bin}},
299if the environment variable {{CHICKEN_PREFIX}} is set or the
300path where the CHICKEN binaries ({{chicken}}, {{csi}}, etc.) are installed.
301
302
303==== setup-root-directory
304
305<parameter>(setup-root-directory [PATH])</parameter>
306
307Contains the path of the directory where {{chicken-install}} was invoked.
308
309
310==== setup-install-mode
311
312<parameter>(setup-install-mode [BOOL])</parameter>
313
314Reflects the setting of the {{-no-install}} option, i.e. is {{#f}}, if {{-no-install}} was
315given to {{chicken-install}}.
316
317==== host-extension
318
319<parameter>host-extension</parameter>
320
321For a cross-compiling CHICKEN, when compiling an extension, then it
322should be built for the host environment (as opposed to the target
323environment). This parameter is controlled by the {{-host}} command-line
324option. A setup script should perform the proper steps of compiling any
325code by passing {{-host}} when invoking {{csc}} or using the {{compile}}
326macro.
327
328
329=== Examples for extensions
330
331==== A simple library
332
333The simplest case is a single file that does not export any syntax. For example
334
335<enscript highlight=scheme>
336;;;; hello.scm
337
338(define (hello name)
339  (print "Hello, " name " !") )
340</enscript>
341
342We need a {{.setup}} script to build and install our nifty extension:
343
344<enscript highlight=scheme>
345;;;; hello.setup
346
347;; compile the code into a dynamically loadable shared object
348;; (will generate hello.so)
349(compile -s hello.scm)
350
351;; Install as extension library
352(install-extension 'hello "hello.so")
353</enscript>
354
355Lastly, we need a file {{hello.meta}} defining a minimal set of properties:
356
357<enscript highlight=scheme>
358;;;; hello.meta
359
360((author "Me")
361 (synopsis "A cool hello-world library")
362 (license "GPLv3")
363 (files "hello.scm" "hello.setup"))
364</enscript>
365
366(for more information about available properties, see
367[[/Metafile reference|the metafile reference]])
368
369After entering
370
371 $ chicken-install
372
373at the shell prompt (and in the same directory where the two files
374exist), the file {{hello.scm}} will be compiled into a dynamically
375loadable library. If the compilation succeeds, {{hello.so}} will
376be stored in the repository, together with a file named
377{{hello.setup-info}} containing an a-list with metadata (what
378you stored above in {{hello.meta}}).
379If no extension name is given to {{chicken-install}}, it will simply
380execute the any files with the {{.setup}} extension it can find.
381
382Use it like any other CHICKEN extension:
383
384 $ csi -q
385 #;1> (require-library hello)
386 ; loading /usr/local/lib/chicken/4/hello.so ...
387 #;2> (hello "me")
388 Hello, me!
389 #;3>
390
391==== An application
392
393Here we create a simple application:
394
395<enscript highlight=scheme>
396;;;; hello2.scm
397
398(print "Hello, ")
399(for-each (lambda (x) (printf "~A " x)) (command-line-arguments))
400(print "!")
401</enscript>
402
403We also need a setup script:
404
405<enscript highlight=scheme>
406;;;; hello2.setup
407
408(compile hello2.scm)  ; compile `hello2'
409(install-program 'hello2 "hello2") ; name of the extension and files to be installed
410</enscript>
411
412<enscript highlight=scheme>
413;;;; hello2.meta
414
415((author "Me")
416 (synopsis "A cool hello-world application")
417 (license "proprietary")
418 (files "hello.scm" "hello.setup"))
419</enscript>
420
421To use it, just run {{chicken-install}} in the same directory:
422
423 $ chicken-install
424
425(Here we omit the extension name)
426
427Now the program {{hello2}} will be installed in the same location as
428the other CHICKEN tools (like {{chicken}}, {{csi}}, etc.), which will
429normally be {{/usr/local/bin}}.  Note that you need write-permissions
430for those locations and may have to run {{chicken-install}} with
431administrative rights or use the {{-sudo}} option.
432
433The extension can be used from the command line:
434
435 $ hello2 one two three
436 Hello,
437 one two three !
438
439De-installation is just as easy - use the {{chicken-uninstall}}
440program to remove one or more extensions from the local repository:
441
442 $ chicken-uninstall hello2
443
444==== A module exporting syntax
445
446The hello module was just a shared library, and not a module.
447
448To create an extension that exports syntax see the chapter on
449[[Modules]].  We will show a simple example here: a module {{my-lib}}
450that exports one macro ({{prog1}}) and one procedure ({{my-sum}}):
451
452<enscript highlight=scheme>
453;;; my-lib.scm
454
455(module my-lib
456  *
457  (import scheme chicken)
458
459(define-syntax prog1
460  (syntax-rules ()
461    ((_ e1 e2 ...)
462     (let ((result e1))
463       (begin e2 ...)
464       result))))
465
466(define my-sum
467  (lambda (numbers)
468    (prog1
469      (apply + numbers)
470      (display "my-sum used one more time!")
471      (newline))))
472
473)
474</enscript>
475
476The {{prog1}} macro is similar to Common Lisp's {{prog1}}: it
477evaluates a list of forms, but returns the value of the first form.
478
479The meta file:
480
481<enscript highlight=scheme>
482;;; my-lib.meta
483
484((files "my-lib.setup"
485        "my-lib.scm")
486 (licence "BSD")
487 (author "Me again")
488 (synopsis "My own cool libraries"))
489</enscript>
490
491The setup file is:
492
493<enscript highlight=scheme>
494;;; my-lib.setup
495
496(compile -s -O3 -d1 "my-lib.scm" -j my-lib)
497(compile -s -O3 -d0 "my-lib.import.scm")
498
499(install-extension
500 'my-lib
501 '("my-lib.so" "my-lib.import.so")
502 '((version 1.0)))
503</enscript>
504
505The first line tells the compiler to create a shared ({{-s}}) library
506and to create an import file ({{my-lib.import.scm}}, because of the
507{{-j}} flag).  The second line compiles the import file created by the
508first one.
509
510IMPORTANT: the module name exported by my-lib.scm must be the same
511module name passed to the compiler using the -j option, otherwise the
512imports file will not be generated!
513
514Running {{chicken-install}} on the same directory will install the extension.
515
516Next, it should be possible to load the library:
517
518 $ csi -q
519 #;1> (use my-lib)
520 ; loading /usr/local/lib/chicken/6/my-lib.import.so ...
521 ; loading /usr/local/lib/chicken/6/scheme.import.so ...
522 ; loading /usr/local/lib/chicken/6/chicken.import.so ...
523 ; loading /usr/local/lib/chicken/6/my-lib.so ...
524 #;2> (my-sum '(10 20 30))
525 my-sum used one more time!
526 60
527 #;3> (my-sum '(-1 1 0))
528 my-sum used one more time!
529 0
530 #;4> (prog1 (+ 2 2) (print "---"))
531 ---
532 4
533
534==== Notes on chicken-install
535
536When running {{chicken-install}} with an argument {{NAME}}, for which
537no associated {{.setup}} file exists, then it will try to download the
538extension via HTTP from the CHICKEN code repository at
539[[http://code.call-cc.org/svn/chicken-eggs/]]. Extensions that are
540required to compile and/or use the requested extension are downloaded
541and installed automatically.
542
543To query the list of currently installed extensions, use
544{{chicken-status}}. It can list what extensions are installed and
545what files belong to a particular installed extension.
546
547
548=== chicken-install reference
549
550Available options:
551
552; {{-h   -help}} : show this message and exit
553; {{-version}} : show version and exit
554; {{-force}} : don't ask, install even if versions don't match
555; {{-k   -keep}} : keep temporary files
556; {{-l   -location LOCATION}} : install from given location instead of default
557; {{-t   -transport TRANSPORT}} : use given transport instead of default
558; {{-list}} : list extensions available
559; {{-proxy HOST[:PORT]}} : connect via HTTP proxy
560; {{-s   -sudo}} : use external command to elevate privileges when installing or removing files
561; {{-r   -retrieve}} : only retrieve egg into current directory, don't install
562; {{-n   -no-install}} : do not install, just build (implies {{-keep}})
563; {{-p   -prefix PREFIX}} : change installation prefix to {{PREFIX}}
564; {{-host}} : when cross-compiling, compile extension for host only
565; {{-target}} : when cross-compiling, compile extension for target only
566; {{-test}} : run included test-cases, if available
567; {{-username USER}} : set username for transports that require this
568; {{-password PASS}} : set password for transports that require this
569; {{-i   -init DIRECTORY}} : initialize empty alternative repository
570; {{-u   -update-db}} : update export database
571; {{-repository}} : print path to extension repository
572; {{-deploy}} : install extension in the application directory for a deployed application (see [[Deployment]] for more information)
573; {{-trunk}} : build trunk instead of tagged version (only local)
574; {{-D   -feature FEATURE}} : pass this on to subinvocations of {{csi}} and {{csc}} (when done via {{compile}} or {{(run (csc ...))}})
575; {{-debug}} : print full call-trace when encountering errors in the setup script
576; {{-keep-going}} : continue installation, even if a dependency fails
577; {{-x   -keep-installed}} : ignore those extensions given on the command line, that are already installed
578; {{-reinstall}} : reinstall all currently installed extensions, keeping the current versions, if possible
579; {{-scan DIRECTORY}} : scan local egg source repository for highest available versions
580; {{-override FILENAME}} : override versions for installed eggs with information given in {{FILENAME}}, which can be generated by {{-scan}} or by the {{-list}} option of the {{chicken-status}} program
581; {{-csi FILENAME}} : when invoking {{csi}}, the CHICKEN interpreter for executing installation scripts, use this program instead.
582
583{{chicken-install}} recognizes the {{SUDO}}, {{http_proxy}} and {{proxy_auth}} environment variables, if set.
584
585
586=== chicken-uninstall reference
587
588; {{-h   -help}} : show usage information and exit
589; {{-version}} : show version and exit
590; {{-force}} : don't ask, delete whatever matches
591; {{-s   -sudo}} : use external command to elevate privileges for deleting files
592; {{-p   -prefix PREFIX}} : change installation prefix to {{PREFIX}}
593; {{-deploy}} : uninstall extension from the application directory for a deployed application (see [[Deployment]] for more information)
594; {{-host}} : when cross-compiling, remove extensions for host system only
595; {{-target}} : when cross-compiling, remove extensions for target system only
596; {{-exact}} : match extension-name exactly (do not match as pattern)
597
598=== chicken-status reference
599
600; {{-h   -help}} : show usage information and exit
601; {{-version}} : show version and exit
602; {{-f   -files}} : list installed files
603; {{-host}} : when cross-compiling, show extensions for host system only
604; {{-target}} : when cross-compiling, show extensions for target system only
605; {{-p   -prefix PREFIX}} : change installation prefix to {{PREFIX}}
606; {{-deploy}} : look for extensions in the application directory for a deployed application (see [[Deployment]] for more information)
607; {{-exact}} : match extension-name exactly (do not match as pattern)
608; {{-list}} : list installed egg version in format suitable for {{chicken-install -override}}
609
610
611=== Security
612
613When extensions are downloaded and installed one is executing code
614from potentially compromised systems. This applies also when
615{{chicken-install}} executes system tests for required extensions. As
616the code has been retrieved over the network effectively untrusted
617code is going to be evaluated. When {{chicken-install}} is run as
618''root'' the whole system is at the mercy of the build instructions
619(note that this is also the case every time you install software via
620{{sudo make install}}, so this is not specific to the CHICKEN
621extension mechanism).
622
623Security-conscious users should never run {{chicken-install}} as root.
624A simple remedy is to keep the repository inside a user's home
625directory (see the section "Changing repository location" below).
626Alternatively obtain write/execute access to the default location of the repository
627(usually {{/usr/local/lib/chicken}}) to avoid running as
628root. {{chicken-install}} also provides a {{-sudo}} option to perform
629the last installation steps as root user, but do building and other
630.setup script processing as normal. A third solution is to
631override {{VARDIR}} when building the system
632(for example by passing {{"VARDIR=/foo/bar"}} on the make command line,
633or by modifying {{config.make}}. Eggs will then be installed in
634{{$(VARDIR)/chicken/5}}.
635
636=== Changing repository location
637
638When CHICKEN is installed a repository for eggs is created and initialized
639in a default location (usually something like {{/usr/local/lib/chicken/6/}}).
640It is possible to keep an eggs repository in another location. This can be
641configured at build-time by passing {{VARDIR=<directory>}} to {{make(3)}}
642or by modifying the {{config.make}} configuration file. If you want to
643override this location after chicken is installed, you can create an
644initial repository directory with some default extensions and set the
645{{CHICKEN_REPOSITORY}} environment variable:
646
647Note that your binary version can differ from the examples here, if your
648chicken version is older or newer than the one used in these examples.
649Check your default location for the correct binary-version number.
650
651First, initialize the new repository with
652
653  mkdir -p ~/myeggs/lib/chicken/6               # to create directory structure
654  chicken-install -init ~/myeggs/lib/chicken/6
655
656Then set this environment variable:
657
658  export CHICKEN_REPOSITORY=~/myeggs/lib/chicken/6
659
660{{CHICKEN_REPOSITORY}} is the place where extensions are to be
661loaded from for all chicken-based programs (which includes all
662the tools).
663
664If you want to install eggs somewhere other than the default or
665your environment variable, you can use
666
667  chicken-install -p ~/myeggs <package>
668
669See that the argument to chicken-install is just {{~/myeggs}}, while everywhere else it's
670{{~/myeggs/lib/chicken/5}}.
671
672When you load eggs from the interpreter, you will see messages showing
673where libraries are being loaded from:
674
675 #;1> (use numbers)
676 ; loading /home/jdoe/myeggs/lib/chicken/6/numbers.import.so ...
677 ; loading /home/jdoe/myeggs/lib/chicken/6/scheme.import.so ...
678 ; loading /home/jdoe/myeggs/lib/chicken/6/chicken.import.so ...
679 ; loading /home/jdoe/myeggs/lib/chicken/6/foreign.import.so ...
680 ; loading /home/jdoe/myeggs/lib/chicken/6/regex.import.so ...
681 ; loading /home/jdoe/myeggs/lib/chicken/6/numbers.so ...
682 #;2>
683
684==== Upgrading
685
686After a main upgrade, you need to reinstall all the eggs. First,
687reset the repository environment variable:
688
689  export CHICKEN_REPOSITORY=/usr/lib/chicken/6
690
691Then, make a new directory that reflects the systematic one:
692
693  mkdir ~/myeggs/lib/chicken/6
694
695After that, do the same steps above for the new directory (initialize, set repository environment variable)
696and reinstall all the eggs.
697
698=== Other modes of installation
699
700It is possible to install extensions directly from a
701[[http://subversion.apache.org/|Subversion]] repository or from a local
702checkout of the repository tree by using the {{-transport}} and
703{{-location}} options when invoking {{chicken-install}}. Three possible
704transport mechanisms are currently supported:
705
706; {{http}} : download extension sources via HTTP from a web-server (this is the default)
707; {{svn}} : perform an {{svn export}} from the central extension repository; this will require a {{svn(1)}} client to be installed on the machine
708; {{local}} : use sources from the local filesystem and build directly in the source directory
709
710The {{-location}} option specifies where to look for the source
711repository and names a web URL, a subversion repository URL or a
712filesystem path, respectively. A list of locations to try when
713retrieving extensions is stored in the file {{setup.defaults}}
714(usually installed in {{/usr/local/share/chicken}}). For {{http}}
715transports, {{chicken-install}} will detect networking timeouts and
716try alternative locations, as listed in the file.
717
718Dependency information, which is necessary to ensure required
719extensions are also installed, is processed automatically.
720
721
722---
723Previous: [[Interface to external functions and variables]]
724
725Next: [[Deployment]]
Note: See TracBrowser for help on using the repository browser.