Reported as an 'issue' on the blackhole tracker (http://github.com/pereckerdal/blackhole/issues/#issue/6), but I figured I'd copy it to the list in case anyone else was interested/being-affected, or on the offhand chance that this isn't a responsibility of blackhole to correct for a change in gambit...
upgrading to 4.5.3 kills import dead in it's tracks whenever you have a module that uses the C FFI and thus requires compilation.
As demonstrated below (only change is upgrade to 4.5.3 and re-build of 'build.scm'/removal of ns.dat)
[nikki@vbox src]$ bsc Loaded Black Hole... Gambit v4.5.2
(import test-c)
/home/nikki/src/test-c is being compiled...
(c-print)
Hello world
=====
[nikki@vbox src]$ bsc Loaded Black Hole... Gambit v4.5.3
(import test-c)
/home/nikki/src/test-c is being compiled... *** ERROR -- Operator is not a PROCEDURE (#("test-c.o1" ##2 http://github.com/pereckerdal/blackhole/issues/#issue/2 | test-c.o1|>))
At a guess, this is likely caused by something in the following commit :
http://www.iro.umontreal.ca/~gambit/repo/.cgit.cgi/Gambit/commit/?id=5bae3cb... http://www.iro.umontreal.ca/%7Egambit/repo/.cgit.cgi/Gambit/commit/?id=5bae3cb2db90f90ae9fbe16374f4c44fdb3106fe
Afficher les réponses par date
On 2009-11-16, at 11:10 AM, Nicola Archibald wrote:
[nikki@vbox src]$ bsc Loaded Black Hole... Gambit v4.5.3
(import test-c)
/home/nikki/src/test-c is being compiled... *** ERROR -- Operator is not a PROCEDURE (#("test-c.o1" # #2 | test-c.o1|>))
At a guess, this is likely caused by something in the following commit :
http://www.iro.umontreal.ca/~gambit/repo/.cgit.cgi/Gambit/commit/?id=5bae3cb...
You are correct... that commit is the reason for the above misbehavior.
I don't know what to change in blackhole, but the change should be simple (you need to extract the procedure with a (vector-ref v 2)).
Marc
16 nov 2009 kl. 17.26 skrev Marc Feeley:
On 2009-11-16, at 11:10 AM, Nicola Archibald wrote:
[nikki@vbox src]$ bsc Loaded Black Hole... Gambit v4.5.3
(import test-c)
/home/nikki/src/test-c is being compiled... *** ERROR -- Operator is not a PROCEDURE (#("test-c.o1" # #2 | test-c.o1|>))
At a guess, this is likely caused by something in the following commit :
http://www.iro.umontreal.ca/~gambit/repo/.cgit.cgi/Gambit/commit/?id=5bae3cb...
You are correct... that commit is the reason for the above misbehavior.
I don't know what to change in blackhole, but the change should be simple (you need to extract the procedure with a (vector-ref v 2)).
Marc
It should be fixed now. I added a test
(if (vector? procedure-or-vector) (vector-ref procedure-or-vector 1) procedure-or-vector)
to make it work on both newer and older versions. Is this reasonable to do? Or am I supposed to use the ##execute-modules procedure? I don't know exactly what it does, but I saw on the commit that it was changed as well, so I assume that it's related somehow..
/Per
On 2009-11-16, at 12:56 PM, Per Eckerdal wrote:
It should be fixed now. I added a test
(if (vector? procedure-or-vector) (vector-ref procedure-or-vector 1) procedure-or-vector)
to make it work on both newer and older versions. Is this reasonable to do?
Yes.
Or am I supposed to use the ##execute-modules procedure? I don't know exactly what it does, but I saw on the commit that it was changed as well, so I assume that it's related somehow..
Well, ##execute-modules is a higher-level interface, but I don't know what you are trying to do. If you receive an "exec-vector" for a module that was loaded with ##load-object-file, then call
(##execute-modules exec-vector 0)
Marc