Undefined symbol COERCE-NAME in footer.lisp

Bug #1362875 reported by Christian Schafmeister
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
Medium
Unassigned

Bug Description

See summary. I found that COERCE-NAME is called when the default package is the ASDF/FOOTER package but it's defined in the ASDF/FIND-SYSTEM package and not imported into ASDF/FOOTER

Revision history for this message
Faré (fahree) wrote :

Wow. This bug and crept in the 3.1 development in #+ecl support only, that requires , and no one noticed until now! Sorry. ECL isn't as well maintained anymore :-(

Neighbor bug also in #+ecl: when I renamed to register-pre-built-system to register-preloaded-system, this part of the code was never updated.

Robert: are you on it? "Just" add back find-system as dependency to the footer, and rename register-foo... Or I can do it, if you prefer.

Revision history for this message
Faré (fahree) wrote :

Does this fix the issue? Does ASDF now run on Clasp? Can it pass the tests?

make t l=clasp
(after suitably editing the test tools.)

Changed in asdf:
importance: Undecided → Medium
milestone: none → version4
status: New → Confirmed
Revision history for this message
Robert P. Goldman (rpgoldman) wrote : Re: [Bug 1362875] Re: Undefined symbol COERCE-NAME in footer.lisp

Faré wrote:
> Wow. This bug and crept in the 3.1 development in #+ecl support only,
> that requires , and no one noticed until now! Sorry. ECL isn't as well
> maintained anymore :-(
>
> Neighbor bug also in #+ecl: when I renamed to register-pre-built-system
> to register-preloaded-system, this part of the code was never updated.
>
> Robert: are you on it? "Just" add back find-system as dependency to the
> footer, and rename register-foo... Or I can do it, if you prefer.
>

Sure, I'll get it fixed.

Question: how is this to be tested? I keep running all the tests in our
suite: why don't we see this? Is it because it only comes into play when
ASDF is incorporated into the ECL distribution?

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

Also, what is clasp? The only clasp I know of is a solver for answer set programming....

Revision history for this message
Faré (fahree) wrote :

clasp is a new CL implementation based on ECL, with substantial parts translated from C to C++, and using LLVM as a backend.

I'm not sure how to test the bug and its fix, but it looks like it would happen if you try to require a contrib e.g. (require 'defsystem) after you loaded asdf. Now, the require mechanism might be hiding the failure in a handler-foo.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

I'm not finding CLASP through google. "clasp common lisp implementation" finds other CL libraries with that name, but no ECL fork.

Christian, how did you trigger this bug? I think it's fixed, but I don't know how to confirm its existence and check that it's gone away.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

I'll push the fix when additional information has been supplied:

How was the bug triggered? And how can I replicate it?

Changed in asdf:
status: Confirmed → Incomplete
Revision history for this message
Christian Schafmeister (chris-schaf) wrote : Re: [Bug 1362875] Undefined symbol COERCE-NAME in footer.lisp

I COMPILE-FILEd asdf.lisp and loaded the fasl into Clasp and then REQUIREd something else.

Clasp isn’t available yet. I’m waiting for IP lawyers to give the the green light.

Best,

.Chris.

On Aug 29, 2014, at 2:14 PM, Robert P. Goldman <email address hidden> wrote:

> I'll push the fix when additional information has been supplied:
>
> How was the bug triggered? And how can I replicate it?
>
> ** Changed in: asdf
> Status: Confirmed => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1362875
>
> Title:
> Undefined symbol COERCE-NAME in footer.lisp
>
> Status in Another System Definition Facility:
> Incomplete
>
> Bug description:
> See summary. I found that COERCE-NAME is called when the default
> package is the ASDF/FOOTER package but it's defined in the ASDF/FIND-
> SYSTEM package and not imported into ASDF/FOOTER
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/asdf/+bug/1362875/+subscriptions

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

Fare suggests that this bug should be visible in ECL, but I can't replicate it. Or rather, I can't make ECL require anything. But then, I'm not an ECL user, and the ECL documentation does not list any module that I should be able to require. All my attempts to require anything in ECL simply crash, both before and after Fare's patch, with cryptic and garbled error messages.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

This does not seem to be the same bug -- or is it?

