Bug 253167 - x11-wm/hs-xmonad: example build script faulty
Summary: x11-wm/hs-xmonad: example build script faulty
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-haskell (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-01 16:30 UTC by klmanion
Modified: 2021-03-20 08:24 UTC (History)
1 user (show)

See Also:
arrowd: maintainer-feedback+


Attachments
output of `xmonad --recompile' (431 bytes, text/plain)
2021-02-04 18:54 UTC, klmanion
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description klmanion 2021-02-01 16:30:38 UTC
`/usr/local/share/examples/xmonad/build' does not produce the xmonad-ARCH (xmonad-x86_64-freebsd) executable.  The default ghc build script _will_ successfully do this.

In other words: If a user copies the example build script (as directed by `make install') to their ~/.xmonad directory then the executable emitted will be called `xmonad' and thus `/usr/local/bin/xmonad' will fail upon being called by `startx' (since it can't find xmonad-ARCH).

For more context: https://github.com/xmonad/xmonad/issues/270
Comment 1 commit-hook freebsd_committer 2021-02-01 18:50:40 UTC
A commit references this bug:

Author: arrowd
Date: Mon Feb  1 18:50:33 UTC 2021
New revision: 563606
URL: https://svnweb.freebsd.org/changeset/ports/563606

Log:
  x11-wm/hs-xmonad: Fix the example build script.

  PR:		253167

Changes:
  head/x11-wm/hs-xmonad/Makefile
  head/x11-wm/hs-xmonad/files/example_buildscript
Comment 2 Gleb Popov freebsd_committer 2021-02-01 18:52:25 UTC
Thanks for the report, I think I fixed it. Can you verify, please?
Comment 3 klmanion 2021-02-02 05:01:31 UTC
(In reply to Gleb Popov from comment #2)

On a fresh install with the example build script copied into the ~/.xmonad directory with my own xmonad.hs I receive the messages saying: `No cabal.project file or cabal file matching the default glob './*.cabal' was found.', followed by: `Please create a package description file <pkgname>.cabal or a cabal.project file referencing the packages you want to build'.
Comment 4 Gleb Popov freebsd_committer 2021-02-02 07:49:20 UTC
(In reply to klmanion from comment #3)
Follow instructions in pkg-message, it says that you also should copy an example .cabal file.
Comment 5 klmanion 2021-02-02 12:40:11 UTC
(In reply to Gleb Popov from comment #4)

Sorry about that.  You are correct: This issue is resolved.

Thank you.
Comment 6 klmanion 2021-02-02 12:50:29 UTC
My apologies, I closed this too soon.

The build scripts works well enough to get the xmonad session up and running, but is _still_ not producing the xmonad-ARCH binary.  This makes it impossible for the xmonad.hs to be used as stated in the issue.
Comment 7 Gleb Popov freebsd_committer 2021-02-03 09:33:24 UTC
(In reply to klmanion from comment #6)
I run `~/.xmonad/build foo` and get an executable named foo, so the script seems to work. What exactly doesn't work for you?

Maybe you add some logging to the build to see what's going on? Otherwise, I need concrete steps to reproduce the problem.
Comment 8 klmanion 2021-02-04 18:54:33 UTC
Created attachment 222165 [details]
output of `xmonad --recompile'

output of `xmonad --recompile' while the /usr/local/share/examples/xmonad/build is in the ~/.xmonad directory.
Comment 9 klmanion 2021-02-04 18:56:14 UTC
(In reply to Gleb Popov from comment #7)

I uploaded the output of `xmonad --recompile' is there any other output I can provide?
Comment 10 commit-hook freebsd_committer 2021-02-15 18:26:06 UTC
A commit references this bug:

Author: arrowd
Date: Mon Feb 15 18:25:25 UTC 2021
New revision: 565321
URL: https://svnweb.freebsd.org/changeset/ports/565321

Log:
  x11-wm/hs-xmonad: Improve the sample build script.

  PR:		253167

Changes:
  head/x11-wm/hs-xmonad/Makefile
  head/x11-wm/hs-xmonad/files/example_buildscript
Comment 11 Gleb Popov freebsd_committer 2021-02-15 18:27:37 UTC
I've updated the script again and double-checked that it works for me. Try it out.