Subject: Re: CLX/CMUCL: warning on load
From: rpw3@rpw3.org (Rob Warnock)
Date: Wed, 14 Dec 2005 05:50:19 -0600
Newsgroups: comp.lang.lisp
Message-ID: <bbqdndw0G-9mmz3eRVn-og@speakeasy.net>
Paolo Amoroso  <amoroso@mclink.it> wrote:
+---------------
| David Trudgett <wpower@zeta.org.au.nospamplease>  writes:
| > When I load CLX (from .cmucl-init) I get the following warning, and I
| > was wondering if this is normal or not:
| >     ;; Loading #p"/usr/lib/cmucl/subsystems/clx-library.x86f".
| >     Warning:  XLIB previously used the following packages:
| >       (#<The LISP package, 1772/4161 internal, 978/1227 external>)
| 
| CMUCL has been displaying that warning for the past few versions,
| but it's harmless.
+---------------

Oddly enough, the Linux pre-built binaries have the problem, but
the FreeBSD pre-built binaries don't! This first case is on Linux --
note the PACKAGE-USE-LIST output before & after the REQUIRE:

    $ cmucl-19c/bin/lisp -noinit -nositeinit
    CMU Common Lisp 19c (19C), running on shambhala.org
    With core: /usr/u/rpw3/src/cmd/cmucl-19c/lib/cmucl/lib/lisp.core
    Dumped on: Thu, 2005-11-17 06:12:58-08:00 on lorien
    See <http://www.cons.org/cmucl/> for support information.
    Loaded subsystems:
	Python 1.1, target Intel x86
	CLOS based on Gerd's PCL 2004/04/14 03:32:47
    * (package-use-list :xlib)

    (#<The LISP package, 1827/3484 internal, 978/1227 external>)
    * (require :clx)

    ; Loading #P"/usr/u/rpw3/src/cmd/cmucl-19c/lib/cmucl/lib/subsystems/clx-library.x86f".
    Warning:  XLIB previously used the following packages:
      (#<The LISP package, 1827/3484 internal, 978/1227 external>)
    ("CLX")
    * (package-use-list :xlib)

    (#<The COMMON-LISP package, 0/4 internal, 978/1227 external>)
    * 

Now look at the same sequence on FreeBSD:

    % cmucl-19c/bin/lisp -noinit -nositeinit
    CMU Common Lisp 19c Release (19C), running on lisp.rpw3.org
    With core: /u/rpw3/src/cmd/cmucl-19c/lib/cmucl/lib/lisp.core
    Dumped on: Wed, 2005-11-16 17:18:11-08:00 on snapdragon.csl.sri.com
    See <http://www.cons.org/cmucl/> for support information.
    Loaded subsystems:
	Python 1.1, target Intel x86
	CLOS based on Gerd's PCL 2004/04/14 03:32:47
    * (package-use-list :xlib)

    (#<The COMMON-LISP package, 0/4 internal, 978/1227 external>)
    * (require :clx)

    ; Loading #P"/u/rpw3/src/cmd/cmucl-19c/lib/cmucl/lib/subsystems/clx-library.x86f".
    ("CLX")
    * (package-use-list :xlib)

    (#<The COMMON-LISP package, 0/4 internal, 978/1227 external>)
    * 

Perhaps the current Linux builder(s) & FreeBSD builder(s) could
swap notes and see why the Linux versions have the wrong :USE in the
stub[1] XLIB package. [Compiler environment polluting the compilation
perhaps? And with CMUCL's parthenogenetic reproduction, such pollution
could persist for a *looonng* time... But why just Linux & not FreeBSD?]


-Rob

[1] David asked why this happens at all: The answer is that a couple
    of XLIB symbols -- currently only XLIB::DISPLAY-INPUT-STREAM
    and XLIB:EVENT-LISTEN -- are referenced by some CMUCL extensions
    [but only when CLX is loaded], and are declared during the CMUCL
    build process to avoid compiler warnings about undefined functions
    [see files "cmucl/code/globals.lisp" and "cmucl/tools/setup.lisp"].
    To keep the reader from blowing up on the "XLIB:" package prefix
    in those declarations, there is also a stub DEFPACKAGE "XLIB"
    somewhere in the base build. But the only ones I can find [including
    a MAKE-PACKAGE under a #+BOOTSTRAP in "cmucl/src/tools/clxcom.lisp"]
    all say to (:USE :COMMON-LISP), not (:USE :LISP). Go figure.

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607