chicken-users
[Top][All Lists]
Advanced

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

Re: Static eggs query (was Re: [Chicken-users] ok my first egg is ready)


From: felix winkelmann
Subject: Re: Static eggs query (was Re: [Chicken-users] ok my first egg is ready)
Date: Wed, 7 Nov 2007 08:07:01 +0100

On Nov 6, 2007 12:08 PM, Peter Wright <address@hidden> wrote:
>
> Is there a way to avoid this? The chicken-setup link above suggests
> that it could be done like the below, but this doesn't work:
>
> $ csc -static-extensions pct.scm -uses predicate-calculus
> pct.o: In function `f_26':
> pct.c:(.text+0x5cc): undefined reference to `C_predicate_calculus_toplevel'
> pct.o: In function `f_23':
> pct.c:(.text+0x643): undefined reference to `C_predicate_calculus_toplevel'
> collect2: ld returned 1 exit status
> *** Shell command terminated with exit status 1: gcc pct.o -o pct 
> -L/usr/local/lib  -Wl,-R/usr/local/lib -lm -ldl -lchicken
> $

Replace "-uses" with "-R" and it should work.

>
> Second question (or perhaps a group of questions) - does anyone have
> any idea how many of the 348 or so Chicken eggs are set up for static
> linking? The link I mentioned above states:
>
>   If you require a statically linkable version of an egg that has not been
>   converted yet, contact the extension author or the CHICKEN mailing list.
>
> Is there a Grand Plan(tm) to convert existing eggs for static linking?
> It looks like the process should be pretty straightforward, but just
> hasn't been done yet for some (many? most? all?) eggs.

Yeah, that's right. A couple of the eggs support that.

% ls */*.setup */trunk/*/*.setup | xargs grep "(static "
bb/bb.setup:      (else '((static "bb-static.a")
ftl/ftl.setup:   (static "ftl-static.o")))
ftl-peg/ftl-peg.setup:   (static "ftl-peg-static.o")
honu/honu.setup:   (static "honu.o")
numbers/numbers.setup:    (static "numbers-static.o")
operations/operations.setup:   (static "operations-static.o") ) )
predicate-calculus/predicate-calculus.setup:    (static "predicate-calculus.o")
readline/readline.setup:   (static "readline-static.o")
srfi-37/srfi-37.setup:   (static "srfi-37.o")
tool/tool.setup:   (static "tool.o")
topological-sort/topological-sort.setup:   (static "topological-sort.o")))

No grand plan, yet.

>
> Of course I appreciate that some (many? most?) Chicken users may not
> care very much about statically-linkable extensions, but... er...
> well, I think some of us do. :)

I do as well.

>
> If it's largely a matter of just doing the boring grunt work of
> patching the .setup files and testing... well, I'm happy to try doing
> that, at least for the eggs that I use most frequently (Naruto, see
> attached :)).

That would be nice! Give me your preferred username and password
hash (openssl passwd -apr1), and you'll get svn write access.

>
> Or are there some hideously tricky potential problems that I haven't
> noticed yet? If so, I bet it involves those bloody macros. Sigh.

No, one just has to grok the setup scripts, but that shouldn't be a problem.

>
> > BTW, the current egg count is 348. Two more to go!
>
> I'm sure CPAN will have to admit defeat soon. :-)
>

Uh... Not quite... :-)


cheers,
felix




reply via email to

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