unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Guillaume Le Vaillant <glv@posteo.net>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: help-guix@gnu.org
Subject: Re: Problems with McCLIM (Common Lisp)
Date: Thu, 13 Aug 2020 11:08:16 +0200	[thread overview]
Message-ID: <875z9mvrpb.fsf@yamatai> (raw)
In-Reply-To: <87bljfxbgn.fsf@ambrevar.xyz>

[-- Attachment #1: Type: text/plain, Size: 4824 bytes --]


Hi,

Ricardo Wurmus <rekado@elephly.net> skribis:

> I’d like to play with McCLIM, but I don’t know enough about Common Lisp
> to understand how to launch the examples.

When I packaged McCLIM, I only made the packages for the main McCLIM
library. IIRC the examples also use some extra extensions that I have
not packaged, so they might not work out of the box (even if the error
with mcclim-layouts/tab had not happened).

> Here’s what I’ve done:
>
>     guix install sbcl sbcl-mcclim sbcl-slime-swank
>
> This is the first question, actually: if I don’t manually install
> sbcl-slime-swank I get errors complaining about swank being absent.
> Should sbcl-mcclim propagate sbcl-slime-swank?

sbcl-slime-swank is actually an alias for cl-slime-swank because,
according to a comment in lisp-xyz.scm, "SLIME does not have a ASDF
system definition to build all of Swank". So in fact there is no
pre-compiled package for Swank, and this is why it needs to be 
available to packages that depend on it (directly or indirectly) so that
they can compile it before using it.


Pierre Neidhardt <mail@ambrevar.xyz> skribis:

> Hi Ricardo,
> [...]
>> Then I tried
>>
>>     (require :clim-examples)
>>
>> but it fails with “Don't know how to REQUIRE CLIM-EXAMPLES.”.  So I
>> loaded the asd file manually:
>>
>>     (load "/home/rekado/.guix-profile/share/common-lisp/sbcl-source/mcclim/Examples/clim-examples.asd")
>
> Only the .asd files in the well known locations are recognized by ASDF
> if I'm not mistaken.
>
> Note that an .asd can forward to another.  So here the problem seems to
> be with the main McCLIM .asd file.  This could be a Guix problem, see below.
>
>> Now at least clim-examples appears to be found:
>>
>>    (asdf:load-system "clim-examples")
>>
>> This fails with this error:
>>
>> --8<---------------cut here---------------start------------->8---
>> debugger invoked on a ASDF/FIND-COMPONENT:MISSING-DEPENDENCY in thread
>> #<THREAD "main thread" RUNNING {10009C8083}>:
>>   Component #:MCCLIM-LAYOUTS/TAB not found, required by
>>   #<SYSTEM "clim-examples">
>> --8<---------------cut here---------------end--------------->8---
>>
>> I see that “lib/sbcl/mcclim-layouts-tab.asd” exists, but loading it
>> doesn’t help.
>
> What's the error then?
>
> Try
>
> --8<---------------cut here---------------start------------->8---
> (asdf:locate-system :mcclim-layouts/tab)
> --8<---------------cut here---------------end--------------->8---
>
> It will tell you where the system is.
> If it does not find it, it means the .asd file did not do  the job.

The SBCL build system currently doesn't accept pre-compiled sbcl-*
packages having a slash in their name. Slashes are replaced with
hyphens, and the ASDF system name for the pre-compiled package for
"mcclim-layouts/tab" is in fact "mcclim-layouts-tab". Some package
definitions have a phase changing slashes to hyphens in asd files when
necessary (see for example the package definition for
sbcl-mcclim-extensions), however the asd files in
"share/common-lisp/sbcl-source/mcclim/" still use the system names with
slashes, this is why when loading the "clim-examples.asd" file by hand
you get an error saying that "mcclim-layouts/tab" would not be found.

> With all that said, here comes the most important piece of information:
> our SBCL build system has some serious flaws, most importantly because
> it _rewrites_ the .asd files.  This could be why the examples cannot be
> found or why mcclim-layouts/tab causes problem.
>
> Personally I've stopped using sbcl- packages altogether.  I'm not
> exclusively using cl-* packages.  The drawback is that the .fasl must be
> built the first time, but then you get the smoothest experience just
> like with Quicklisp.
>
> The only exception to this, in my experience, is Osicat (the POSIX
> library): the cl-* version does not work but that's an upstream issue.
> For this one I use sbcl-osicat.
>
> Hope that helps! :)

I agree that the asdf-build-system could need an overhaul.

Currently the sbcl-xxx package is the base definition and the cl-xxx and
ecl-xxx packages are derived from it, I think it would make more sense
make cl-xxx the base definition and derive sbcl-xxx and ecl-xxx from it.

The "deliver-asd" operation has been fixed in recent versions of ASDF,
so maybe it would be possible to use it instead of our home-made
functions to create asd files for the bundles.

Another approach could be not to use ASDF bundles at all, and just use
the regular compilation operation of ASDF, except the fasl files would
be put it "/gnu/store/..." instead of "$HOME/.cache/common-lisp/...",
and our asdf-build-system would indicate to ASDF where to search for the
files.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2020-08-13  9:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13  2:43 Problems with McCLIM (Common Lisp) Ricardo Wurmus
2020-08-13  7:16 ` Pierre Neidhardt
2020-08-13  9:08   ` Guillaume Le Vaillant [this message]
2020-09-04 16:37     ` Ricardo Wurmus
2020-09-05  6:57       ` Pierre Neidhardt
2020-09-05  7:20         ` Ricardo Wurmus
2020-09-05  9:49           ` Guillaume Le Vaillant
2020-09-05 17:52         ` Konrad Hinsen
2020-09-06  7:07           ` Pierre Neidhardt
2020-09-11 14:19             ` Katherine Cox-Buday
2020-09-11 14:40               ` Pierre Neidhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875z9mvrpb.fsf@yamatai \
    --to=glv@posteo.net \
    --cc=help-guix@gnu.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).