chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] possible dependency issue with message-digest egg


From: Brian St. Pierre
Subject: [Chicken-users] possible dependency issue with message-digest egg
Date: Wed, 04 Sep 2013 22:58:31 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

I'm using message-digest 3.0.5 and csc 4.7.0 on ubuntu 12.04 x86_64

This minimal example works fine in the interpreter but fails when compiled:

    (use sha1 message-digest)
    (display (message-digest-file (sha1-primitive) "mysha1.scm"))
    (newline)

The error is:

% ./mysha1

Error: call of non-procedure: #<unbound value>

        Call history:

        ##sys#require   
        ##sys#require   
        ##sys#require   
        mysha1.scm:2: sha1#sha1-primitive       
        mysha1.scm:2: message-digest-item#message-digest-file <--

In the process of experimenting, I noticed that adding 'posix' as a dependency would fix the error. This program works as expected:

    (use sha1 message-digest posix)
    (display (message-digest-file (sha1-primitive) "mysha1.scm"))
    (newline)

I don't know enough about how dependencies are supposed to work to know if this is the right way to solve it, but this patch makes the first program above work as expected:

--- message-digest-item.scm     (revision 29704)
+++ message-digest-item.scm     (working copy)
@@ -20,7 +20,8 @@

   (require-library
     message-digest-type
-    message-digest-update-item)
+    message-digest-update-item
+    posix)

 ;;; Single Source API

--
Brian St. Pierre




reply via email to

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