From Alain.Picard at memetrics.com Mon Jan 7 05:37:21 2008 From: Alain.Picard at memetrics.com (Alain Picard) Date: Mon, 07 Jan 2008 16:37:21 +1100 Subject: [cl-gd-devel] Premature loading of GD library can cause problems In-Reply-To: (Edi Weitz's message of "Tue, 18 Dec 2007 00:33:59 +0100") References: <87ve6wx664.fsf@memetrics.com> Message-ID: <871w8ub3hq.fsf@memetrics.com> Edi Weitz writes: > So, yes, if you want to send a patch to a) defer loading of the > library and to b) make the location of the library something the OS > should take care of, I'm all for it - please send a patch. I'm just > too busy right now to fix this myself and, as I said, this doesn't > have very high priority for me. 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. 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. Perhaps just a comment in init.lisp, like the following, so future poor schmucks don't have to rediscover my woes for themselves: ;;; If you are a Lispworks user, and you will be shipping a delivered application ;;; to a machine where the code will run from a different directory from where it ;;; was compiled, you will need to comment out the next line, ;;; adjust *SHARED-LIBRARY-DIRECTORIES* and call load-gd-glue when your application starts. (load-gd-glue) Sorry for the noise. :-( --alain From edi at agharta.de Tue Jan 8 15:47:06 2008 From: edi at agharta.de (Edi Weitz) Date: Tue, 08 Jan 2008 16:47:06 +0100 Subject: [cl-gd-devel] Premature loading of GD library can cause problems In-Reply-To: <871w8ub3hq.fsf@memetrics.com> (Alain Picard's message of "Mon, 07 Jan 2008 16:37:21 +1100") References: <87ve6wx664.fsf@memetrics.com> <871w8ub3hq.fsf@memetrics.com> Message-ID: On Mon, 07 Jan 2008 16:37:21 +1100, Alain Picard 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. From Alain.Picard at memetrics.com Thu Jan 10 07:05:46 2008 From: Alain.Picard at memetrics.com (Alain Picard) Date: Thu, 10 Jan 2008 18:05:46 +1100 Subject: [cl-gd-devel] Premature loading of GD library can cause problems In-Reply-To: (Edi Weitz's message of "Tue, 08 Jan 2008 16:47:06 +0100") References: <87ve6wx664.fsf@memetrics.com> <871w8ub3hq.fsf@memetrics.com> Message-ID: <87sl1688j9.fsf@memetrics.com> Edi Weitz writes: > 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. Well, I'm not going to argue agains my own advice; so if you're happy burdening users with this sort of change, I'll send you a patch; but it'll be trivial: it'll basically mean * delete the (load-gd-glue) call from init * export *shared-library-directories* --ap