[cl-gd-devel] Premature loading of GD library can cause problems

Edi Weitz edi at agharta.de
Tue Jan 8 15:47:06 UTC 2008


On Mon, 07 Jan 2008 16:37:21 +1100, Alain Picard <Alain.Picard at memetrics.com> wrote:

> Sigh.  I looked at this, and coudn't find a way that woudn't
> potentially damage all the other users on other platforms.  The
> closest I could see was to comment out the top level call to
> (LOAD-GD-GLUE), but that would break existing users; and I can't put
> in a variable like (defvar *inhibit-automatic-dll-registration* nil)
> in specials.lisp because there is no time between loading
> specials.lisp and init.lisp that the user can use to turn on the
> inhibition.

With enough effort, one can probably invent some clever mechanism
which utilizes ASDF for this.  I hacked something similar for CLSQL
some time ago:

  http://clsql.b9.com/manual/appendix.html#foreignlibs

(Yeah, it's a bit different there because you have at least two
systems.  That's why I said "with enough effort"... :)

> So, I believe the correct thing is to simply remove the call to
> LOAD-GD-GLUE, but since it's not my library, and I don't know what
> the bulk of users are doing (I'm imagining a zillion happy hamsters,
> hacking on SBCL, blissfully unaware of this problem), I think the
> best thing to do at this point is to leave it alone and I'll
> continue with my local modification.

I don't agree.  Judging from the number of subscribers to this mailing
list and from the amount of feedback you've gotten so far, I'd guess
that the order of magnitude of users who rely on CL-GD not to break
their valuable apps is more like zero.

If the choice is between a) users of Lisp A may need to insert a new
line into their applications and b) users of Lisp B can't use the
library without local modifications, I think it is only fair to put
some burden on the users of Lisp A.  Besides, as I said already, I
think the change you proposed is The Right Thing[TM] to do anyway.



More information about the Cl-gd-devel mailing list