chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Patch for FreeBSD link error


From: J Altfas
Subject: Re: [Chicken-users] Patch for FreeBSD link error
Date: Sun, 05 Jan 2014 15:45:14 -0800

My new PC runs Windows 8.1 Pro and comes with "Hyper-V" 
virtualization "built-in".  Getting CHICKEN running on FBSD as a 
guest OS was pretty easy, but one problem showed up.

Near the end of the test suite, 'gmake check' failed (during the 
"deployment test") with the error:

'clang' 'rev-app.o' -o 'rev-app/rev-app' -L.. -L"/usr/local/lib"  
-Wl,-R"\$ORIGIN" -z origin -lchicken -lm -lpthread
clang: error: no such file or directory: 'origin'

That message looked awfully familiar!  Sure enough, the issue had 
been discussed in this list in Feb 2013.  At the time jcowan 
suggested there was a bug in clang: it didn't handle the -R and -z 
parameters in the same invocation.

Looking into it, in fact the bug is in CHICKEN.  Turns out the "-z" 
flag is really a linker vs. compiler flag, so the "-z origin" 
incantation needs to be passed to the linker.  Here's a patch that 
fixes the problem:

--- csc.orig.scm        2014-01-05 13:30:36.000000000 -0800
+++ csc.scm     2014-01-05 13:30:36.000000000 -0800
@@ -277,7 +277,7 @@
         (else
          (list (conc "-L\"" library-dir "\""))))
    (if (and deployed (eq? (software-version) 'freebsd))
-       (list "-z origin")
+       (list "-L '-z origin'")
        '())
    (cond ((get-environment-variable "CHICKEN_C_LIBRARY_PATH") =>
          (lambda (path)

I think this could be useful to people trying to deploy applications 
on FBSD.

Thanks,
Jules.

reply via email to

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