haskell / entropy

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

Build fails with setup segfaults on Mac with M1 processor #78

Closed atwm closed 1 year ago

atwm commented 1 year ago

I am trying to build the entropy package from source using cabal using ghc-9.2.4

cabal build -v                                                                                                                                        main
this build was affected by the following (project) config files:
Build profile: -w ghc-9.2.4 -O1
In order, the following will be built:
 - entropy-0.4.1.10 (lib:entropy) (first run)
creating …/entropy/dist-newstyle/build
creating …/entropy/dist-newstyle/tmp
creating .../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10
creating .../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10/cache
creating .../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10/setup
~/.ghcup/bin/ghc --make -fbuilding-cabal-package -odir .../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10/setup -hidir .../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10/setup -i -i.../entropy/. -optP-include -optP.../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10/setup/setup_macros.h -hide-all-packages -no-user-package-db -package-db ~/.cabal/store/ghc-9.2.4/package.db -package-db .../entropy/dist-newstyle/packagedb/ghc-9.2.4 -package-id Cabal-3.6.3.0 -package-id base-4.16.3.0 -package-id directory-1.3.6.2 -package-id filepath-1.4.2.2 -package-id process-1.6.13.2 .../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10/setup/setup.hs -o .../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10/setup/setup -threaded
…/entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10/setup/setup
configure --verbose=2
--builddir=.../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10
--ghc --prefix=~/.cabal --bindir=/Users/andrew/.cabal/bin
--libdir=~/.cabal/lib/aarch64-osx-ghc-9.2.4/entropy-0.4.1.10-inplace
--libsubdir= --dynlibdir=~/.cabal/lib/aarch64-osx-ghc-9.2.4
--libexecdir=~/.cabal/libexec/aarch64-osx-ghc-9.2.4/entropy-0.4.1.10
--libexecsubdir=
--datadir=~/.cabal/share/aarch64-osx-ghc-9.2.4/entropy-0.4.1.10
--datasubdir=
--docdir=~/.cabal/share/doc/aarch64-osx-ghc-9.2.4/entropy-0.4.1.10
--htmldir=~/.cabal/share/doc/aarch64-osx-ghc-9.2.4/entropy-0.4.1.10/html
--haddockdir=~/.cabal/share/doc/aarch64-osx-ghc-9.2.4/entropy-0.4.1.10/html
--sysconfdir=~/.cabal/etc --enable-library-vanilla
--disable-library-profiling --enable-shared --disable-static
--disable-executable-dynamic --disable-executable-static --disable-profiling
--profiling-detail=default --library-profiling-detail=default
--enable-optimization --disable-debug-info --disable-library-for-ghci
--disable-split-sections --disable-split-objs --disable-executable-stripping
--disable-library-stripping --package-db=clear --package-db=global
--package-db=~/.cabal/store/ghc-9.2.4/package.db
--package-db=.../entropy/dist-newstyle/packagedb/ghc-9.2.4
--flags=-donotgetentropy --ipid=entropy-0.4.1.10-inplace
--extra-prog-path=/Users/andrew/.cabal/bin --dependency=base=base-4.16.3.0
--dependency=bytestring=bytestring-0.11.3.1 --dependency=unix=unix-2.7.2.2
--disable-tests --disable-coverage --exact-configuration --disable-benchmarks
--with-ghc=/Users/andrew/.ghcup/bin/ghc
--with-ghc-pkg=~/.ghcup/ghc/9.2.4/bin/ghc-pkg-9.2.4
--ghc-option=-hide-all-packages

N.B. (I shortended the path in the log for clarity) The actual problem is the setup binary, that segfaults:

.../entropy/dist-newstyle/build/aarch64-osx/ghc-9.2.4/entropy-0.4.1.10/setup/setup configure --verbose=2                      main
[1]    93317 segmentation fault   configure --verbose=2

Anything I can do to debug this?

Thanks

Bodigrim commented 1 year ago

This has probably nothing to do with entropy, it's GHC 9.2.4 incompatible with new macOS. Try GHC 9.2.5.

atwm commented 1 year ago

Ok. I will try 9.2.5. But so far I have not had any issues with 9.2.4 and was able to compile Pandoc and other largish projects without problems