Can't load a given object file more than once
Hello, This is not actually that big a deal. But, let's say I compile a file:
(compile-file "/tmp/test-gambit-compiler/test-a.scm") #t
Then load the resulting object file:
(load "/tmp/test-gambit-compiler/test-a") "/tmp/test-gambit-compiler/test-a.o1"
OK, I wanna recompile it, but not have a bunch of old versions laying around. So delete the o1 file:
(delete-file "/tmp/test-gambit-compiler/test-a.o1")
And recompile:
(compile-file "/tmp/test-gambit-compiler/test-a.scm") #t
An error occurs if you try to load the new object file:
(load "/tmp/test-gambit-compiler/test-a") *** ERROR IN (console)@5.1 -- Can't load a given object file more than once (load "/tmp/test-gambit-compiler/test-a") 1>
Sure, I understand that Gambit is preventing a reload of the exact same object file. But it must be doing a very simple accounting based on the name of the object file. Perhaps you can employ that newfangled high-performance file digest code that was recently shared. ;-) Anywho, no big deal. But it's a surprise. Ed
Afficher les réponses par date
Sure, I understand that Gambit is preventing a reload of the exact same object file. But it must be doing a very simple accounting based on the name of the object file. Perhaps you can employ that newfangled high-performance file digest code that was recently shared. ;-)
Anywho, no big deal. But it's a surprise.
It's not Gambit, but the operating system that imposes this limitation. As far as I understand it, this is one reason to why Gambit compiles files into .o1 then .o2 and so on; you can load a .o1 file, recompile and then load the .o2 file. /Per
Per Eckerdal wrote:
Sure, I understand that Gambit is preventing a reload of the exact same object file. But it must be doing a very simple accounting based on the name of the object file. Perhaps you can employ that newfangled high-performance file digest code that was recently shared. ;-)
Anywho, no big deal. But it's a surprise.
It's not Gambit, but the operating system that imposes this limitation.
Hmm... OK. It was just surprising because I had an expectation based on what chicken does. I.e. it allows relading of the same *.so file. E.g. #;1> (system "csc -dynamic /tmp/test-gambit-compiler/test-a.scm") 0 #;2> (load "/tmp/test-gambit-compiler/test-a.so") ; loading /tmp/test-gambit-compiler/test-a.so ... #;3> (load "/tmp/test-gambit-compiler/test-a.so") ; loading /tmp/test-gambit-compiler/test-a.so ... Ed
participants (2)
-
Eduardo Cavazos -
Per Eckerdal