Hello Robert,

Things are progressing, and the issues I described in the first message
of this thread have been solved.  As I write this, we have support for
CCL, CLISP, and SBCL.  I'm now working on adding support for ECL, but
facing a problem with ASDF output translations being ignored.

The ASDF configuration code [0] generates these output translations:

;; CCL
(((#P"/wrkdirs/usr/ports/devel/cl-asdf-ccl/work/asdf-3.3.7/**/" T)
  (#P"/usr/local/lib/common-lisp/asdf/**/" 
#P"/wrkdirs/usr/ports/devel/cl-asdf-ccl/work/asdf-3.3.7/**/")
  (#P"/root/.cache/common-lisp/ccl-1.13-f98-bsd-x64/**/*.*" T)
  (T #P"/root/.cache/common-lisp/ccl-1.13-f98-bsd-x64/**/*.*")))

;; CLISP
(((#P"/wrkdirs/usr/ports/devel/cl-asdf-clisp/work/asdf-3.3.7/**/" T)
  (#P"/usr/local/lib/common-lisp/asdf/**/" 
#P"/wrkdirs/usr/ports/devel/cl-asdf-clisp/work/asdf-3.3.7/**/")
  (#P"/root/.cache/common-lisp/clisp-2.49.93+-unix-x64/**/*.*" T)
  (T #P"/root/.cache/common-lisp/clisp-2.49.93+-unix-x64/**/*.*")))

;; ecl
(((#P"/wrkdirs/usr/ports/devel/cl-asdf-ecl/work/asdf-3.3.7/**/" T)
  (#P"/usr/local/lib/common-lisp/asdf/**/" 
#P"/wrkdirs/usr/ports/devel/cl-asdf-ecl/work/asdf-3.3.7/**/")
  (#P"/root/.cache/common-lisp/ecl-24.5.10-unknown-bsd-x64/**/*.*" T)
  (#P"SYS:**;*.*.*" T)
  (T #P"/root/.cache/common-lisp/ecl-24.5.10-unknown-bsd-x64/**/*.*")))

;; SBCL
(((#P"/wrkdirs/usr/ports/devel/cl-asdf-sbcl/work/asdf-3.3.7/**/" T)
  (#P"/usr/local/lib/common-lisp/asdf/**/" 
#P"/wrkdirs/usr/ports/devel/cl-asdf-sbcl/work/asdf-3.3.7/**/")
  (#P"/usr/local/lib/sbcl/**/*.*" T)
  (#P"/root/.cache/common-lisp/sbcl-2.5.0-bsd-x64/**/*.*" T)
  (T #P"/root/.cache/common-lisp/sbcl-2.5.0-bsd-x64/**/*.*")))

As you can see, in this particular case, the ASDF package itself is
being built.  For CCL, CLISP, and SBCL, everything works as expected,
and the FASL files are written under /wrkdirs/.  However, when building
packages for ECL, ASDF tries to write the FASL files to
${HOME}/.cache/common-lisp, which fails due to restrictions in our
package-building tool.

I noticed some #+ecl conditions in uiop/lisp-build.lisp, but have not
been able to pinpoint the issue.  The ECL maintainer guessed that ASDF
might fail to write to the expected location because it's trying to
rename files between different mount points when POSIX says it should
copy them.  Our build system does use a few different nullfs mounts from
outside of the isolated build environment (jail) to create a single
mount inside the jail.

Do you have any advice for debugging the issue?

Kind regards,
Joe

P.S. For posterity, below is the solution to the problem I described
with configuration under asdf-output-translations.conf.d/.

On Sun, 2024-12-01 at 15:33, Robert Goldman <rpgold...@sift.info> wrote:
> On 28 Nov 2024, at 19:10, Joseph Mingrone wrote:

>> 2. Configuration Error

>> I manually created a test configuration file at 
>> /etc/common-lisp/asdf-output-translations.conf.d/10-asdf-sbcl.conf, with 
>> this DSL:

>> % cat /etc/common-lisp/asdf-output-translations.conf.d/10-asdf-sbcl.conf
>> (:output-translations
>>  :inherit-configuration
>>  ("/usr/local/lib/common-lisp/asdf/**/" 
>> "/usr/local/lib/common-lisp/asdf/sbclfasl/**/"))

>> However, ASDF reports an error:

>> % sbcl
>> This is SBCL 2.4.10, an implementation of ANSI Common Lisp.
>> More information about SBCL is available at <http://www.sbcl.org/> .

>> SBCL is free software, provided as is, with absolutely no warranty.
>> It is mostly in the public domain; some portions are provided under
>> BSD-style licenses.  See the CREDITS and COPYING files in the
>> distribution for more information.
>> ;;; loading #P"/usr/local/lib/common-lisp/asdf/sbclfasl/build/asdf.fasl"
>> * (asdf:load-system :foo)

>> debugger invoked on a ASDF/OUTPUT-TRANSLATIONS:INVALID-OUTPUT-TRANSLATION in 
>> thread
>> #<THREAD tid=103125 "main thread" RUNNING {1103F50093}>:
>>   Invalid asdf output-translation
>>   (:OUTPUT-TRANSLATIONS :INHERIT-CONFIGURATION
>>    ("/usr/local/lib/common-lisp/asdf/**/"
>>     "/usr/local/lib/common-lisp/asdf/sbclfasl/**/"))
>>   in #P"/etc/common-lisp/asdf-output-translations.conf.d/10-asdf-sbcl.conf"
>>   (will be skipped)

>> Do you know what's wrong with this DSL?

> I do not.  Do you have a backtrace?  I suspect the problem is the
> use of "**", but I'm not sure.

After a brainstorming session with Robert Brown (reb) on
#common-l...@libera.chat and a re-read of the manual, we determined that
what's expected in asdf-output-translations.conf.d/whatever.conf is
different than what's expected in asdf-output-translations.conf. In .d/,
there must only be a set of translation forms like

    ((:home "foo") (:home "bar"))

[0] 
https://github.com/freebsd/freebsd-ports/blob/main/devel/cl-freebsd-asdf-init/files/cl-freebsd-asdf-init.lisp.in#L137-L179
[1] https://github.com/freebsd/freebsd-ports/blob/main/Mk/Uses/cl.mk#L102-L126

Attachment: signature.asc
Description: PGP signature

Reply via email to