|
From: | 亀田馬志 |
Subject: | Re: 【Deployment】 |
Date: | Sat, 15 Aug 2020 09:56:56 +0900 |
Hi,I managed to get something working on my termux, maybe that can help you:~/o/chicken-5.2.0rc1 ➤echo '(print "hello")' > hello.scm ~/o/chicken-5.2.0rc1 ➤./csc -t hello.scm~/o/chicken-5.2.0rc1 ➤gcc -DHAVE_CHICKEN_CONFIG_H hello.c -I . runtime.c library.c eval.c expand.c modules.c internal.c chicken-syntax.c build-version.c -lm -llog -o hello~/o/chicken-5.2.0rc1 ➤ ldd hellolibm.soliblog.solibdl.solibc.so~/o/chicken-5.2.0rc1 ➤ ./hellohelloYou can ignore -llog unless you're on Android.So you don't need buildtag.h. Is there a reason you can't "csc -static hello.scm" or "csc -static -C -static hello.scm" which is a more common use-case?Cheers,K.On Thu, Aug 13, 2020, 03:27 亀田馬志 <masashi.kameda@gmail.com> wrote:Thanks for your reply.> It seems there is a chicken-bin for U20.04LTSYes, there is BINARY. I mean I could not find a SOURCE CODE package.(Usually, you can take source code from the Ubuntu repository if you wished to.)> did you try compiling hello.scm to hello.c with that?Yes, I did.To write a single file with Scheme codes, and to compile to a SINGLE c file, it is a piece of cake.> Are you reading the manual for Chicken 5Yes, of course. I followed the instructions on it.You may see there:"Compiled to C, we get hello.c. We need the files chicken.h, chicken-config.h, buildtag.h and runtime.c, which contain the basic runtime system, plus the library files build-version.c, chicken-syntax.c, eval.c, expand.c, internal.c, library.c and modules.c, which contain the same functionality as the library that is linked into plain CHICKEN-compiled applications:"However, as you may notice, there is no buildtag.h generated even though you built Chicken Scheme from its source code.Therefore, you can not proceed to the rest process using /tmp described next.> perhaps the manual is outdated?OMBuddha. If what you are saying were right....what should I do!?Thanks.2020年8月13日(木) 6:39 Kristian Lein-Mathisen <kristianlein@gmail.com>:Hi,It seems there is a chicken-bin for U20.04LTS [1], did you try compiling hello.scm to hello.c with that? What is it that you're trying to acheive?I don't seem to have any buildtag.h either, perhaps the manual is outdated?Are you reading the manual for Chicken 5 [2]?K.On Mon, Aug 10, 2020, 21:28 亀田馬志 <masashi.kameda@gmail.com> wrote:Hello.I tried following and obeying the instructions described in Deployment, the manual of Chicken Scheme, in order to cock-a-do-do "Distributing compiled C files", but it did not work well.1. Ubuntu Repository provides no source code of Chicken SchemeI'm using Ubuntu 20.04 LTS, currently an OS under the feather, and I could not find the source code of Chicken Scheme in its repository. Neither in Debian? I do not know.Hen_ce, I had to build Chicken Scheme from its source code.2. Where the chick can I find buildtag.h?I switched to using Windows 10, and made an environment of Ubuntu with WSL(Windows Subsystem for Linux). There I built a Chicken Scheme from its source, and followed the instructions. BUT. I could not find buildtag.h there even though the manual says "generated by the build process". Did I miss something? Is there any special way to get buildtag.h?3. Anyway tried compiling "Hello World", but getting a bunch of error messages.I did not know whether compiling with gcc worked well or not without buildtag.h, but I tried. The result was a bunch of errors, something like this:"/usr/bin/ld: /tmp/ccJKB9L5.o: in function `C_modules_toplevel':
modules.c:(.text+0xad58): undefined reference to `C_chicken_2dsyntax_toplevel'
collect2: error: ld returned 1 exit status"Something related to toplevel stuff did not work well. As egg-spected? Maybe, yes.Well, is there any technique of "Distributing compiled C files" outside of the manual, or is there anything I did wrong(especially in the building process)?Thanks,
[Prev in Thread] | Current Thread | [Next in Thread] |