chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Problem with uuid-lib egg


From: Kon Lovett
Subject: Re: [Chicken-users] Problem with uuid-lib egg
Date: Fri, 17 Aug 2012 19:11:06 -0700

On Aug 17, 2012, at 1:47 PM, John Maxwell wrote:

> Hi all-
> 
> I'm writing some code which needs to generate uuids, so naturally I
> turned to the uuid-lib egg. My problem is, the egg needs libuuid.so
> (since the egg is basically a thin wrapper around that library), and
> this is causing me headaches.
> 
> When I compile my code, I add -luuid to the csc link command, like so:
> 
>    csc -o my-app my-app.o more-code.o -luuid
> 
> and all is well. However, I also need to run the same code using csi
> (for unit testing purposes), and this doesn't work so well; csi
> segfaults out the first time that I try to call any of the uuid
> functions.
> 
> Obviously, I could rebuild csi to link against libuuid (or play games
> with using the ELF utilities to modify the binary and add libuuid to
> it's dependencies), but this feels... wrong.
> 
> Is this a bug in the egg (i.e., should the egg take care of pulling in
> libuuid)?

Yes.

I have only tested w/ MacOS X, where explicit use of libuuid is not required. 
The .setup file needs to me amended as:

(setup-shared-extension-module 'uuid-lib (extension-version "1.4.1")
  compile-options: '(
    -L -luuid  ;this is the new bit
    -scrutinize
    -fixnum-arithmetic

I will release a new version that tests for the 'software-version' and extends 
the options accordingly. For now if you could try what Mario suggested, get the 
source & test w/ the proposed change it would help.

Sorry for the trouble.

> Or is it inherent in the design of Chicken? Or... what?

No, all my fault.

> 
> Suggestions, workarounds, etc. deeply appreciated.
> 
> -John
> 
> -- 
> John Maxwell                          address@hidden
> Software Developer, OpenAmplify
> 
> 
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-users




reply via email to

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