Closed ghost closed 2 years ago
Version v1.5.6 doesn't compile anymore due to an update to a dependency (fixed in a636eab). Version v.1.5.7 fixes it, but after some investigation it looks like GHC 9.0.1 had a breaking change (see this). I don't understand the reasoning fully myself, but I am quite surprised that seemingly equivalent programs aren't all valid anymore with this breaking change (???)
Anyway, it looks like the only affected line is line 83 in src/Utils.hs
: lensWithDefault' = lensWithDefault ∘ const
. I don't have GHC 9.0.1 myself, but could you try which of the following changes do compile:
lensWithDefault' x = lensWithDefault (const x)
lensWithDefault' x = lensWithDefault (\_ → x)
I have tried both modifications to line 83:
lensWithDefault' x = lensWithDefault (const x)
Result:
Failed to build keyboard-layout-files-creator-1.5.7.
Build log (
/home/user/.cabal/logs/ghc-9.0.1/keyboard-layout-files-creator-1.5.7-5160acee156172ad4373b00c87b5808156082037b938dd5a27a165720a49d369.log
):
Warning: keyboard-layout-files-creator.cabal:75:39: version operators used. To
use version operators the package needs to specify at least 'cabal-version: >=
1.8'.
Configuring keyboard-layout-files-creator-1.5.7...
Preprocessing executable 'klfc' for keyboard-layout-files-creator-1.5.7..
Building executable 'klfc' for keyboard-layout-files-creator-1.5.7..
[ 1 of 40] Compiling JsonComments ( src/JsonComments.hs, dist/build/klfc/klfc-tmp/JsonComments.dyn_o )
[ 2 of 40] Compiling JsonPretty ( src/JsonPretty.hs, dist/build/klfc/klfc-tmp/JsonPretty.dyn_o )
[ 3 of 40] Compiling Paths_keyboard_layout_files_creator ( dist/build/klfc/autogen/Paths_keyboard_layout_files_creator.hs, dist/build/klfc/klfc-tmp/Paths_keyboard_layout_files_creator.dyn_o )
[ 4 of 40] Compiling Stream ( src/Stream.hs, dist/build/klfc/klfc-tmp/Stream.dyn_o )
[ 5 of 40] Compiling Util ( src/Util.hs, dist/build/klfc/klfc-tmp/Util.dyn_o )
[ 6 of 40] Compiling Permutation ( src/Permutation.hs, dist/build/klfc/klfc-tmp/Permutation.dyn_o )
[ 7 of 40] Compiling Layout.Pos ( src/Layout/Pos.hs, dist/build/klfc/klfc-tmp/Layout/Pos.dyn_o )
[ 8 of 40] Compiling Layout.Mod ( src/Layout/Mod.hs, dist/build/klfc/klfc-tmp/Layout/Mod.dyn_o )
[ 9 of 40] Compiling Layout.DeadKey ( src/Layout/DeadKey.hs, dist/build/klfc/klfc-tmp/Layout/DeadKey.dyn_o )
[10 of 40] Compiling PresetDeadKey ( src/PresetDeadKey.hs, dist/build/klfc/klfc-tmp/PresetDeadKey.dyn_o )
[11 of 40] Compiling Layout.Action ( src/Layout/Action.hs, dist/build/klfc/klfc-tmp/Layout/Action.dyn_o )
[12 of 40] Compiling Filter ( src/Filter.hs, dist/build/klfc/klfc-tmp/Filter.dyn_o )
[13 of 40] Compiling FileType ( src/FileType.hs, dist/build/klfc/klfc-tmp/FileType.dyn_o )
[14 of 40] Compiling WithBar ( src/WithBar.hs, dist/build/klfc/klfc-tmp/WithBar.dyn_o )
[15 of 40] Compiling WithPlus ( src/WithPlus.hs, dist/build/klfc/klfc-tmp/WithPlus.dyn_o )
src/WithPlus.hs:7:7: error:
Ambiguous occurrence ‘singleton’
It could refer to
either ‘BasePrelude.singleton’,
imported from ‘BasePrelude’ at src/WithPlus.hs:12:1-44
(and originally defined in ‘base-4.15.0.0:Data.OldList’)
or ‘WithPlus.singleton’, defined at src/WithPlus.hs:32:1
|
7 | , singleton
| ^^^^^^^^^
cabal: Failed to build keyboard-layout-files-creator-1.5.7. See the build log
above for details.
Seems like compiling Util was successful now.
lensWithDefault' x = lensWithDefault (\_ → x)
(as far as I can see it is the same error message when compiling WithPlus)
Failed to build keyboard-layout-files-creator-1.5.7.
Build log (
/home/user/.cabal/logs/ghc-9.0.1/keyboard-layout-files-creator-1.5.7-c05c0690b0cc2268d937b6df250af65ce8ac1dd6a07bafcc410264ed4292beb1.log
):
Warning: keyboard-layout-files-creator.cabal:75:39: version operators used. To
use version operators the package needs to specify at least 'cabal-version: >=
1.8'.
Configuring keyboard-layout-files-creator-1.5.7...
Preprocessing executable 'klfc' for keyboard-layout-files-creator-1.5.7..
Building executable 'klfc' for keyboard-layout-files-creator-1.5.7..
[ 1 of 40] Compiling JsonComments ( src/JsonComments.hs, dist/build/klfc/klfc-tmp/JsonComments.dyn_o )
[ 2 of 40] Compiling JsonPretty ( src/JsonPretty.hs, dist/build/klfc/klfc-tmp/JsonPretty.dyn_o )
[ 3 of 40] Compiling Paths_keyboard_layout_files_creator ( dist/build/klfc/autogen/Paths_keyboard_layout_files_creator.hs, dist/build/klfc/klfc-tmp/Paths_keyboard_layout_files_creator.dyn_o )
[ 4 of 40] Compiling Stream ( src/Stream.hs, dist/build/klfc/klfc-tmp/Stream.dyn_o )
[ 5 of 40] Compiling Util ( src/Util.hs, dist/build/klfc/klfc-tmp/Util.dyn_o )
[ 6 of 40] Compiling Permutation ( src/Permutation.hs, dist/build/klfc/klfc-tmp/Permutation.dyn_o )
[ 7 of 40] Compiling Layout.Pos ( src/Layout/Pos.hs, dist/build/klfc/klfc-tmp/Layout/Pos.dyn_o )
[ 8 of 40] Compiling Layout.Mod ( src/Layout/Mod.hs, dist/build/klfc/klfc-tmp/Layout/Mod.dyn_o )
[ 9 of 40] Compiling Layout.DeadKey ( src/Layout/DeadKey.hs, dist/build/klfc/klfc-tmp/Layout/DeadKey.dyn_o )
[10 of 40] Compiling PresetDeadKey ( src/PresetDeadKey.hs, dist/build/klfc/klfc-tmp/PresetDeadKey.dyn_o )
[11 of 40] Compiling Layout.Action ( src/Layout/Action.hs, dist/build/klfc/klfc-tmp/Layout/Action.dyn_o )
[12 of 40] Compiling Filter ( src/Filter.hs, dist/build/klfc/klfc-tmp/Filter.dyn_o )
[13 of 40] Compiling FileType ( src/FileType.hs, dist/build/klfc/klfc-tmp/FileType.dyn_o )
[14 of 40] Compiling WithBar ( src/WithBar.hs, dist/build/klfc/klfc-tmp/WithBar.dyn_o )
[15 of 40] Compiling WithPlus ( src/WithPlus.hs, dist/build/klfc/klfc-tmp/WithPlus.dyn_o )
src/WithPlus.hs:7:7: error:
Ambiguous occurrence ‘singleton’
It could refer to
either ‘BasePrelude.singleton’,
imported from ‘BasePrelude’ at src/WithPlus.hs:12:1-44
(and originally defined in ‘base-4.15.0.0:Data.OldList’)
or ‘WithPlus.singleton’, defined at src/WithPlus.hs:32:1
|
7 | , singleton
| ^^^^^^^^^
cabal: Failed to build keyboard-layout-files-creator-1.5.7. See the build log
above for details.
I will attempt to compile it with the latest 8.x ghc, once I figure out how to use ghcup.
I got ghc 8.10.7 from ghcup, successfully compiled klfc, however now I am running into the missing libffi.so.7 (my system only has libffi.so.8 in /usr/lib) error mentioned in #39
Clarification: I used the master branch (reverted the line 83 changes in utils.hs)
The libffi.so.7 error is not present with the latest releases binary. Klfc works perfectly on my system now. Thank you for developing and maintaining this awesome software package!
Cloning the repo, switching to tag v1.5.6 and attempting to build cabal (by running
cabal install
) leads to the following error message:The master branch also fails to compile with the following error message:
possible useful info:
system: manjaro linux, ghc and cabal from the official repos
AUR build of the package
klfc
also fails:cabal: unrecognised command: v1-sandbox (try --help)
The latest binary uploaded to github fails due to libffi.so.7 not being found (system only has version 8).
Edit: I also have the issue described in #39