[Chicken-users] Like 'include', but different?
OK, I think I've figured it out. In the calling code (calc.scm), I have to do something like: (cond-expand (compiling (declare (uses calc-yy))) (else (load "calc-yy.scm"))) In compiling, I have to do: csc -unit calc-yy -c calc-yy.scm csc calc.scm calc-yy.o That seem to work. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Like 'include', but different?
I have code where I 'include' other files. Suppose I compile that file. As part of execution, it will try to load those other files, which isn't what I want. Is there a way of telling chicken that during the interpretation or compilation, the file should be loaded, but during execution, don't load the files? ... a bit like loading a module, but without using modules. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Confused by modules
On 15/08/18 16:25, Christian Kellermann wrote: Does this help? Thanks, it helps. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Confused by modules
Chicken scheme has modules, extensions, units, eggs, etc., and I'm confused as to how it all works. I have written a module mcutils.scm, containing: (module mcutils (export define-syntax-rule displayln file->lines hello-utils until) (import chicken extras scheme) ... ;;; a proc calling read-line ... ) The calling program, vas-parser.scm, contains the lines: (include "mcutils.scm") (use mcutils) When I execute csi vas-parser.scm it all works fine. I can compile successfully using csc vas-parser.scm but when I try to run vas-parser, it says that there is an unbound variable read-line; which is in unit extras, I believe. I think that's because the interpreter loads the extras unit automatically, but the compiler doesn't?? But my module says to import extras, so why doesn't it work? I must admit, I'm a bit baffled about what distinguishes include/import/use/require-extension and when to use what under which circumstances. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] csi works, but not csc
On 10/08/18 23:08, David Ireland wrote: Can you show us the code you wrote? I'm thinking the problem has something to do with low-level-macros. I was really just looking for 'define-syntax-rule'. I managed to write my own version: (define-syntax define-syntax-rule (syntax-rules () [(define-syntax-rule (id arg ...) body) (define-syntax id (syntax-rules () [(id arg ...) body]))])) which, to my surprise, actually works. Bear in mind that I'm a n00b to Scheme. So, by jettisoning the module low-level-macros and writing my own define-syntax-rule, my program manages to compile and run as expected. So, problem solved. Hmmm. It's a pity chicken wan't a tad more helpful with its error messages. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] csi works, but not csc
I'm new to Scheme. I wrote a little program: cacc.scm. When I type csi cacc.scm the program runs successfully. However, when I try to compile it: csc cacc.scm it prints out the following errors: Error: during expansion of (dbind322 ...) - unbound variable: macro-helpers#list-destruc Call history: library.scm:3448: print-exit54375438 library.scm:2290: body3981 library.scm:2292: assign library.scm:3448: current-print-length54395440 library.scm:2290: body3981 library.scm:2292: assign library.scm:3926: ##sys#print library.scm:3188: case-sensitive library.scm:3189: keyword-style library.scm:3190: ##sys#print-length-limit library.scm:3297: outchr library.scm:3188: g5148 library.scm:3927: print-call-chain library.scm:3882: ##sys#get-call-chain library.scm:3834: ##sys#make-vector library.scm:1371: ##sys#allocate-vector <-- Error: shell command terminated with non-zero exit status 17920: '/usr/bin/chicken' 'cacc.scm' -output-file 'cacc.c' What's the problem? ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Problems with rationals
> If I want to reproduce this, do I need to type in anything else? > It doesn't happen here. After some experimenting, the statistics eggs seems to introduce some peculiarity. Here's a session: -- #;1> (* 1.0 5/2) Warning: cannot represent exact fraction - coerced to flonum: "5/2" 2.5 #;2> (use statistics) #;3> (* 1.0 5/2) Error: (*) bad argument type: 5/2 Call history: (* 1.0 5/2) (* 1.0 5/2) <-- #;3> (use numbers) #;4> (* 1.0 5/2) 2.5 ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Problems with rationals
Is this a bug in chicken? (rational? 6/10) => #f Also (* 1.0 5/2) produces Error: (*) bad argument type: 5/2 Call history: (* 1.0 5/2) (* 1.0 5/2) CHICKEN (c)2008-2011 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.7.0.5-st linux-unix-gnu-x86 [ manyargs dload ptables ] compiled 2012-03-07 on miro (Linux) ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Internal compiler error on use bindings
Here's one for your mystery file: foo.scm: (use bindings) (bind (a b c) '(1 2 3) (print a)) (write-line "Finished") $ csj -bq foo.scm 1 Finished BUT: $ csc foo.scm Error: [internal compiler error] type of literal not supported: # Call history: (##core#begin (write-line "Finished")) (write-line "Finished") <-- Error: shell command terminated with non-zero exit status 17920: /home/mcarter/.local/bin/chicken foo.scm -output-file foo.c FYI: $ csi CHICKEN (c)2008-2011 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.7.0.5-st linux-unix-gnu-x86 [ manyargs dload ptables ] compiled 2012-03-07 on miro (Linux) ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Using a file in the current dir
Christian Kellermann > http://api.call-cc.org/doc/chicken/special-forms/cond-expand > > Check for the 'csi feature to see whether you are running in the > interpreter. > > Does this help then? Very much so! Thanks for your help. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Using a file in the current dir
Is there a way I can "use" a file in the current directory? Here's what I'm trying to achieve: I want to be able to use some functionality interactively in the interpreter, but also create an executable. In the executable, I will probably do some command-line argument parsing, and automatically call a "main" function. When invoked as a script, I just want to load in the definitions. There doesn't seem a way to really achieve this. A sensible approach would be to create a "core functionality" file, which contains all the intricate functions, and a "driver" file which does the command-line parsing, and invoke the "main" routine. The problem is, I can't use the "load" command in the driver file, because that's not supposed to happen when the program runs. I can't use the "use" command either, because that expects that an egg has been installed. So what's a good way of achieving the desired result? ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] combinators egg broken
Christian Kellermann > * Mark Carter [120316 14:45]: > >chicken-install combinators > > An attempt to use the egg fails: > > Error: (import) during expansion of (import ...) - cannot import from > The egg is named combinators, but there is no such module. > Does it work for you then when you select a specific combinator? Yes, it does. Thanks. My bad. My apologies for that. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] combinators egg broken
Doing chicken-install combinators causes a number of complaints: Warning: obsolete compiler option: -lambda-lift Note: type-definition `left-section' for toplevel binding `deprecated' conflicts with previously loaded type `(procedure ((procedure (#!rest) *) #!rest) (procedure (#!rest) *))' Note: type-definition `right-section' for toplevel binding `deprecated' conflicts with previously loaded type `(procedure ((procedure (#!rest) *) #!rest) (procedure (#!rest) *))' An attempt to use the egg fails: CHICKEN (c)2008-2011 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.7.0.5-st linux-unix-gnu-x86 [ manyargs dload ptables ] compiled 2012-03-07 on miro (Linux) #;1> (use combinators) Error: (import) during expansion of (import ...) - cannot import from undefined module: combinators ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Segfault srfi-34 (raise 'oops)
I'm getting a segfault with srfi-34: $ csi CHICKEN (c)2008-2011 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.7.0.5-st linux-unix-gnu-x86 [ manyargs dload ptables ] compiled 2012-03-07 on miro (Linux) #;1> (use srfi-34) ; loading /home/mcarter/.local/lib/chicken/6/srfi-34.import.so ... ; loading /home/mcarter/.local/lib/chicken/6/chicken.import.so ... ; loading /home/mcarter/.local/lib/chicken/6/scheme.import.so ... ; loading /home/mcarter/.local/lib/chicken/6/srfi-34.so ... #;2> (raise 'oops) Segmentation fault ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] How do I document eggs?
chicken-doc looks like a useful feature, but how should I document my eggs to use it? The eggdoc egg says not to document eggs using eggdoc anymore, but to use the chicken wiki. My egg (well actually, it's just a module made into an extension) just resides in a directory, however. Does that mean there's no real way of documenting it? Also, I don't use svn. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Fwd: Re: cannot import from undefined module
--- Begin Message --- Christian Kellermann > Which information would you've liked to have before stumbling on > all of this? Maybe that would be a good place to start the improvements, It's difficult to say. I'm in no way saying it's the document's "fault", but as a newbie to scheme, things can get a little overwhelming on the infrastructure side. There are so many ways to slice and dice modules, with import, use, require-extension and so on, that a newbie like me is often overwhelmed. Recipe-type approaches certainly help. One thing that is confusing is at: http://wiki.call-cc.org/man/4/Extensions What's the difference between a module and a library? I get the impression that libraries don't have localised "namespaces", can't export macros, and are perhaps suitable for linking with C; whereas modules are the opposite. Is that right? --- End Message --- ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] cannot import from undefined module
Christian Kellermann > Thanks for noticing this! I'm not sure if I in some way corrupted my install of chicken, but I removed the Debian version of chicken and obtained 4.7.0.5-st.tar.gz from http://wiki.call-cc.org/stability That seems to have fixed my issues. Phew. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] cannot import from undefined module
I'm trying to put some functions into a module, but I'm having difficulties. Everything seems to work when I use csi - putting it into a module causes errors. Here's the specific errors I am encountering: Warning: reference to possibly unbound identifier `read-lines' in: Warning:rep-read-file-lines Warning: reference to possibly unbound identifier `call-with-input- string' in: Warning:rep-read-string I think it has got something to do with the fact that the functions are visible in the namespace used by csi, but not when I create a module. If I try to import srfi-6 in my module, like so: (module mccsl ( define-simple-syntax) (import scheme chicken) (import srfi-6) ... ) I get the compilation error Syntax error (import): cannot import from undefined module What do I do to fix this? It's all proving to be an uphill battle. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Creating my own extensions
Mario Domenech Goulart > Maybe this document can be useful: > http://wiki.call-cc.org/eggs%20tutorial OK, after many chicken sacrifices (strangely appropriate somehow), I was able to build my extension and load it. Just one comment: I think there is a doc fix needed at http://wiki.call-cc.org/man/4/Extensions In the section my-lib.setup, I think the following line needs to be included below the other two compile lines: (compile -c -O2 -d1 my-lib.scm -unit my-lib -j my-lib) Otherwise, the .o file isn't created, causing installation to fail. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Can't install srfi 47
John Cowan > SRFI-63 is definitely your friend. Thanks. I've converted my code to use that SRFI. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Can't install srfi 47
Christian Kellermann > * Mark Carter [120306 17:07]: > > Warning: extension `srfi-47' has no .meta file - assuming it has no > Why are you needing this srfi? I want to create a matrix, and populate it. I have a list of triplets consisting of a row number, a column number , and a value. I populate the given row/column cell with the value. Having processed the list of triplets, I print the table as a list of lists. Any cells that haven't been populated explicitly have the value '(), which is my desired result. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Creating my own extensions
I'm a bit confused about how to create extensions. I have the following files in an mccsl directory: mccsl.setup: (compile -s mccsl.scm) (install-extension 'mccsl "mccsl.so") mccsl.scm: (module mccsl ( define-simple-syntax) (import scheme) ... ;; lots of definitions ) I have managed to load and use the library using csi, but creating a proper extension seems to not work. For starters, there is no exe named chicken-setup in Debian, although there is a chicken-install. The following wiki page suggests that there should be: http://wiki.call-cc.org/man/3/chicken-setup#install-program If I type chicken mccsl.setup it creates an mccsl.c file, but not an mccsl.so file. I'm thinking that's wrong?? So, there doesn't actually seem to be a way of installing a home- brewed extension. chicken-setup doesn't exists, and the install- extension function doesn't seem to install the extension. Presumably I'm making some schoolboy errors. I'm using the following version of chicken: CHICKEN (c)2008-2011 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.7.0 linux-unix-gnu-x86 [ manyargs dload ptables ] compiled 2011-09-06 on murphy (Linux) ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Can't install srfi 47
There seems to be a problem with srfi 47 root@miro:~# chicken-install srfi-47 retrieving ... resolving alias `kitten-technologies' to: http://chicken.kitten- technologies.co.uk/henrietta.cgi connecting to host "chicken.kitten-technologies.co.uk", port 80 ... requesting "/henrietta.cgi?name=srfi-47&mode=default" ... reading response ... HTTP/1.1 200 OK Date: Tue, 06 Mar 2012 15:26:50 GMT Server: Apache Connection: close Transfer-Encoding: chunked Content-Type: text/plain reading chunks . reading files ... srfi-47 located at /tmp/tempb05a/srfi-47 Warning: extension `srfi-47' has no .meta file - assuming it has no dependencies install order: () ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] OK, I jumped the gun a little
Sorry guys. In my recent report, I mentioned about not being able to bootstrap. I didn't read the README :( I'm supposed to obtain a bootstrapper from http://chicken.wiki.br/chicken-projects/bootstrap/ Unfortunately, there isn't one available for cygwin. I guess it's a case of ... wait for it wait for it ... solving the chicken and the egg problem. Are you completely sure that autotools is not the way to go? I don't know much about it myself, but it is THE build system. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Cygwin installation report
Here's my attempt to build chicken on cygwin: git clone http://chicken.wiki.br/git/chicken-core.git commit c95dc5f62be34284716025ddb0d5e5431566c24f Author: felix Date: Thu Mar 18 12:01:06 2010 +0100 cd chicken-core mmake='make PLATFORM=cygwin PREFIX=/usr/local' $mmake bootstrap make: *** No rule to make target `bootstrap'. Stop. :( ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Msys installation report
I seem to be able to get chicken to install and run OK on MSYS (includes MINGW, naturally). Here's the steps I followed: Open up a MSYS shell git clone http://chicken.wiki.br/git/chicken-core.git cd chicken-core make PLATFORM=mingw-msys confclean mmake='make PLATFORM=mingw-msys PREFIX=C:/msys/1.0/local' $mmake bootstrap $mmake CHICKEN=./chicken-boot $mmake install Create a file hello.scm: (declare (uses extras)) ; necessary for compilation using write-line (write-line "chicken scheme says hello") csi hello.scm # gives a warning about declares being ignored - can be safely ignored csc hello.scm && hello # gives output as expected Phew! Felix, I haven't forgotten about testing cygwin for you. I'll get on to it ASAP. Also, I think it's worthwhile incorporating some of the above information in the README file, so that people can get up and running as quickly as possible. I can provide a patch if that would be helpful. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Chicken scheme installation report (mingw-msys)
The following is an installation report of attempting to compile chicken from git using mingw-msys on 17-Mar-2010. The topmost entry in the git log is: commit 590e58d9cfaed30d1b79abcc8bab4c13b80691ce Author: felix Date: Fri Mar 12 07:51:21 2010 +0100 same for chicken-status and chicken-uninstall Here are the steps I followed to create chicken: git clone http://chicken.wiki.br/git/chicken-core.git cd chicken-core make PLATFORM=mingw-msys confclean make PLATFORM=mingw-msys PREFIX=/usr/local bootstrap make PLATFORM=mingw-msys PREFIX=/usr/local CHICKEN=./chicken-boot make PLATFORM=mingw-msys PREFIX=/usr/local install During the execution of the last command, it is reported: Error: (directory) cannot open directory: "/usr/local/lib/chicken/5" However, this doesn't really seem to be a problem, because if I type: ls /usr/local/lib/chicken/5 I obtain the listing: chicken.import.so posix.import.so srfi-14.import.so csi.import.so regex.import.so srfi-18.import.so data-structures.import.so scheme.import.so srfi-4.import.so extras.import.so setup-api.import.so srfi-69.import.so files.import.so setup-api.so tcp.import.so foreign.import.so setup-download.import.so types.db irregex.import.so setup-download.so utils.import.so lolevel.import.so srfi-1.import.so ports.import.so srfi-13.import.so The interpreter works OK. If I type: csi I am greeted with the prompt: CHICKEN (c)2008-2010 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.4.1 windows-mingw32-x86 [ manyargs dload ptables ] compiled 2010-03-17 on EMEAGBRABSLT001 (MINGW32_NT-5.1) Compilation is problematical, though. If I have the file hello.scm: (write-line "chicken scheme says hello") and type: csc hello.scm I obtain the response: The system cannot find the path specified. Error: shell command terminated with non-zero exit status 1: ""\usr\local\bin\chicken.exe" "hello.scm" -output-file "hello.c"" The problem is due to the use of backslashes. It should be noted that I am typing the commands from MSYS shell, where forward slashes are expected. If I run csi and csc from a normal DOS shell, then I get the same responses. In DOS, although the backslashes are correct, the filepath isn't. It's actually in: C:\msys\1.0\local\bin One philosophical problem to resolve is whether chicken development should be done from a DOS shell, or a MSYS shell. I am inclined to say the latter, as that is the normal development environment for MINGW. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Link to silex.pdf
For those who would prefer to read the Silex docs as a PDF rather than PS, I have performed a conversion and made it available from my site at: http://www.zen113241.zen.co.uk/ The direct link is: http://www.zen113241.zen.co.uk/silex.pdf ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Cygwin installation report
- Original Message > From: John Cowan > On further investigation, it turns out > that this is just one of the > criteria by which the kernel detects a supposed > installer; helpfully, > Microsoft has not released the whole algorithm. > So it should probably > be done to every program Maybe, but I think chicken-install and chicken-uninstall are sufficient ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Cygwin installation report
- Original Message > From: John Cowan > http://www.mail-archive.com/libtool-patc...@gnu.org/msg04773.html It seems there's two approaches: embedding the manifest inside the executable, or adding a file alongside the executable. I added chicken-install.exe.manifest (hopefully attached, but reproduced below in case it doesn't work) in /usr/local/bin, and that made all the problems disappear. The maintainers of chicken might prefer the embedded solution approach though, as suggested by John. Here's my chicken-install.exe.manifest file, which I simply cribbed from the Intertubes: Actia Description chicken-install.exe.manifest Description: Binary data ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Cygwin installation report
- Original Message > From: Mario Domenech Goulart > Thanks a lot for your feedback. :) > Installation of eggs proved problematical: > > chicken-install loop > bash: /usr/local/bin/chicken-install: Permission > denied > Is there > any documentation about that bestial Windows behavior? Yes. I had a little hunt around, and came up with this interesting link: http://social.msdn.microsoft.com/Forums/en-US/windowssecurity/thread/73f86e9e-928f-40b7-8dd5-27e40db6997e I haven't fully digested it myself, so I'll probably take a closer look at it tomorrow. I think the upshot is that we ought to be able to get chicken-install to work without renaming it - it's a case of sorting out its "manifest". Windows, don't you just love it. Regards, Mark. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Cygwin installation report
Hi, Felix asked me to try compiling the latest version of chicken from git. I am happy to announce that it all goes very well - expect for the command chicken-install - which seems to be a Win7/Vista problem. Here's a more detailed report of what I did: I installed a fresh copy of cygwin - ensuring that chicken 3.4.0 was NOT included in the installation. I then performed the following actions: git clone http://chicken.wiki.br/git/chicken-core.git cd chicken-core make PLATFORM=cygwin confclean make PLATFORM=cygwin PREFIX=/usr/local bootstrap make PLATFORM=cygwin PREFIX=/usr/local CHICKEN=./chicken-boot make PLATFORM=cygwin PREFIX=/usr/local install cd .. csi csi worked successfully. I obtained the output CHICKEN (c)2008-2010 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.4.1 windows-cygwin-x86 [ manyargs dload ptables ] compiled 2010-03-12 on mcarter-PC (CYGWIN_NT-6.1) #;1> I also confirm that csc compiles a file correctly. FYI, the git commit from which chicken was built is: commit 590e58d9cfaed30d1b79abcc8bab4c13b80691ce Author: felix Date: Fri Mar 12 07:51:21 2010 +0100 Installation of eggs proved problematical: chicken-install loop bash: /usr/local/bin/chicken-install: Permission denied To overcome this, I did: cp /usr/local/bin/chicken-install.exe /usr/local/bin/chickeni.exe It is then possible to do: chickeni loop csi > (use loop) ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Cygwin
- Original Message > From: felix winkelmann > On 3/6/10, Mark Carter wrote: > Patch is applied to "master". I'll put it into the "prerelease" branch as > well. :) > I'll install copies of "chicken-install" and "chicken-uninstall" as > "chicken-fetch" > and "chicken-remove", respectively, on Windows platforms. Good idea! > Did the invocations of the "install" cygwin command when doing the > "make ... install" trigger any security warnings? I obtained "Bad file number". > > Perform a library installation kludge: > > mv /usr/local/lib/libchicken* /usr/local/bin > > mv /usr/local/lib/libuchicken* /usr/local/bin > > Makefile.cygwin puts them in a place where the compiler can't find them. > > This should normally be done. I don't understand why you had to do this > manually. Maybe I should have set another flag, too. There's a lot of options to choose from, so it's difficult to choose the right one. Cygwin seems to do other things a little non-standard, I think. For instance, it doesn't put the ncurses header files where the ncurses egg can find them - even though the egg installs perfectly fine on Slackware, for example. > Excellent. Thanks again for your help. No problemo. ;) Mark. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Cygwin
OK. I achieved a build of chicken using cygwin. I give instructions below. I'd like to give a write-up, maybe by providing a patch, edit the wiki, or something. Let me know what you'd prefer. INSTALLING CHICKEN ON CYGWIN If you have chicken v3.4.0 installed on cygwin, then uninstall it. It will only cause confusion. I tried obtaining releases from http://chicken.wiki.br/dev-snapshots/, but that seems to have its own set of build problems. So obtain a copy of the source from git: git clone http://chicken.wiki.br/git/chicken-core.git cd chicken-core You need to edit Makefile.cygwin to include C_INCLUDE_PREFIX, thusly: diff --git a/Makefile.cygwin b/Makefile.cygwin index b448813..1ab2c04 100644 --- a/Makefile.cygwin +++ b/Makefile.cygwin @@ -148,6 +148,9 @@ chicken-defaults.h: echo "#ifndef C_INSTALL_LDFLAGS" >>$@ echo "# define C_INSTALL_LDFLAGS \"$(LINKER_OPTIONS) $(LINKER_OPTIMIZATION_OPTIONS)\"" >>$@ echo "#endif" >>$@ + echo "#ifndef C_INSTALL_PREFIX" >>$@ + echo "# define C_INSTALL_PREFIX \"$(PREFIX)\"" >>$@ + echo "#endif" >>$@ echo "#ifndef C_INSTALL_SHARE_HOME" >>$@ echo "# define C_INSTALL_SHARE_HOME \"$(DATADIR)\"" >>$@ echo "#endif" >>$@ Clean up any configuration weirdness: make PLATFORM=cygwin confclean It's a good idea to run the above command whenever it looks like your configuration might be dirty. Now do the building and installation: make PLATFORM=cygwin PREFIX=/usr/local bootstrap make -f Makefile.cygwin PREFIX=/usr/local chicken-config.h make PLATFORM=cygwin PREFIX=/usr/local CHICKEN=./chicken-boot make PLATFORM=cygwin PREFIX=/usr/local install Do the following Win 7 (probably also Vista) kludge: cp /usr/local/bin/chicken-install.exe /usr/local/bin/chickeni.exe This is because Win7(/Vista) treats any file with the words setup, install, or patch specially. From now on, when you want to install an egg, use chickeni instead of chicken-install. Perform a library installation kludge: mv /usr/local/lib/libchicken* /usr/local/bin mv /usr/local/lib/libuchicken* /usr/local/bin Makefile.cygwin puts them in a place where the compiler can't find them. There must be a way to correct it, but there are so many references to libraries that I haven't yet determined where the correction needs to be made. The egg installer (chicken-install) needs access to the libraries, or else it will fail. You should now be in business. Build programs using something like csc hello.scm and install eggs using something like chickeni tk I have confirmed that I have achieved a compile and had Tk running. TROUBLESHOOTING Here are some things that can go wrong, along with their fixes. # "highlevel macros are not supported" The build process is trying to use an old version of chicken (probably 3.4.0) to bootstrap the compilation process. To fix: Follow the instructions above where it mentions uninstalling the old version and building and using a bootstrap version # csi.c:2152: error: 'C_INSTALL_PREFIX' undeclared csi.c needs it, for some reason. To fix: apply the patch given above Hope that helps! Enjoy! Feedback welcome! ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] easyffi missing foreign-parse
Hi, I'm a n00b to scheme, and I thought I'd check out Chicken. I tried to get the readline egg installed, which is dependent on easyffi. I installed the easyffi egg, but if I type foreign-parse I get the response Error: unbound variable: foreign-parse All the other easyffi procedures seem to exist, as evidenced by the following transcript: #;3> register-ffi-macro # #;4> check-c-syntax # #;5> foreign-parse Error: unbound variable: foreign-parse #;5> Error: unbound variable: foreign-parse So, what gives? ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/ ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users