Re: [Chicken-users] Chicken-users Digest, Vol 139, Issue 9

2014-06-12 Thread blueperson
于 2014年06月12日 00:00, chicken-users-requ...@nongnu.org 写道: Send Chicken-users mailing list submissions to chicken-users@nongnu.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.nongnu.org/mailman/listinfo/chicken-users or, via email, send a message with

Re: [Chicken-users] About Chicken Compiler CSC's Option

2014-06-12 Thread blueperson
Hi, Yeah the Makefile is buggy. Please find my WIP patch attached to this email. This looks more comprehensive than my patch. As I just use hato-smtp.scm I get away without building most of it. I use the datenhobel-hato-egg and my approach is to do make clean followed by

Re: [Chicken-users] About Chicken Compiler CSC's Option

2014-06-12 Thread blueperson
于 2014年06月12日 20:04, blueperson 写道: Hi, Yeah the Makefile is buggy. Please find my WIP patch attached to this email. This looks more comprehensive than my patch. As I just use hato-smtp.scm I get away without building most of it. I use the datenhobel-hato-egg and my approach is to do

Re: [Chicken-users] About Chicken Compiler CSC's Option

2014-06-12 Thread Christian Kellermann
blueperson blueperson1...@gmail.com writes: I have try the patch file but still get errors, this time is undefine module hato-i3db. I also find the hato.setup file in datenhobel-hato-egg and try to chicken-install. I really like this way, but I failed in install tokyocabinet. The error is

[Chicken-users] Compiling Chicken-compiled-to-C file.c does not link

2014-06-12 Thread Nikos Vasilakis
Hello everyone, I am trying to compile a simple scheme program down executable through C, with no success. My program is array1 from the Kernighan and Van Wyk Benchmarks, as implemented here [1]. I am using chicken 4.7 on ubuntu 12.04 (details: [2]) and grabbed the chicken.h header file from a

Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link

2014-06-12 Thread Christian Kellermann
Nikos Vasilakis ni...@vasilak.is writes: Hello everyone, I am trying to compile a simple scheme program down executable through C, with no success. My program is array1 from the Kernighan and Van Wyk Benchmarks, as implemented here [1]. I am using chicken 4.7 on ubuntu 12.04 (details: [2])

Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link

2014-06-12 Thread wiffel
Hi Nikos, If you remove the definition of the 'main' function and add an expression like this: (time (go 20)) and compile it with: csc -static -O5 array1.scm you should end up with a statically linked application 'array1' that is optimized for speed (because of the -O5). Runs

Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link

2014-06-12 Thread wiffel
Hi Nikos, If you don't want to use 'csc' and really want to go the 'C way', you will need more then the 'chicken.h' file. You will need at least the following files: 'buildtag.h', 'build-version.c', 'chicken.h', 'library.c' and 'runtime.c'. All of them can be found in the top directory of

Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link

2014-06-12 Thread John Cowan
Christian Kellermann scripsit: Maybe http://wiki.call-cc.org/man/4/Using%20the%20compiler#distributing-compiled-c-files helps here. This still refers to autotools, so I suspect it's a bit old. Someone should check that the list of .c files needed to statically link Chicken programs is up to

Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link

2014-06-12 Thread Nikos Vasilakis
Hi Christian, thank you, this helped a lot! Using chicken source from version4.8.0.6, and compiling with gcc -static -Os -fomit-frame-pointer -DHAVE_CHICKEN_CONFIG_H \ runtime.c library.c eval.c expand.c build-version.c \ modules.c array1.c -o array1 -lm I get only

Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link

2014-06-12 Thread Nikos Vasilakis
Thanks so much Wiffel, it worked (using chicken-4.9.0.1!). I want to go the C way only because I want to later compile the generated C code for a different ISA (ALPHA). For future reference, to aid others: my shell (zsh) somehow expanded $CHICKEN_FILES as a single argument to gcc, and got `gcc:

Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link

2014-06-12 Thread wiffel
Nikos, You're welcome. I do understand going for the C way. I had to do the same thing to be able to run some chicken scheme programs on Intel's Xeon Phi platform. The only way to do that is using C files and Intel's ICC compiler. A bit of a hassle to set up, but it did work fine. Hope you

Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link

2014-06-12 Thread Oleg Kolosov
On 06/12/14 20:40, Nikos Vasilakis wrote: I want to go the C way only because I want to later compile the generated C code for a different ISA (ALPHA). For semi-automatic C way you can try my work in progress CMake macros: https://github.com/bazurbat/cmake-modules The project contains somewhat