(Moved from bug report 315804. I thought it would be good to ask this
here in case others care to know about this as well.)
On Fri, 2009-04-10 at 09:27 +0000, Abdulaziz Ghuloum wrote:
> On Apr 9, 2009, at 7:30 PM, Derick Eddington wrote:
>
> > I tried to make a patch to do that, but I ran
> > into a problem I don't understand of getting "unbound identifier"
> > errors
> > when building, caused by using {open,read,close}-directory-stream from
> > scheme/ikarus.posix.ss.
>
> The included boot file is pretty old; it does not know about
> these new definitions (try running ikarus -b ikarus.4.boot and
> see that it doesn't know about directory-streams). So, when
> you try to import/use these identifiers in ikarus.posix, it
> complains that they're unbound (which is true).
Thank you for the informative response. I had been assuming that
building a new boot file sees the bindings from the version it's
building and not those from the pre-built boot file used by the builder
process.
> So, before you do this, you (or rather, I) need to refresh the
> included boot files (both the 32- and 64-bit versions)
How does one do this? I had been assuming the pre-built boot file was
the boot file built (by you) left over from building the previous
revision. But looking at the log, I can see the last change to it was
revision 1729! And now I remember that I rarely see the boot file
included in repository updates.
> to include
> directory-streams. Once that's done, they can be used in defining
> other primitives.
>
> Alternatively, you can simply define directory-list in ikarus.io.ss
> where it can lexically see the definitions of directory-streams and
> there will be no problems with that.
Good to know.
> Alternatively, you can define it in a new library, and let it
> import directory-streams directly from the (ikarus.io) library.
Why does this work but importing them from (ikarus) into an existing
library does not? I guess because the (ikarus) library is from the
pre-built boot file, but the (ikarus.io) library is from the new version
being built? If that's true, I'm curious to know why the (ikarus) used
to resolve bindings for the new boot file can't be from the new version
as well. I guess because all the bindings for the new (ikarus) aren't
yet known by the build process because it's still in the middle of
figuring them out?
> This new library should be included in the list of libraries after
> (ikarus.io) otherwise, something wrong might happen (or not).
I think I already understand this "otherwise, something wrong might
happen (or not)" is because anything which uses values from some library
needs those values to actually exist (otherwise segfaults have happened
to me) so the used libraries must be instantiated first, but it's
possible the values don't actually get used even though some library is
imported, which is why you say "(or not)". (?)
Thanks, I've been wanting to better understand how Ikarus bootstraps.
--
: Derick
----------------------------------------------------------------