haskell / entropy

Easy entropy source for Haskell users.
Other
24 stars 49 forks source link

build error #75

Closed daleiz closed 2 years ago

daleiz commented 2 years ago

Error Info

cbits/random_initialized.c:9:9: error:
     error: macro names must be identifiers
        9 | #ifndef !DO_NOT_USE_GET_ENTROPY
          |         ^
  |
9 | #ifndef !DO_NOT_USE_GET_ENTROPY
  |         ^
cbits/random_initialized.c: In function ‘ensure_pool_initialized’:

cbits/random_initialized.c:51:9: error:
     error: macro names must be identifiers
       51 | #ifndef !DO_NOT_USE_GET_ENTROPY
          |         ^
   |
51 | #ifndef !DO_NOT_USE_GET_ENTROPY
   |         ^
`gcc' failed in phase `C Compiler'. (Exit code: 1)

Env

tjdett commented 2 years ago

I had similar issues with:

If my experience is anything to go by, this has broken the first method of compiling HLS from source with GHCup: https://www.haskell.org/ghcup/guide/#hls

On Alpine, there's no HLS bindist, so the workaround I found was to use --source-dist with GHCup. It used entropy-0.4.1.7, which is from late last year and before the first version of the problematic #ifndef was added to the codebase.

tfausak commented 2 years ago

I'm also seeing this on Ubuntu 22.04 with GHC 9.4 and Clang.

https://github.com/tfausak/monadoc/runs/7951168911?check_suite_focus=true#step:17:42

moy-kusanagi commented 2 years ago

Same here: Linux Lite 5.8 gcc 9.4 ghc 9.2.2