Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build summoner-2.0.1.1 using cabal #552

Closed
khrynczenko opened this issue Nov 11, 2021 · 2 comments
Closed

Failing to build summoner-2.0.1.1 using cabal #552

khrynczenko opened this issue Nov 11, 2021 · 2 comments
Labels
question Ideas, discussions

Comments

@khrynczenko
Copy link

Hello,
I encounter the following problem when building summoner 2.0.1.1 from sources.

I simply did the following as in the instructions:

cabal get -s summoner
cd summoner
cabal update
cabal install summoner-cli:exe:summon

Below is the failure message.

Failed to build summoner-2.0.1.1.
Build log (
/home/wednesday/.cabal/logs/ghc-8.10.7/summoner-2.0.1.1-c3c1e3401d158075180b440c8e34badfd4b783045aca2430b10b5f677c72a348.log
):
Configuring library for summoner-2.0.1.1..
Warning: Packages using 'cabal-version: >= 1.10' and before 'cabal-version:
3.4' must specify the 'default-language' field for each component (e.g.
Haskell98 or Haskell2010). If a component uses different languages in
different modules then list the other ones in the 'other-languages' field.
Preprocessing library for summoner-2.0.1.1..
Building library for summoner-2.0.1.1..
[ 1 of 24] Compiling Paths_summoner

dist/build/autogen/Paths_summoner.hs:66:22: error:
    • 'last' works with 'NonEmpty', not ordinary lists.
      Possible fix:
          Replace: [Char]
          With:    NonEmpty Char

      However, you can use 'last' with the ordinary lists.
      Apply 'viaNonEmpty' function from relude:
          viaNonEmpty last (yourList)
      Note, that this will return 'Maybe Char'
      therefore it is a safe function unlike 'last' from the standard Prelude
    • In the first argument of ‘isPathSeparator’, namely ‘(last dir)’
      In the expression: isPathSeparator (last dir)
      In a stmt of a pattern guard for
                     an equation for ‘joinFileName’:
        isPathSeparator (last dir)
   |
66 |   | isPathSeparator (last dir) = dir ++ fname
   |                      ^^^^^^^^

<no location info>: warning: [-Wunused-packages]
    The following packages were specified via -package or -package-id flags,
    but were not needed for compilation:
      - validation-selective-0.1.0.1
      - tomland-1.3.3.1
      - time-1.9.3
      - shellmet-0.0.4.0
      - process-1.6.13.2
      - optparse-applicative-0.16.1.0
      - microaeson-0.1.0.0
      - gitrev-1.3.1
      - generic-data-0.8.3.0
      - filepath-1.4.2.1
      - directory-1.3.6.0
      - colourista-0.1.0.1
cabal: Failed to build summoner-2.0.1.1 (which is required by exe:summon from
summoner-2.0.1.1 and exe:gg from summoner-2.0.1.1). See the build log above
for details.

Unfortunately, I am not familiar with Haskell build process and I am not sure how this Paths_summoner.hs file is generated. I would appreciate any help. Something tells me I am doing some obvious mistake.

I used the following ghc and cabal versions.

ghc -V
The Glorious Glasgow Haskell Compilation System, version 8.10.7 (base-4.14.3.0)
cabal -V
cabal-install version 3.6.0.0
compiled using version 3.6.1.0 of the Cabal library

Btw.
I can build the project using stack just fine.

@khrynczenko khrynczenko changed the title Failing to build summoner-2.0.1.1 Failing to build summoner-2.0.1.1 using cabal Nov 11, 2021
@chshersh chshersh added the question Ideas, discussions label Nov 11, 2021
@chshersh
Copy link
Contributor

Hi @khrynczenko 👋🏻

This is an issue with cabal-install. See a similar issue in policeman for more context:

The problem is fixed in the latest cabal-install. So you should be able to build Summoner using cabal-install-3.6.2.0.

@khrynczenko
Copy link
Author

Thanks for the response, good to know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Ideas, discussions
Projects
None yet
Development

No branches or pull requests

2 participants