> (require :defsystem)
ASDF could not load defsystem because Error while trying to load definition for system defsystem from pathname SYS:DEFSYSTEM.ASD.NEWEST: don't recognize component type NIL.

Condition of type: LOAD-SYSTEM-DEFINITION-ERROR
Error while trying to load definition for system defsystem from pathname SYS:DEFSYSTEM.ASD.NEWEST: ...

Note the garbling because of what looks like nesting of error messages.

There's no package error here, AFAICT, so this looks like a different bug to me.

Revision history for this message
Faré (fahree) wrote :

I investigated a bit, and found that ECL provides a .asd for each of its builtin modules, such that after you load asdf, the first function in ext:*module-provider-functions*, namely ASDF/OPERATE:MODULE-PROVIDE-ASDF, will find the other modules. But if you (pop ext:*module-provider-functions*) this function off and try to e.g. (require :sockets), you'll hit the bug:

Condition of type: UNDEFINED-FUNCTION
The function ASDF/FOOTER::COERCE-NAME is undefined.

Therefore the bug is present on ECL, but hidden by a feature in the common case. It still needs to be fixed.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

OK, I'll check the patched version against this test case and push it.

Thanks.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

Actually, I do not confirm this behavior on ECL 13.5.1 on Mac OS X. Per Christian's instructions, I loaded the fresh ASDF and then I tried to do what you said:

> (load "build/asdf.fas")

#P"/Users/rpg/lisp/asdf/build/asdf.fas"
> (pop ext:*module-provider-functions*)

ASDF/OPERATE:MODULE-PROVIDE-ASDF
> (require :sockets)

("SB-BSD-SOCKETS" "SOCKETS")
> ^D

I agree that there's a bug here and that it should be fixed, but I'm disturbed that I cannot make it appear. What version of ECL are you using?

Revision history for this message
Faré (fahree) wrote :

I just compiled the latest ECL from git master:

ecl -eval '(require :asdf)' -eval '(progn (uiop:writeln (asdf:asdf-version)) (pop ext:*module-provider-functions*) (require :sockets))'
;;; Loading #P"/home/tunes/local/stow/ecl/lib/ecl-13.5.1/asdf.fas"
"3.1.2"
An error occurred during initialization:
The function ASDF/FOOTER::COERCE-NAME is undefined..

Revision history for this message
Faré (fahree) wrote :

I introduced the bug some time between 3.0.3 and 3.1.2:

ecl -eval '(load "build/asdf-3.0.3.lisp")' -eval '(progn (format t "~S~%" (asdf:asdf-version)) (pop ext:*module-provider-functions*) (require :sockets) (uiop:quit))'
;;; Loading "/home/tunes/cl/asdf/build/asdf-3.0.3.lisp"
"3.0.3"

ecl -eval '(load "build/asdf-3.1.2.lisp")' -eval '(progn (format t "~S~%" (asdf:asdf-version)) (pop ext:*module-provider-functions*) (require :sockets) (uiop:quit))'
;;; Loading "/home/tunes/cl/asdf/build/asdf-3.1.2.lisp"
"3.1.2"
An error occurred during initialization:
The function ASDF/FOOTER::COERCE-NAME is undefined..

With my patch, it works:
ecl -eval '(load "build/asdf.lisp")' -eval '(progn (format t "~S~%" (asdf:asdf-version)) (pop ext:*module-provider-functions*) (require :sockets) (uiop:quit))'
;;; Loading "/home/tunes/cl/asdf/build/asdf.lisp"
"3.1.3.5"

...but it doesn't fix a ext:*module-provider-functions* broken by 3.1.2 or 3.1.3:
ecl -eval '(load "build/asdf-3.1.2.lisp")' -eval '(progn (asdf:upgrade-asdf) (format t "~S~%" (asdf:asdf-version)) (pop ext:*module-provider-functions*) (require :sockets) (uiop:quit))'
;;; Loading "/home/tunes/cl/asdf/build/asdf-3.1.2.lisp"
"3.1.3.5"
An error occurred during initialization:
The function #:COERCE-NAME is undefined..

Changed in asdf:
status: Incomplete → Fix Committed
Changed in asdf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.