[Openmcl-devel] Building GSharp (Failure)

Gary Byers gb at clozure.com
Mon Oct 16 08:45:07 UTC 2006



On Sun, 15 Oct 2006, Brent Fulgham wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I get the following error when attempting to build GSharp:
>
> ; registering #<SYSTEM CLX #x8486CEE> as CLX
> ; loading system definition from /opt/local/share/asdf-install/site-
> systems/flexichain.asd into #<Package "ASDF35">
> ; registering #<SYSTEM :FLEXICHAIN #x852D9CE> as FLEXICHAIN
> > Error in process listener(1): Cannot set (FIND-CLASS 'NUMBER)
> because type NUMBER is already defined by DEFTYPE
> > While executing: CCL::SET-FIND-CLASS
> > Type :GO to continue, :POP to abort.
> > If continued: set (FIND-CLASS 'NUMBER) anyway, removing the
> DEFTYPE definition
> Type :? for other options.
> 1 >
>

I checked out the current gsharp sources from CVS.  In that version,
in the file "packages.lisp", it does:

(in-package :gsharp-numbering) ; this package inherits a shadowed
                                ; symbol named "NUMBER"
(deftype number () 'cl:number)
(setf (find-class 'number) (find-class 'cl-number))

The effect of the (SETF FIND-CLASS) is to make the class be the type
associated with the symbol GSHARP-NUMBERING:NUMBER, overriding the
(rather short-lived) DEFTYPE.  The idea behind the CERROR in this
situation is that - in general - changing a type definition in this
way is something that shouldn't be done casually.  (That might be a
little more convincing if there were references to the type - perhaps
TYPEP calls - between the DEFTYPE and the (SETF FIND-CLASS)).  In this
particular case, it barely matters (but so far I haven't seen a reason
for any GSharp package to have shadowed CL:NUMBER in the first place.)

In the general case, suppose that we had:

(deftype foo () '(member 3 7))

(defun foo-p (x) (typep x 'foo))

;[...]

(defclass foo () ())


(a)   (typep 3 'foo) ; "the proper name of a class is a valid type specifier"
(b)   (typep (make-instance 'foo) 'foo)

I tend to believe that (after the DEFCLASS) (a) should return false and (b)
should return true; 3 of 4 other implementations that I tried left the DEFTYPE
in effect and gave results that I don't believe to be correct.  (The other
implentation WARNED about the type redefinition; that might be preferable to
CERRORing, but I don't believe that it's correct to ignore that redefinition.)

One consequence of the redefinition is that (assuming that the DEFTYPE is
invalidated by the class definition) FOO-P may now give unexpected results
(since it was compiled with the obsolete DEFTYPE in effect.)  CERRORing
might be an overreaction, but the next most plausible alternative - WARNing -
often seems like it's saying "It's too late to do anything about it now,
but you may have just unintentionally screwed things up pretty badly.")


> If I allow it to run (via a :GO command) the program compiles but
> doesn't seem functional.

Fascinating as all of the above may (or may not) be, it's not clear how
that (CERRORing on a certain kind of type redefinition) could have had
any effect - negative or otherwise - on functionality.


>
> - -Brent
>
> ================== Complete Log ============================
>
> Welcome to OpenMCL Version 1.0 (DarwinPPC32)!
> ? (asdf-install:install 'gsharp)
> Install where?
> 0) System-wide install:
>    System in /opt/local/share/asdf-install/site-systems/
>    Files in /opt/local/share/asdf-install/site/
> 1) Personal installation:
>    System in /Users/brent/.asdf-install-dir/systems/
>    Files in /Users/brent/.asdf-install-dir/site/
> 2) Abort installation.
> - --> 0
> ;;; ASDF-INSTALL: Downloading 189335 bytes from http://common-
> lisp.net/project/gsharp/gsharp-20060504.tar.gz to GSHARP.asdf-install-
> tmp ...
>
> ;;; ASDF-INSTALL: Installing GSHARP.asdf-install-tmp in /opt/local/
> share/asdf-install/site/, /opt/local/share/asdf-install/site-systems/
> gsharp-20060504/
> gsharp-20060504/beaming.lisp
> gsharp-20060504/INSTALL
> gsharp-20060504/Doc/
> gsharp-20060504/Doc/Makefile
> gsharp-20060504/Doc/accidentals.tex
> gsharp-20060504/Doc/beaming-algo.tex
> gsharp-20060504/Doc/beaming.tex
> gsharp-20060504/Doc/buffer.tex
> gsharp-20060504/Doc/commands.tex
> gsharp-20060504/Doc/gsharp.bib
> gsharp-20060504/Doc/gsharp.tex
> gsharp-20060504/Doc/history.tex
> gsharp-20060504/Doc/intro.tex
> gsharp-20060504/Doc/linebreak.tex
> gsharp-20060504/Doc/model.tex
> gsharp-20060504/Doc/obseq.tex
> gsharp-20060504/Doc/old-beaming.tex
> gsharp-20060504/Doc/plans.tex
> gsharp-20060504/Doc/release-notes.tex
> gsharp-20060504/Doc/spec-macros.tex
> gsharp-20060504/Doc/strip-dependence
> gsharp-20060504/Doc/tex-dependencies
> gsharp-20060504/buffer.lisp
> gsharp-20060504/charmap.lisp
> gsharp-20060504/clim-patches.lisp
> gsharp-20060504/cursor.lisp
> gsharp-20060504/drawing.lisp
> gsharp-20060504/elasticity.lisp
> gsharp-20060504/gf.lisp
> gsharp-20060504/glyphs.lisp
> gsharp-20060504/gsharp.asd
> gsharp-20060504/gui.lisp
> gsharp-20060504/input-state.lisp
> gsharp-20060504/measure.lisp
> gsharp-20060504/midi.lisp
> gsharp-20060504/modes.lisp
> gsharp-20060504/numbering.lisp
> gsharp-20060504/packages.lisp
> gsharp-20060504/play.lisp
> gsharp-20060504/postscript.lisp
> gsharp-20060504/score-pane.lisp
> gsharp-20060504/sdl.lisp
> gsharp-20060504/sequence-dico.lisp
> gsharp-20060504/utilities.lisp
> gsharp-20060504/Fonts/
> gsharp-20060504/Fonts/Makefile
> gsharp-20060504/Fonts/accents.mf
> gsharp-20060504/Fonts/accidentals.mf
> gsharp-20060504/Fonts/beams.mf
> gsharp-20060504/Fonts/c_clef.mf
> gsharp-20060504/Fonts/charmap.mf
> gsharp-20060504/Fonts/clefs.mf
> gsharp-20060504/Fonts/dot.mf
> gsharp-20060504/Fonts/double-flat.mf
> gsharp-20060504/Fonts/double-sharp.mf
> gsharp-20060504/Fonts/eighth_rest.mf
> gsharp-20060504/Fonts/f_clef.mf
> gsharp-20060504/Fonts/flags.mf
> gsharp-20060504/Fonts/flat.mf
> gsharp-20060504/Fonts/g_clef.mf
> gsharp-20060504/Fonts/half_rest.mf
> gsharp-20060504/Fonts/macros.mf
> gsharp-20060504/Fonts/natural.mf
> gsharp-20060504/Fonts/noteheads.mf
> gsharp-20060504/Fonts/quarter_rest.mf
> gsharp-20060504/Fonts/rests.mf
> gsharp-20060504/Fonts/sdl.mf
> gsharp-20060504/Fonts/sharp.mf
> gsharp-20060504/Fonts/ties.mf
> gsharp-20060504/Fonts/viewer.lisp
> gsharp-20060504/Fonts/whole_rest.mf
> gsharp-20060504/Obseq/
> gsharp-20060504/Obseq/obseq.lisp
> gsharp-20060504/Scores/
> gsharp-20060504/Scores/alundavisan.gsh
> gsharp-20060504/Scores/bach181-lyrics.gsh
> gsharp-20060504/Scores/bach181.gsh
> gsharp-20060504/Scores/bach262.gsh
> gsharp-20060504/Scores/blomsteroffret.gsh
> gsharp-20060504/Scores/clusters.gsh
> gsharp-20060504/Scores/fiji.gsh
> gsharp-20060504/Scores/rapsoden-sjunger.gsh
> gsharp-20060504/Scores/smaland.gsh
> gsharp-20060504/Scores/spacetest.gsh
> gsharp-20060504/Scores/stuff.gsh
> gsharp-20060504/Scores/tomtegubbar.gsh
> gsharp-20060504/Scores/vinter-adjo.gsh
>
> #P"/opt/local/share/asdf-install/site/gsharp-20060504/"
> #P"/opt/local/share/asdf-install/site/gsharp-20060504/" ;;; ASDF-
> INSTALL: Loading system "gsharp" via ASDF.
> ; loading system definition from /opt/local/share/asdf-install/site-
> systems/gsharp.asd into #<Package "ASDF5">
> ; registering #<SYSTEM :GSHARP #x8449736> as GSHARP
> ; loading system definition from /opt/local/share/asdf-install/site-
> systems/esa.asd into #<Package "ASDF17">
> ; registering #<SYSTEM :ESA #x845AF7E> as ESA
> ; loading system definition from /opt/local/share/asdf-install/site-
> systems/mcclim.asd into #<Package "ASDF18">
> ; registering #<SYSTEM :CLIM-LISP #x846A07E> as CLIM-LISP
> ; registering #<SYSTEM :CLIM-CORE #x8462DCE> as CLIM-CORE
> ; registering #<SYSTEM :GOATEE-CORE #x847573E> as GOATEE-CORE
> ; registering #<SYSTEM :CLIM-POSTSCRIPT #x848D546> as CLIM-POSTSCRIPT
> ; registering #<SYSTEM :CLIM #x84855BE> as CLIM
> ; registering #<SYSTEM :CLIM-CLX #x849A806> as CLIM-CLX
> ; registering #<SYSTEM :CLIM-NULL #x8493456> as CLIM-NULL
> ; registering #<SYSTEM :CLIM-OPENGL #x84ABFE6> as CLIM-OPENGL
> ; registering #<SYSTEM :CLIM-LOOKS #x84A5A66> as CLIM-LOOKS
> ; registering #<SYSTEM :CLIM-CLX-USER #x84A14EE> as CLIM-CLX-USER
> ; registering #<SYSTEM :CLIM-EXAMPLES #x84BD07E> as CLIM-EXAMPLES
> ; registering #<SYSTEM :SCIGRAPH #x84CCCFE> as SCIGRAPH
> ; registering #<SYSTEM :CLIM-LISTENER #x84D8EFE> as CLIM-LISTENER
> ; registering #<SYSTEM :MCCLIM #x84D273E> as MCCLIM
> ; loading system definition from /opt/local/share/asdf-install/site-
> systems/spatial-trees.asd into #<Package "ASDF32">
> ; registering #<SYSTEM :SPATIAL-TREES #x84E243E> as SPATIAL-TREES
> ; loading system definition from /opt/local/share/asdf-install/site-
> systems/clx.asd into #<Package "ASDF33">
> ; registering #<SYSTEM CLX #x8486CEE> as CLX
> ; loading system definition from /opt/local/share/asdf-install/site-
> systems/flexichain.asd into #<Package "ASDF35">
> ; registering #<SYSTEM :FLEXICHAIN #x852D9CE> as FLEXICHAIN
> > Error in process listener(1): Cannot set (FIND-CLASS 'NUMBER)
> because type NUMBER is already defined by DEFTYPE
> > While executing: CCL::SET-FIND-CLASS
> > Type :GO to continue, :POP to abort.
> > If continued: set (FIND-CLASS 'NUMBER) anyway, removing the
> DEFTYPE definition
> Type :? for other options.
> 1 > :B
> (F01359F0) : 0 "CCL::SET-FIND-CLASS" 400
> (F0135A00) : 1 NIL NIL
> (F0135A10) : 2 "Anonymous Function #x8C74526" 44
> (F0135A20) : 3 "Anonymous Function #x80279BE" 48
> (F0135A30) : 4 "CCL::%FASLOAD" 856
> (F0135A50) : 5 NIL NIL
> (F0135A60) : 6 "CCL::ATTEMPT-LOAD" 44
> (F0135A70) : 7 "CCL::%LOAD" 1160
> (F0135A90) : 8 NIL NIL
> (F0135AA0) : 9 "LOAD" 652
> (F0135AC0) : 10 "#<STANDARD-METHOD ASDF:PERFORM (ASDF:LOAD-OP ASDF:CL-
> SOURCE-FILE)>" 168
> (F0135AD0) : 11 NIL NIL
> (F0135AE0) : 12 "CCL::%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE" 616
> (F0135AF0) : 13 NIL NIL
> (F0135B00) : 14 "CCL::%%STANDARD-COMBINED-METHOD-DCODE" 148
> (F0135B10) : 15 NIL NIL
> (F0135B20) : 16 "ASDF:OPERATE" 796
> (F0135B40) : 17 NIL NIL
> (F0135B50) : 18 "ASDF-INSTALL::ONE-ITER" 964
> (F0135B70) : 19 NIL NIL
> (F0135B80) : 20 "ASDF-INSTALL:INSTALL" 1352
> (F0135BA0) : 21 NIL NIL
> (F0135BB0) : 22 "CCL::CALL-CHECK-REGS" 72
> (F0135BC0) : 23 NIL NIL
> (F0135BD0) : 24 "CCL::TOPLEVEL-EVAL" 152
> (F0135BE0) : 25 "CCL::READ-LOOP" 848
> (F0135C20) : 26 "CCL:TOPLEVEL-LOOP" 88
> (F0135C40) : 27 "Anonymous Function #x80D6886" 68
> (F0135C50) : 28 NIL NIL
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Darwin)
>
> iD8DBQFFMx+VzGDdrzfvUpURAlEmAJ9/vMuM3YnBDdOYqkkp0hBvtOhkVwCfXLbD
> LoGQl9iXhn2LI+jqsgxAL8U=
> =4XQT
> -----END PGP SIGNATURE-----
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list