[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Nikos Vasilakis
Subject: Re: [Chicken-users] Compiling Chicken-compiled-to-C file.c does not link
Date: Thu, 12 Jun 2014 12:10:03 -0400

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

/tmp/cc1VeOX9.o: In function `C_apply':
runtime.c:(.text+0x2306e): undefined reference to `_C_do_apply_hack'
collect2: ld returned 1 exit status

which is much much better than previous results. Any clues about

('s runtime.c does have a `extern void _C_do_apply_hack(void
*proc, C_word *args, int count) C_noret;` line)

(I will also try with version 4.9, now attempting Wiffel's solution)


On Thu, Jun 12, 2014 at 9:24 AM, Christian Kellermann
<address@hidden> wrote:
> Nikos Vasilakis <address@hidden> 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]) and grabbed the chicken.h header file from
>> a github repo [3].
>> In particular, `chicken array1.scm` creates array1.c, but running `gcc
>> array1.c` throws a big number of "undefined reference to .." ending
>> with "collect2: ld returned 1 exit status" [4].
>> So that people help out most, my eventual goal is to compile a
>> statically linked executable binary. Ideally, therefore, I would need
>> to have a "chicken.c" or the chicken runtime linked in.
> Maybe
> helps here. Of course you would need all dependencies statically built,
> i.e. the required units and extensions.
> HTH,
> Christian
> _______________________________________________
> Chicken-users mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]