chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] [PATCH] Mark all extensions as static when using (link


From: Evan Hanson
Subject: [Chicken-hackers] [PATCH] Mark all extensions as static when using (linkage static) [for #1468]
Date: Mon, 11 Jun 2018 13:08:23 +1200

On 2018-06-10 12:27, address@hidden wrote:
> Pushed. I ran make check, installed awful from scratch and build a
> static awful-server. I did not make any further tests, so I leave closing
> the ticket to someone else.

Sorry, that patch was incomplete -- it needed to include one additional
hunk that makes chicken actually use the setup-mode logic in the
previous patch. The rest of the fix for #1468 is attached.

You can test this behaviour with the following example. After building
it with `chicken-install -no-install`, you should be able to run the
program "example" successfully (it will print two numbers and exit 0).
Without this fix, it will fail with the following: Error: (load) unable
to load compiled module - cannot load compiled code dynamically - this
is a statically linked executable - "./a.so"

  ;;; example.egg
  ((components
    (extension a)
    (extension b)
    (program example (linkage static) (component-dependencies a b))))

  ;;; example.scm
  (import a b)
  (print "a says " (a))
  (print "b says " (b))

  ;;; a.scm
  (module a (a)
    (import (scheme) (chicken random))
    (define (a) (pseudo-random-integer 42)))

  ;;; b.scm
  (module b (b)
    (import (scheme) (chicken random))
    (define (b) (pseudo-random-integer 42)))

Sorry I left this out of the previous patch,

Evan

Attachment: 0001-Mark-all-extensions-as-static-when-using-linkage-sta.patch
Description: Text Data


reply via email to

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