Bug 160770 - devel/cl-asdf: does not search subdirs under fasldir
Summary: devel/cl-asdf: does not search subdirs under fasldir
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jimmy Olgeni
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-16 21:30 UTC by h h
Modified: 2011-10-04 22:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description h h 2011-09-16 21:30:09 UTC
After sbcl was updated to 1.0.49 and asdf-binary-locations was removed
fasl ports that byte-compile sources under a subdir no longer pick it up
during runtime.

How-To-Repeat: 1. install devel/cl-trivial-features-sbcl
2. HOME=/var/empty sbcl --noinform
   ;; loading #P"/usr/local/lib/sbcl/asdf/asdf.fasl"
   * (require 'trivial-features)
   ASDF could not load trivial-features because
   can't create directory /var/empty/.cache/.

   debugger invoked on a SB-INT:SIMPLE-FILE-ERROR:
     can't create directory /var/empty/.cache/

   Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

   restarts (invokable by number or by possibly-abbreviated name):
     0: [RETRY	     ] Retry directory creation.
     1: [CONTINUE	     ] Continue as if directory creation was successful.
     2: [TRY-RECOMPILING] Try recompiling tf-sbcl
     3: [RETRY	     ] Retry
                          compiling #<CL-SOURCE-FILE "trivial-features" "src" "tf-sbcl">.
     4: [ACCEPT	     ] Continue, treating
                          compiling #<CL-SOURCE-FILE "trivial-features" "src" "tf-sbcl">
                          as having been successful.
     5: [ABORT	     ] Exit debugger, returning to top level.

   (ENSURE-DIRECTORIES-EXIST
    #P"/var/empty/.cache/common-lisp/sbcl-1.0.49-freebsd-amd64/usr/local/lib/common-lisp/trivial-features/src/tf-sbcl.fasl"
    :VERBOSE
    NIL
    :MODE
    511)
   0] backtrace

   0: (ENSURE-DIRECTORIES-EXIST
       #P"/var/empty/.cache/common-lisp/sbcl-1.0.49-freebsd-amd64/usr/local/lib/common-lisp/trivial-features/src/tf-sbcl.fasl"
       :VERBOSE
       NIL
       :MODE
       511)
   1: ((SB-PCL::FAST-METHOD ASDF:PERFORM :BEFORE
        (ASDF:COMPILE-OP ASDF:SOURCE-FILE))
       #<unavailable argument>
       #<unavailable argument>
       #<ASDF:COMPILE-OP (:VERBOSE NIL) {10029DF1C1}>
       #<ASDF:CL-SOURCE-FILE "trivial-features" "src" "tf-sbcl">)
   2: ((SB-PCL::EMF ASDF:PERFORM)
       #<unavailable argument>
       #<unavailable argument>
       #<ASDF:COMPILE-OP (:VERBOSE NIL) {10029DF1C1}>
       #<ASDF:CL-SOURCE-FILE "trivial-features" "src" "tf-sbcl">)
   3: ((SB-PCL::FAST-METHOD ASDF::PERFORM-WITH-RESTARTS
        (ASDF:COMPILE-OP ASDF:CL-SOURCE-FILE))
       #<unavailable argument>
       #S(SB-PCL::FAST-METHOD-CALL
          :FUNCTION #<FUNCTION #>
          :PV NIL
          :NEXT-METHOD-CALL NIL
          :ARG-INFO (2))
       #<ASDF:COMPILE-OP (:VERBOSE NIL) {10029DF1C1}>
       #<ASDF:CL-SOURCE-FILE "trivial-features" "src" "tf-sbcl">)
   4: ((LAMBDA ()))
   5: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK))
   6: ((FLET SB-C::WITH-IT))
   7: ((SB-PCL::FAST-METHOD ASDF::PERFORM-PLAN (LIST))
       #<unused argument>
       #<unused argument>
       ((#<ASDF:COMPILE-OP (:VERBOSE NIL) {10029DF1C1}>
         . #<ASDF:CL-SOURCE-FILE "trivial-features" "src" "tf-sbcl">)
        (#<ASDF:COMPILE-OP (:VERBOSE NIL) {10029DF1C1}>
         . #<ASDF:MODULE "trivial-features" "src">)
        (#<ASDF:COMPILE-OP (:VERBOSE NIL) {10029DF1C1}>
         . #<ASDF:SYSTEM "trivial-features">)
        (#<ASDF:LOAD-OP (:VERBOSE NIL) {1003450721}>
         . #<ASDF:CL-SOURCE-FILE "trivial-features" "src" "tf-sbcl">)
        (#<ASDF:LOAD-OP (:VERBOSE NIL) {1003450721}>
         . #<ASDF:MODULE "trivial-features" "src">)
        (#<ASDF:LOAD-OP (:VERBOSE NIL) {1003450721}>
         . #<ASDF:SYSTEM "trivial-features">)))
   8: ((LAMBDA ()))
   9: (ASDF::CALL-WITH-SYSTEM-DEFINITIONS #<CLOSURE (LAMBDA #) {100344C909}>)
   10: ((SB-PCL::FAST-METHOD ASDF:OPERATE (T T))
        #<unused argument>
        #<unused argument>
        ASDF:LOAD-OP
        #<ASDF:SYSTEM "trivial-features">
        :VERBOSE
        NIL)
   11: ((SB-PCL::EMF ASDF:OPERATE)
        #<unused argument>
        #<unused argument>
        ASDF:LOAD-OP
        #<ASDF:SYSTEM "trivial-features">
        :VERBOSE
        NIL)
   12: (ASDF::MODULE-PROVIDE-ASDF TRIVIAL-FEATURES)
   13: ((LAMBDA (#:G[REQUIRE]13)) ASDF::MODULE-PROVIDE-ASDF)
   14: (SB-IMPL::%MAP-FOR-EFFECT-ARITY-1
        #<CLOSURE (LAMBDA #) {100338D1F9}>
        (ASDF::MODULE-PROVIDE-ASDF SB-IMPL::MODULE-PROVIDE-CONTRIB))
   15: (REQUIRE TRIVIAL-FEATURES NIL)
   16: (SB-INT:SIMPLE-EVAL-IN-LEXENV (REQUIRE 'TRIVIAL-FEATURES) #<NULL-LEXENV>)
   17: (EVAL (REQUIRE 'TRIVIAL-FEATURES))
   18: (INTERACTIVE-EVAL (REQUIRE 'TRIVIAL-FEATURES) :EVAL NIL)
   19: (SB-IMPL::REPL-FUN NIL)
   20: ((LAMBDA ()))
   21: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {100338C879}>)
   22: (SB-IMPL::TOPLEVEL-REPL NIL)
   23: (SB-IMPL::TOPLEVEL-INIT)
   24: ((FLET #:WITHOUT-INTERRUPTS-BODY-[RESTART-LISP]30))
   25: ((LABELS SB-IMPL::RESTART-LISP))

   0]
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-09-16 21:30:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->olgeni

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Jimmy Olgeni freebsd_committer freebsd_triage 2011-09-18 22:20:30 UTC
Hello,

This is a bit strange as cl-asdf is not supposed to create its own 
cache directory, and "common-lisp/sbcl-1.0.49-freebsd-amd64/..." looks 
like the default mapping.

Are you loading /usr/local/etc/asdf-init.lisp, and if not, could you 
try to load it before requiring 'trivial-features and see what 
happens?

--
jimmy
Comment 3 Jimmy Olgeni freebsd_committer freebsd_triage 2011-09-18 22:21:19 UTC
State Changed
From-To: open->analyzed

Looks like asdf-output-translations is not configured. 
Let's check it out.
Comment 4 h h 2011-09-19 05:16:32 UTC
Jimmy Olgeni <olgeni@FreeBSD.org> writes:

> Hello,
>
> This is a bit strange as cl-asdf is not supposed to create its own
> cache directory, and "common-lisp/sbcl-1.0.49-freebsd-amd64/..." looks
> like the default mapping.
>
> Are you loading /usr/local/etc/asdf-init.lisp, and if not, could you
> try to load it before requiring 'trivial-features and see what
> happens?

I do, it would wouldn't find trivial-features otherwise.

 (load
   (concatenate 'string
     (or (posix-getenv "LOCALBASE") "/usr/local")
     "/etc/asdf-init"))

Here is basically same thing but more explicit     
     
  $ env -i PATH=$PATH HOME=/var/empty command sbcl \
        --noinform --no-sysinit --no-userinit --disable-debugger \
        --eval '(load "/usr/local/etc/asdf-init.lisp" :verbose t :print t)' \
        --eval "(require 'trivial-features)"
  ; loading #P"/usr/local/etc/asdf-init.lisp"
  ; #<PACKAGE "FREEBSD-ASDF">
  ; #<PACKAGE "FREEBSD-ASDF">
  ; *ASDF-PATHNAME*
  ; *SYSTEM-REGISTRY*
  ; UNSUPPORTED-LISP-IMPLEMENTATION
  ; LISP-SPECIFIC-FASL-SUBDIR
  ; GETENV
  ; *ASDF-BINARY-PATHNAME*
  ;; loading #P"/usr/local/lib/sbcl/asdf/asdf.fasl"
  ; T
  ; ("/usr/local/lib/common-lisp/system-registry/")
  ; #<STANDARD-METHOD ASDF:OUTPUT-FILES :AROUND (ASDF:COMPILE-OP
                                                 ASDF:CL-SOURCE-FILE) {10031CC9B1}>
  ; *FREEBSD-OUTPUT-TRANSLATIONS*
  ; (:INHERIT-CONFIGURATION)
  ; NIL
  ; NIL
  ; ((#P"/usr/local/lib/sbcl/**/*.*" T)
     (#P"/usr/local/lib/sbcl/**/" #P"/usr/local/lib/sbcl/**/")
     (#P"/usr/local/lib/common-lisp/trivial-features/sbclfasl/*.*" T)
     (#P"/usr/local/lib/common-lisp/trivial-features/"
      #P"/usr/local/lib/common-lisp/trivial-features/sbclfasl/")
     (#P"/usr/local/lib/common-lisp/system-registry/sbclfasl/*.*" T)
     (#P"/usr/local/lib/common-lisp/system-registry/"
      #P"/usr/local/lib/common-lisp/system-registry/sbclfasl/")
     (#P"/usr/local/lib/common-lisp/asdf/sbclfasl/*.*" T)
     (#P"/usr/local/lib/common-lisp/asdf/"
      #P"/usr/local/lib/common-lisp/asdf/sbclfasl/")
     (#P"/var/empty/.cache/common-lisp/sbcl-1.0.49-freebsd-amd64/**/*.*" T)
     (T #P"/var/empty/.cache/common-lisp/sbcl-1.0.49-freebsd-amd64/**/*.*"))
  ASDF could not load trivial-features because
  can't create directory /var/empty/.cache/.
  [...]

And if I add the subdir explicitly it'd succeed loading trivial-features.

  (push '(#P"/usr/local/lib/common-lisp/trivial-features/src/"
          #P"/usr/local/lib/common-lisp/trivial-features/sbclfasl/src/")
        *freebsd-output-translations*)
Comment 5 Jimmy Olgeni freebsd_committer freebsd_triage 2011-10-02 19:12:05 UTC
Hello,

On Mon, 19 Sep 2011, h h wrote:

> And if I add the subdir explicitly it'd succeed loading trivial-features.
>
>  (push '(#P"/usr/local/lib/common-lisp/trivial-features/src/"
>          #P"/usr/local/lib/common-lisp/trivial-features/sbclfasl/src/")
>        *freebsd-output-translations*)

It turns our that the initial output translation configuration was 
using the old logic (i.e. without :wild-inferiors).

There are still some issues on the clisp side, but sbcl seems ok with 
this. Does this patch work for you?

diff --git a/asdf-init.lisp b/asdf-init.lisp
index 0306df2..a8a6e0e 100644
--- a/asdf-init.lisp
+++ b/asdf-init.lisp
@@ -226,10 +226,13 @@ LISP-SPECIFIC-FASL-SUBDIR as well."
  (pushnew :inherit-configuration *freebsd-output-translations*)

  (dolist (path (directory "/usr/local/lib/common-lisp/*/"))
-  (let ((fasldir (make-pathname 
-		  :directory (append (pathname-directory path)
-				     (list (lisp-specific-fasl-subdir))))))
-    (pushnew (list path fasldir) *freebsd-output-translations*)))
+  (let ((source (make-pathname
+                 :directory (append (pathname-directory path)
+                                    (list :wild-inferiors))))
+        (target (make-pathname
+                 :directory (append (pathname-directory path)
+                                    (list (lisp-specific-fasl-subdir) :wild-inferiors)))))
+    (pushnew (list source target) *freebsd-output-translations*)))

  (if (and (getenv "FBSD_ASDF_COMPILE_PORT")
           (getenv "PORTNAME")
Comment 6 Jimmy Olgeni freebsd_committer freebsd_triage 2011-10-04 21:50:46 UTC
State Changed
From-To: analyzed->closed

My mistake, fixed in asdf-init.lisp 1.13. Good catch :)
Comment 7 dfilter service freebsd_committer freebsd_triage 2011-10-04 21:59:57 UTC
olgeni      2011-10-04 20:50:30 UTC

  FreeBSD ports repository

  Modified files:
    devel/cl-asdf        Makefile 
    devel/cl-asdf/files  asdf-init.lisp 
  Log:
  Use :wild-inferiors when configuring the standard output translation,
  else fasl files in subdirectories would not be found.
  
  PR:             ports/160770 (reported)
  
  Revision  Changes    Path
  1.18      +1 -1      ports/devel/cl-asdf/Makefile
  1.13      +7 -4      ports/devel/cl-asdf/files/asdf-init.lisp
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"