Bug 251602 - x11-wm/stumpwm: there was a problem updating to 20.11
Summary: x11-wm/stumpwm: there was a problem updating to 20.11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Joseph Mingrone
Depends on:
Reported: 2020-12-05 10:46 UTC by Aleksandr Konkov
Modified: 2020-12-07 19:31 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (jrm)

Patch to fix build when stumpwm is already installed (922 bytes, patch)
2020-12-07 15:47 UTC, Joseph Mingrone
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksandr Konkov 2020-12-05 10:46:52 UTC

; wrote /usr/local/lib/common-lisp/stumpwm/sbclfasl/version-tmpOUPE5FSJ.fasl
; compilation finished in 0:00:00.004
; compilation unit finished
;   caught 2 STYLE-WARNING conditions
warning: Symbol unbind not found in package STUMPWM
===>>> Building the port required 6 seconds
===>  Staging for stumpwm-20.11
===>   Generating temporary packing list
install  -m 555 /usr/ports/x11-wm/stumpwm/work/stumpwm /usr/ports/x11-wm/stumpwm/work/stage/usr/local/bin
install  -m 0644 /usr/ports/x11-wm/stumpwm/work/stumpwm-20.11/.dir-locals.el /usr/ports/x11-wm/stumpwm/work/stumpwm-20.11/stumpwm.asd  /usr/ports/x11-wm/stumpwm/work/stumpwm-20.11/*.lisp /usr/ports/x11-wm/stumpwm/work/stage/usr/local/lib/common-lisp/stumpwm
install  -m 0644 /usr/ports/x11-wm/stumpwm/work/stumpwm-20.11/*.fasl /usr/ports/x11-wm/stumpwm/work/stage/usr/local/lib/common-lisp/stumpwm/sbclfasl
install: /usr/ports/x11-wm/stumpwm/work/stumpwm-20.11/*.fasl: No such file or directory
*** Error code 71

make[1]: stopped in /usr/ports/x11-wm/stumpwm
*** Error code 1

make: stopped in /usr/ports/x11-wm/stumpwm

===>>> make stage failed for x11-wm/stumpwm
===>>> Aborting update

===>>> Update for stumpwm-19.11.155_5 failed
===>>> Aborting update
Comment 1 Joseph Mingrone freebsd_committer 2020-12-05 11:19:21 UTC
Thanks for reporting.  I will take a closer look at this later this weekend.  In the meantime, if you want to upgrade right away could you try on of:

- Uninstalling the old stumpwm first (uncertain if this will work, just a hunch)
- Build inside poudriere (confirmed working)
Comment 2 Aleksandr Konkov 2020-12-05 13:15:38 UTC
(In reply to Joseph Mingrone from comment #1)
Joseph Mingrone thank you for your time!

Unfortunately, I don't have poudriere on my notebook - I'm using portmaster:
- svnlite up /usr/ports/
- portmaster --force-config -a

I am ready to uninstall the old version if it definitely helps to solve the problem, because this is my main work notebook.
Comment 3 Joseph Mingrone freebsd_committer 2020-12-07 05:29:54 UTC
I spent lots of time looking into this.  In short, what is happening is that when the stumpwm package is loaded, asdf does output translation [1] and the fasl files are written directly to ${PREFIX}lib/common-lisp/stumpwm/sbclfasl.

I tried a few different approaches like clearing or tinkering with the output translations to try to get them to install to the stage directory, but each strategy introduced new problems.  There is also some documentation on this topic in ${PREFIX}/etc/asdf-init.lisp, which is installed by devel/cl-asdf, but what is documented no longer seems to work.  I've added Jimmy Olgeni, who did lots of work in the past on our cl-* ports in case he has any insights.

In short, I'm fairly confident that a workaround for this problem is to uninstall then build/install the updated port/package.  If you are worried about other potential problems (understandable building on a live system) you could make a backup of the package first or take a snapshot if you're running zfs.

Sorry I don't have a solution.  Let's keep this PR open and I'll keep tinkering with this as time permits.

[1] If you're interested, you can read about asdf's output translation here. 
 I found the documentation difficult to follow.  https://common-lisp.net/project/asdf/asdf/Controlling-where-ASDF-saves-compiled-files.html
Comment 4 Joseph Mingrone freebsd_committer 2020-12-07 15:47:15 UTC
Created attachment 220349 [details]
Patch to fix build when stumpwm is already installed

If you haven't already removed the port and re-installed, could you try this patch?  I think it should fix the problem.
Comment 5 Aleksandr Konkov 2020-12-07 19:10:31 UTC
Unfortunately, I've already updated via uninstall.
You were right - no problem with a clean install.
You can close this bug or leave it open until the next update - at your discretion.
Thank you for your time again!
Comment 6 Joseph Mingrone freebsd_committer 2020-12-07 19:19:50 UTC
I was able to reproduce what you described and my tests show it's fixed, so I'll commit and close this PR.  If you have any other problems, feel free to re-open or open a new PR.

Thanks again for reporting.  It's good to know that there is at least one other user running the StumpWM port/package. :)
Comment 7 commit-hook freebsd_committer 2020-12-07 19:31:15 UTC
A commit references this bug:

Author: jrm
Date: Mon Dec  7 19:31:06 UTC 2020
New revision: 557242
URL: https://svnweb.freebsd.org/changeset/ports/557242

  x11-wm/stumpwm: Fix build when stumpwm is already installed

  When the stumpwm package was already installed and loaded, asdf used output
  translation to write the generated fasl files directly to
  ${PREFIX}lib/common-lisp/stumpwm/sbclfasl.  Use the solution described and
  implemented in ${PREFIX}/etc/asdf-init.lisp (installed by devel/cl-asdf),
  which allows the installed lisp packages to be loaded and the fasl files to
  be written to ${WRKSRC}.

  PR:		251602
  Reported by:	Aleksandr Konkov <konkovaa@hotmail.com>