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                          [email protected]
> Software Developer, OpenAmplify
> 
> 
> _______________________________________________
> Chicken-users mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/chicken-users


_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to