chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] How to deploy http-client?


From: Christian Kellermann
Subject: Re: [Chicken-users] How to deploy http-client?
Date: Fri, 25 Nov 2011 22:15:41 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

* Mario Domenech Goulart <address@hidden> [111125 20:53]:
> Hi Vok,
> 
> On Fri, 25 Nov 2011 20:00:55 +0100 Vok Vojwo <address@hidden> wrote:
> 
> > I tried to deploy an application which uses http-client, but I get the
> > following error:
> >
> > ./client: symbol lookup error: /home/.../client/http-client.so:
> > undefined symbol: C_srfi_2d1_toplevel
> >
> > What I did so far:
> >
> > I wrote a simple test program client.scm:
> >
> > (use http-client)
> > (pp (with-input-from-request "http://www.google.com/"; #f read-string))
> >
> > The program works fine, if I run it with: csi -s client.scm
> >
> > After that I deployed it using the following command:
> >
> >   $ csc -deploy client.scm
> >
> > This creates the client directory with the binary and the chicken shared 
> > lib.
> >
> > After that I tied to deploy http-client with all dependencies. For
> > that I wrote a simple script called chicken-deps to handle the
> > dependencies:
> >
> > #! /usr/local/bin/csi -ss
> >
> > (use irregex)
> >
> > (define (chicken-deps egg thunk)
> >   (let incubate ((egg egg))
> >     (thunk egg)
> >     (letrec ((metafile (string-append egg "/" egg ".meta"))
> >              (metadata (read (open-input-file metafile))))
> >       (for-each
> >        (lambda (deps)
> >          (if deps
> >              (for-each
> >               incubate
> >               (map symbol->string
> >                    (map (lambda (egg)
> >                           (if (pair? egg) (car egg) egg))
> >                         (cdr deps))))))
> >        (list (assoc 'depends metadata)
> >              (assoc 'needs metadata))))))
> >
> > (define (main args)
> >   (let ((cmd (car args))
> >         (egg (cadr args)))
> >     (chicken-deps
> >      egg
> >      (lambda (egg)
> >        (system (irregex-replace/all "{}" cmd egg))))))
> >
> > I used this script to retrieve all eggs necessary for http-client by
> > this command:
> >
> >   $ chicken-deps 'chicken-install -r {}' http-client
> >
> > This results in a download of 20 eggs:
> >
> > base64
> > check-errors
> > defstruct
> > http-client
> > intarweb
> > lookup-table
> > matchable
> > md5
> > message-digest
> > miscmacros
> > openssl
> > record-variants
> > regex
> > sendfile
> > setup-helper
> > string-utils
> > synch
> > uri-common
> > uri-generic
> > variable-item
> >
> > I already installed the eggs in my development repository for csi.
> >
> > Now I deployed all modules in my client directory with the command:
> >
> >   $ chicken-install -deploy -p /.../client -t local -l . $egg
> >
> > After that I have 102 files in the client directory. 60 of them are
> > shared libs. And when I try to run the client:
> >
> >   $ ./client
> >
> > I get the undefined symbol error. So my question:
> >
> >   What did I wrong? Is it a bug?
> >
> > I did all the above with 4.7.0 on Red Hat EL 5. I had to specify
> > ARCH=x86 option during make. Without the option I got an apply-hack
> > error. GCC is 4.1.2:

In addition to what mario said, I want to raise these questions:

Did you build chicken from git? If so did you build a boot-chicken
and used that to build the real chicken? It would go like this
(without your customisations):

make PLATFORM=linux boot-chicken
make PLATFORM=linux CHICKEN=./chicken-boot
make PLATFORM=linux install

If you do this, does that help?

Also is it possible that you have older extensions installed on the
machine?

Kind regards,

Christian

-- 
Who can (make) the muddy water (clear)? Let it be still, and it will
gradually become clear. Who can secure the condition of rest? Let
movement go on, and the condition of rest will gradually arise.
 -- Lao Tse. 



reply via email to

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