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: Mario Domenech Goulart
Subject: Re: [Chicken-users] How to deploy http-client?
Date: Fri, 25 Nov 2011 14:40:01 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

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:
>
> Target: i386-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --enable-checking=release --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --enable-libgcj-multifile
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
> --enable-java-awt=gtk --disable-dssi --enable-plugin
> --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
> --with-cpu=generic --host=i386-redhat-linux
> Thread model: posix
> gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)

I can't reproduce your problem here (I'm using 4.7.0.3-st, though).  Can
you show us the output of

  $ ./client -:d

and check if the ldd output for the libraries in the deploy dir looks
sane.

Best wishes.
Mario
-- 
http://parenteses.org/mario



reply via email to

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