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

can't install QuickCheck #7892

Closed
k1dkupi opened this issue Jan 3, 2022 · 9 comments
Closed

can't install QuickCheck #7892

k1dkupi opened this issue Jan 3, 2022 · 9 comments

Comments

@k1dkupi
Copy link

k1dkupi commented Jan 3, 2022

Hello,
I am new to Haskell and I I somehow can't install QuickCheck.
I installed Haskell by running:

curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

in a Terminal and then I tried:

cabal install --lib QuickCheck

but it doesn't work and I get back the following:

tommy@NAT-INSIDE-192-168-209-162 ~ % cabal install --lib QuickCheck
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):

  • splitmix-0.1.0.4 (lib) (requires build)
  • random-1.2.1 (lib) (requires build)
  • QuickCheck-2.14.2 (lib) (requires build)
    Starting splitmix-0.1.0.4 (lib)
    Building splitmix-0.1.0.4 (lib)

Failed to build splitmix-0.1.0.4.
Build log ( /Users/tommy/.cabal/logs/ghc-8.10.7/spltmx-0.1.0.4-a1adbba1.log ):
Configuring library for splitmix-0.1.0.4..
Preprocessing library for splitmix-0.1.0.4..
Building library for splitmix-0.1.0.4..

: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [9 and 13)

: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [9 and 13)

: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [9 and 13)

: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [9 and 13)
[1 of 4] Compiling Data.Bits.Compat ( src-compat/Data/Bits/Compat.hs, dist/build/Data/Bits/Compat.o, dist/build/Data/Bits/Compat.dyn_o )

: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM between [9 and 13)
ghc: could not execute: opt
cabal: Failed to build splitmix-0.1.0.4 (which is required by
QuickCheck-2.14.2). See the build log above for details.

I sadly have no idea what any of this means, I tried somehow installing LLVM by running:

cabal install --lib llvm

but that doesn't work either. I googled the issue and I think (?) I have installed home-brew and LLVM but the issue is still there so I really don't know what to do here :(

@Bodigrim
Copy link
Collaborator

Bodigrim commented Jan 3, 2022

This is not a proper solution, but try ghcup install ghc --set 9.2?

@k1dkupi
Copy link
Author

k1dkupi commented Jan 3, 2022

This is not a proper solution, but try ghcup install ghc --set 9.2?

I did this, it was successful and then tried cabal install --lib QuickCheck but got another, different error:

tommy@NAT-INSIDE-192-168-209-162 ~ % cabal install --lib QuickCheck
Resolving dependencies...
Build profile: -w ghc-9.2.1 -O1
In order, the following will be built (use -v for more details):

  • splitmix-0.1.0.4 (lib) (requires build)
  • random-1.2.1 (lib) (requires build)
  • QuickCheck-2.14.2 (lib) (requires build)
    Starting splitmix-0.1.0.4 (lib)
    Building splitmix-0.1.0.4 (lib)

Failed to build splitmix-0.1.0.4.
Build log ( /Users/tommy/.cabal/logs/ghc-9.2.1/spltmx-0.1.0.4-ec20a790.log ):
Configuring library for splitmix-0.1.0.4..
Preprocessing library for splitmix-0.1.0.4..
Building library for splitmix-0.1.0.4..
[1 of 4] Compiling Data.Bits.Compat ( src-compat/Data/Bits/Compat.hs, dist/build/Data/Bits/Compat.o, dist/build/Data/Bits/Compat.dyn_o )
[2 of 4] Compiling System.Random.SplitMix.Init ( src/System/Random/SplitMix/Init.hs, dist/build/System/Random/SplitMix/Init.o, dist/build/System/Random/SplitMix/Init.dyn_o )

In file included from /var/folders/zj/_cwlvkvx10l2sb75x304pyl80000gn/T/ghc9648_0/ghc_16.c:4:0: error:

In file included from /Users/tommy/.ghcup/ghc/9.2.1/lib/ghc-9.2.1/lib/../lib/aarch64-osx-ghc-9.2.1/rts-1.0.2/include/ffi.h:66:0: error:

/Users/tommy/.ghcup/ghc/9.2.1/lib/ghc-9.2.1/lib/../lib/aarch64-osx-ghc-9.2.1/rts-1.0.2/include/ffitarget.h:6:10: error:
fatal error: 'ffitarget_arm64.h' file not found
|
6 | #include "ffitarget_arm64.h"
| ^
#include "ffitarget_arm64.h"
^~~~~~~~~~~~~~~~~~~
1 error generated.
gcc' failed in phase C Compiler'. (Exit code: 1)
cabal: Failed to build splitmix-0.1.0.4 (which is required by
QuickCheck-2.14.2). See the build log above for details.

@Bodigrim
Copy link
Collaborator

Bodigrim commented Jan 3, 2022

Ah, I see. Back to ghc-8.10.7, did you try brew install llvm?

@Bodigrim
Copy link
Collaborator

Bodigrim commented Jan 3, 2022

Alternatively, with ghc-9.2.1 please try solutions from https://gitlab.haskell.org/ghc/ghc/-/issues/20592#note_391266

@jneira
Copy link
Member

jneira commented Jan 3, 2022

@k1dkupi hi, thanks for your bug report. Afaics the problem is not directly related with cabal but it is ok to open the issue here as you have experienced it through cabal.

@gbaz
Copy link
Collaborator

gbaz commented Jan 3, 2022

jneria: i really think we should close this ticket. its definitely a problem with the arch and environment etc and not cabal. Its fine to help, but leaving open tickets that are not cabal related will clutter our already cluttered tracker too much.

@Mikolaj
Copy link
Member

Mikolaj commented Jan 4, 2022

@k1dkupi: feel free to report how it goes and ask more questions. You may also find some help on #haskell Matrix/IRC and similar. @gbaz is right, most of the people reading this tracker don't have any intimate knowledge of GHC vs OS/ARCH troubleshooting, so probably you'd need to go for numbers in the hope somebody had the same problem as you do. And numbers are on IRC, etc.

@tomjaguarpaw
Copy link
Member

tomjaguarpaw commented Jan 4, 2022

Whilst we're using this issue tracker for general comments ... we really need a diagnostic tool that says

User was running
* cabal version 3.X
* ghc version 9.Y
* obtained by ghcup version Z
* architecture NetLinuxOS i286
* operating system DebHat Harried Maintainer 6.66

otherwise support volunteers have quite a burden even working out what could possibly be the cause. Perhaps such a diagnostic tool could be built into ghcup.

@Mikolaj
Copy link
Member

Mikolaj commented Jan 4, 2022

The issue template actually requests a bit of that info, but it's not as detailed (not trustworthy if it doesn't come from, e.g., ghcup) and the only template is "bug", so not all reporters feel like accusing and triggering a maintainer.

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

No branches or pull requests

6 participants