tweag / ormolu

A formatter for Haskell source code
https://ormolu-live.tweag.io
Other
952 stars 83 forks source link

Bug: Ormolu/Fixity.hs takes an exceedingly long time to compile; build segfaults on macOS aarch64 #927

Closed lf- closed 1 year ago

lf- commented 1 year ago

Describe the bug

Refiled from https://github.com/fourmolu/fourmolu/issues/238

Build segfaults on macOS aarch64 building under nix.

My inference is that the linker segfault is caused by Ormolu.Fixity containing the large thing that is also causing it to take a long time to compile.

Glancing at the file, it seems that it is parsing a particularly large JSON file then directly lifting that in TH. This is undoubtedly what's taking a long time. I think that perhaps a better idea is to parse it at runtime from a ByteString embedded in the executable.

To Reproduce

nix-build -E 'with import (fetchTarball {  url = "https://github.com/nixos/nixpkgs/archive/b677244af670cb939bdd046898031188bd6ca096.tar.gz";  sha256 = "sha256-QVPex46eWqMs2xog2+JYjlvI24SZuP+3+LX/0neax1k=";  name = "source"; }) {}; haskell.packages.ghc924.fourmolu'
Build log ``` @nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" } setupCompilerEnvironmentPhase Build with /nix/store/rq59lz1dv0nb1qdic4yalfgpgbsx3v63-ghc-9.2.4. @nix { "action": "setPhase", "phase": "unpackPhase" } unpacking sources unpacking source archive /nix/store/25dxzsb36n96ibm6c9lbagvswxw6l95w-ormolu-0.5.0.1.tar.gz source root is ormolu-0.5.0.1 setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file ormolu-0.5.0.1/tests/Spec.hs @nix { "action": "setPhase", "phase": "patchPhase" } patching sources @nix { "action": "setPhase", "phase": "compileBuildDriverPhase" } compileBuildDriverPhase setupCompileFlags: -package-db=/private/tmp/nix-build-ormolu-0.5.0.1.drv-0/tmp.2Dy6m1Zsa7/setup-package.conf.d -j10 -threaded -rtsopts [1 of 1] Compiling Main ( Setup.hs, /private/tmp/nix-build-ormolu-0.5.0.1.drv-0/tmp.2Dy6m1Zsa7/Main.o ) Linking Setup ... @nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } updateAutotoolsGnuConfigScriptsPhase @nix { "action": "setPhase", "phase": "configurePhase" } configuring configureFlags: --verbose --prefix=/nix/store/m067avdxq2p81bjklnmwrwbyb4lhdf3m-ormolu-0.5.0.1 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/kss6767s0zlnq30lb9niwwd74k8dwjja-ormolu-0.5.0.1-doc/share/doc/ormolu-0.5.0.1 --with-gcc=clang --package-db=/private/tmp/nix-build-ormolu-0.5.0.1.drv-0/tmp.2Dy6m1Zsa7/package.conf.d --ghc-options=-j10 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --ghc-options=-haddock --extra-lib-dirs=/nix/store/9nhwj9wv8nq8rfks1fvyly7ad5sfhpl2-ncurses-6.3-p20220507/lib --extra-lib-dirs=/nix/store/kqy1mi2w8xxk8rw7y9gjb5fawxzqxgfq-libffi-3.4.2/lib --extra-lib-dirs=/nix/store/g02fr28qj9s3pig8d4nw0hbzyfri53as-gmp-with-cxx-6.2.1/lib --extra-include-dirs=/nix/store/qkgjp5cdkapk47hnq2cv2ls95nfrckhw-libiconv-50/include --extra-lib-dirs=/nix/store/qkgjp5cdkapk47hnq2cv2ls95nfrckhw-libiconv-50/lib --extra-include-dirs=/nix/store/10gwbik9qyh8dfv39mgrkl3wf62gk31z-libcxx-11.1.0-dev/include --extra-lib-dirs=/nix/store/2bylcyd4g4c4vdvra5swnzgxcn0lq10g-libcxx-11.1.0/lib --extra-include-dirs=/nix/store/bafjjbpxgcl1g8ivqg2ahhfc710nggn9-libcxxabi-11.1.0-dev/include --extra-lib-dirs=/nix/store/xr8cbjdng9k5wdyzgw7ngq25im2c8xwy-libcxxabi-11.1.0/lib --extra-lib-dirs=/nix/store/b7ydlc7fafpslc15nfv0gpp27lrhs8id-compiler-rt-libc-11.1.0/lib --extra-framework-dirs=/nix/store/ba1z2grzjm12bm7bvcjxrqgj8x2adqra-apple-framework-CoreFoundation-11.0.0/Library/Frameworks --extra-include-dirs=/nix/store/3ksdgz9fxpbjj5r8ipwhcg1dg44dqfgq-libobjc-11.0.0/include --extra-lib-dirs=/nix/store/3ksdgz9fxpbjj5r8ipwhcg1dg44dqfgq-libobjc-11.0.0/lib Using Parsec parser Configuring ormolu-0.5.0.1... Flags chosen: dev=False, fixity-th=True Dependency Cabal >=3.6 && <3.7: using Cabal-3.6.3.0 Dependency Diff >=0.4 && <1.0: using Diff-0.4.1 Dependency MemoTrie >=0.6 && <0.7: using MemoTrie-0.6.10 Dependency aeson >=1.0 && <3.0: using aeson-2.0.3.0 Dependency ansi-terminal >=0.10 && <1.0: using ansi-terminal-0.11.3 Dependency array >=0.5 && <0.6: using array-0.5.4.0 Dependency base >=4.14 && <5.0: using base-4.16.3.0 Dependency bytestring >=0.2 && <0.12: using bytestring-0.11.3.1 Dependency containers >=0.5 && <0.7: using containers-0.6.5.1 Dependency directory >=1.3 && <1.4: using directory-1.3.6.2 Dependency dlist >=0.8 && <2.0: using dlist-1.0 Dependency exceptions >=0.6 && <0.11: using exceptions-0.10.4 Dependency filepath >=1.2 && <1.5: using filepath-1.4.2.2 Dependency ghc-lib-parser >=9.2 && <9.3: using ghc-lib-parser-9.2.4.20220729 Dependency megaparsec >=9.0: using megaparsec-9.2.2 Dependency mtl >=2.0 && <3.0: using mtl-2.2.2 Dependency syb >=0.7 && <0.8: using syb-0.7.2.2 Dependency template-haskell: using template-haskell-2.18.0.0 Dependency text >=0.2 && <3.0: using text-1.2.5.0 Dependency th-lift-instances >=0.1 && <0.2: using th-lift-instances-0.1.20 Dependency base >=4.12 && <5.0: using base-4.16.3.0 Dependency containers >=0.5 && <0.7: using containers-0.6.5.1 Dependency filepath >=1.2 && <1.5: using filepath-1.4.2.2 Dependency ghc-lib-parser >=9.2 && <9.3: using ghc-lib-parser-9.2.4.20220729 Dependency gitrev >=1.3 && <1.4: using gitrev-1.3.1 Dependency optparse-applicative >=0.14 && <0.18: using optparse-applicative-0.16.1.0 Dependency ormolu: using ormolu-0.5.0.1 Dependency text >=0.2 && <3.0: using text-1.2.5.0 Dependency QuickCheck >=2.14: using QuickCheck-2.14.2 Dependency base >=4.14 && <5.0: using base-4.16.3.0 Dependency containers >=0.5 && <0.7: using containers-0.6.5.1 Dependency directory >=1.3 && <1.4: using directory-1.3.6.2 Dependency filepath >=1.2 && <1.5: using filepath-1.4.2.2 Dependency ghc-lib-parser >=9.2 && <9.3: using ghc-lib-parser-9.2.4.20220729 Dependency hspec >=2.0 && <3.0: using hspec-2.8.5 Dependency hspec-megaparsec >=2.2: using hspec-megaparsec-2.2.0 Dependency megaparsec >=9.0: using megaparsec-9.2.2 Dependency ormolu: using ormolu-0.5.0.1 Dependency path >=0.6 && <0.10: using path-0.9.2 Dependency path-io >=1.4.2 && <2.0: using path-io-1.7.0 Dependency temporary >=1.3 && <1.4: using temporary-1.3 Dependency text >=0.2 && <3.0: using text-1.2.5.0 Source component graph: component lib component exe:ormolu dependency lib component test:tests dependency lib Configured component graph: component ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS include ghc-lib-parser-9.2.4.20220729-IKxrswr4gmOD9vG8LKIAKF hiding (Language.Haskell.TH.Syntax) include Cabal-3.6.3.0 include Diff-0.4.1-IIBZH1A0aKFTGXDn4tS5Y include MemoTrie-0.6.10-276xFzKfwWIv1LtSuAuQz include aeson-2.0.3.0-KGI828kplxuF24X4Jwm8Mi include ansi-terminal-0.11.3-nsuVAOuHTE2rZj7YIBaiZ include array-0.5.4.0 include base-4.16.3.0 include bytestring-0.11.3.1 include containers-0.6.5.1 include directory-1.3.6.2 include dlist-1.0-CUSHtSFryWrI9MDBW3mD5Y include exceptions-0.10.4 include filepath-1.4.2.2 include megaparsec-9.2.2-CXNkr8Jyx1qIKGj9CIV2DL include mtl-2.2.2 include syb-0.7.2.2-5KgRcWwlMo4GY4F4crbqCP include template-haskell-2.18.0.0 include text-1.2.5.0 include th-lift-instances-0.1.20-AaIytDMPaepGWKZU8p0Etg component ormolu-0.5.0.1-2f2M8NFPLNcFHXI5cEnj3-ormolu include base-4.16.3.0 include containers-0.6.5.1 include filepath-1.4.2.2 include ghc-lib-parser-9.2.4.20220729-IKxrswr4gmOD9vG8LKIAKF include gitrev-1.3.1-KNQzTEFPF9KEYnkpOJfvEJ include optparse-applicative-0.16.1.0-1pLIoFcDc695Eh6NjySIuV include ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS include text-1.2.5.0 component ormolu-0.5.0.1-KPQFWrUQdo2FPoLOjp5Zoo-tests include QuickCheck-2.14.2-GmIzHg8jhXyDhZvBXz41zC include base-4.16.3.0 include containers-0.6.5.1 include directory-1.3.6.2 include filepath-1.4.2.2 include ghc-lib-parser-9.2.4.20220729-IKxrswr4gmOD9vG8LKIAKF include hspec-2.8.5-CEzJ7qgUR7pAFpVzlBHD include hspec-megaparsec-2.2.0-5BxFUMtQOFYMVcbnakFhf include megaparsec-9.2.2-CXNkr8Jyx1qIKGj9CIV2DL include ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS include path-0.9.2-IEeF4XXuv6d9xGgeh1rNEi include path-io-1.7.0-A8z8Ds2QvntIIrfnB4uEOf include temporary-1.3-FlbeFp24SRdK0U8DUWAIl9 include text-1.2.5.0 Linked component graph: unit ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS include ghc-lib-parser-9.2.4.20220729-IKxrswr4gmOD9vG8LKIAKF (GHC.BaseDir, GHC.Builtin.Names, GHC.Builtin.PrimOps, GHC.Builtin.Types, GHC.Builtin.Types.Prim, GHC.Builtin.Uniques, GHC.ByteCode.Types, GHC.Cmm, GHC.Cmm.BlockId, GHC.Cmm.CLabel, GHC.Cmm.Dataflow.Block, GHC.Cmm.Dataflow.Collections, GHC.Cmm.Dataflow.Graph, GHC.Cmm.Dataflow.Label, GHC.Cmm.Expr, GHC.Cmm.MachOp, GHC.Cmm.Node, GHC.Cmm.Switch, GHC.Cmm.Type, GHC.CmmToAsm.CFG.Weight, GHC.CmmToAsm.Config, GHC.Core, GHC.Core.Class, GHC.Core.Coercion, GHC.Core.Coercion.Axiom, GHC.Core.Coercion.Opt, GHC.Core.ConLike, GHC.Core.DataCon, GHC.Core.FVs, GHC.Core.FamInstEnv, GHC.Core.InstEnv, GHC.Core.Lint, GHC.Core.Make, GHC.Core.Map.Type, GHC.Core.Multiplicity, GHC.Core.Opt.Arity, GHC.Core.Opt.CallerCC, GHC.Core.Opt.ConstantFold, GHC.Core.Opt.Monad, GHC.Core.Opt.OccurAnal, GHC.Core.PatSyn, GHC.Core.Ppr, GHC.Core.Predicate, GHC.Core.Seq, GHC.Core.SimpleOpt, GHC.Core.Stats, GHC.Core.Subst, GHC.Core.TyCo.FVs, GHC.Core.TyCo.Ppr, GHC.Core.TyCo.Rep, GHC.Core.TyCo.Subst, GHC.Core.TyCo.Tidy, GHC.Core.TyCon, GHC.Core.TyCon.Env, GHC.Core.TyCon.RecWalk, GHC.Core.Type, GHC.Core.Unfold, GHC.Core.Unfold.Make, GHC.Core.Unify, GHC.Core.UsageEnv, GHC.Core.Utils, GHC.CoreToIface, GHC.Data.Bag, GHC.Data.BooleanFormula, GHC.Data.EnumSet, GHC.Data.FastMutInt, GHC.Data.FastString, GHC.Data.FastString.Env, GHC.Data.FiniteMap, GHC.Data.Graph.Directed, GHC.Data.IOEnv, GHC.Data.List.SetOps, GHC.Data.Maybe, GHC.Data.OrdList, GHC.Data.Pair, GHC.Data.ShortText, GHC.Data.SizedSeq, GHC.Data.Stream, GHC.Data.StringBuffer, GHC.Data.TrieMap, GHC.Driver.Backend, GHC.Driver.Backpack.Syntax, GHC.Driver.CmdLine, GHC.Driver.Config, GHC.Driver.Env, GHC.Driver.Env.Types, GHC.Driver.Errors, GHC.Driver.Flags, GHC.Driver.Hooks, GHC.Driver.Monad, GHC.Driver.Phases, GHC.Driver.Pipeline.Monad, GHC.Driver.Plugins, GHC.Driver.Ppr, GHC.Driver.Session, GHC.Exts.Heap, GHC.Exts.Heap.ClosureTypes, GHC.Exts.Heap.Closures, GHC.Exts.Heap.Constants, GHC.Exts.Heap.FFIClosures, GHC.Exts.Heap.FFIClosures_ProfilingDisabled, GHC.Exts.Heap.FFIClosures_ProfilingEnabled, GHC.Exts.Heap.InfoTable, GHC.Exts.Heap.InfoTable.Types, GHC.Exts.Heap.InfoTableProf, GHC.Exts.Heap.ProfInfo.PeekProfInfo, GHC.Exts.Heap.ProfInfo.PeekProfInfo_ProfilingDisabled, GHC.Exts.Heap.ProfInfo.PeekProfInfo_ProfilingEnabled, GHC.Exts.Heap.ProfInfo.Types, GHC.Exts.Heap.Utils, GHC.ForeignSrcLang, GHC.ForeignSrcLang.Type, GHC.Hs, GHC.Hs.Binds, GHC.Hs.Decls, GHC.Hs.Doc, GHC.Hs.Dump, GHC.Hs.Expr, GHC.Hs.Extension, GHC.Hs.ImpExp, GHC.Hs.Instances, GHC.Hs.Lit, GHC.Hs.Pat, GHC.Hs.Type, GHC.Hs.Utils, GHC.Iface.Ext.Fields, GHC.Iface.Recomp.Binary, GHC.Iface.Syntax, GHC.Iface.Type, GHC.LanguageExtensions, GHC.LanguageExtensions.Type, GHC.Lexeme, GHC.Linker.Types, GHC.Parser, GHC.Parser.Annotation, GHC.Parser.CharClass, GHC.Parser.Errors, GHC.Parser.Errors.Ppr, GHC.Parser.Header, GHC.Parser.Lexer, GHC.Parser.PostProcess, GHC.Parser.PostProcess.Haddock, GHC.Parser.Types, GHC.Platform, GHC.Platform.AArch64, GHC.Platform.ARM, GHC.Platform.ArchOS, GHC.Platform.Constants, GHC.Platform.NoRegs, GHC.Platform.PPC, GHC.Platform.Profile, GHC.Platform.RISCV64, GHC.Platform.Reg, GHC.Platform.Reg.Class, GHC.Platform.Regs, GHC.Platform.S390X, GHC.Platform.SPARC, GHC.Platform.Ways, GHC.Platform.X86, GHC.Platform.X86_64, GHC.Prelude, GHC.Runtime.Context, GHC.Runtime.Eval.Types, GHC.Runtime.Heap.Layout, GHC.Runtime.Interpreter.Types, GHC.Serialized, GHC.Settings, GHC.Settings.Config, GHC.Settings.Constants, GHC.Stg.Syntax, GHC.StgToCmm.Types, GHC.SysTools.BaseDir, GHC.SysTools.Terminal, GHC.Tc.Errors.Hole.FitTypes, GHC.Tc.Types, GHC.Tc.Types.Constraint, GHC.Tc.Types.Evidence, GHC.Tc.Types.Origin, GHC.Tc.Utils.TcType, GHC.Types.Annotations, GHC.Types.Avail, GHC.Types.Basic, GHC.Types.CompleteMatch, GHC.Types.CostCentre, GHC.Types.CostCentre.State, GHC.Types.Cpr, GHC.Types.Demand, GHC.Types.Error, GHC.Types.FieldLabel, GHC.Types.Fixity, GHC.Types.Fixity.Env, GHC.Types.ForeignCall, GHC.Types.ForeignStubs, GHC.Types.HpcInfo, GHC.Types.IPE, GHC.Types.Id, GHC.Types.Id.Info, GHC.Types.Id.Make, GHC.Types.Literal, GHC.Types.Meta, GHC.Types.Name, GHC.Types.Name.Cache, GHC.Types.Name.Env, GHC.Types.Name.Occurrence, GHC.Types.Name.Ppr, GHC.Types.Name.Reader, GHC.Types.Name.Set, GHC.Types.RepType, GHC.Types.SafeHaskell, GHC.Types.SourceError, GHC.Types.SourceFile, GHC.Types.SourceText, GHC.Types.SrcLoc, GHC.Types.Target, GHC.Types.Tickish, GHC.Types.TyThing, GHC.Types.TypeEnv, GHC.Types.Unique, GHC.Types.Unique.DFM, GHC.Types.Unique.DSet, GHC.Types.Unique.FM, GHC.Types.Unique.Map, GHC.Types.Unique.Set, GHC.Types.Unique.Supply, GHC.Types.Var, GHC.Types.Var.Env, GHC.Types.Var.Set, GHC.UniqueSubdir, GHC.Unit, GHC.Unit.Database, GHC.Unit.Env, GHC.Unit.External, GHC.Unit.Finder.Types, GHC.Unit.Home, GHC.Unit.Home.ModInfo, GHC.Unit.Info, GHC.Unit.Module, GHC.Unit.Module.Deps, GHC.Unit.Module.Env, GHC.Unit.Module.Graph, GHC.Unit.Module.Imported, GHC.Unit.Module.Location, GHC.Unit.Module.ModDetails, GHC.Unit.Module.ModGuts, GHC.Unit.Module.ModIface, GHC.Unit.Module.ModSummary, GHC.Unit.Module.Name, GHC.Unit.Module.Status, GHC.Unit.Module.Warnings, GHC.Unit.Parser, GHC.Unit.Ppr, GHC.Unit.State, GHC.Unit.Types, GHC.Utils.Binary, GHC.Utils.Binary.Typeable, GHC.Utils.BufHandle, GHC.Utils.CliOption, GHC.Utils.Encoding, GHC.Utils.Error, GHC.Utils.Exception, GHC.Utils.FV, GHC.Utils.Fingerprint, GHC.Utils.GlobalVars, GHC.Utils.IO.Unsafe, GHC.Utils.Json, GHC.Utils.Lexeme, GHC.Utils.Logger, GHC.Utils.Misc, GHC.Utils.Monad, GHC.Utils.Outputable, GHC.Utils.Panic, GHC.Utils.Panic.Plain, GHC.Utils.Ppr, GHC.Utils.Ppr.Colour, GHC.Utils.TmpFs, GHC.Version, GHCi.BreakArray, GHCi.FFI, GHCi.Message, GHCi.RemoteTypes, GHCi.TH.Binary, Language.Haskell.Syntax, Language.Haskell.Syntax.Binds, Language.Haskell.Syntax.Decls, Language.Haskell.Syntax.Expr, Language.Haskell.Syntax.Extension, Language.Haskell.Syntax.Lit, Language.Haskell.Syntax.Pat, Language.Haskell.Syntax.Type, Language.Haskell.TH, Language.Haskell.TH.LanguageExtensions, Language.Haskell.TH.Lib, Language.Haskell.TH.Lib.Internal, Language.Haskell.TH.Lib.Map, Language.Haskell.TH.Ppr, Language.Haskell.TH.PprLib) include Cabal-3.6.3.0 include Diff-0.4.1-IIBZH1A0aKFTGXDn4tS5Y include MemoTrie-0.6.10-276xFzKfwWIv1LtSuAuQz include aeson-2.0.3.0-KGI828kplxuF24X4Jwm8Mi include ansi-terminal-0.11.3-nsuVAOuHTE2rZj7YIBaiZ include array-0.5.4.0 include base-4.16.3.0 include bytestring-0.11.3.1 include containers-0.6.5.1 include directory-1.3.6.2 include dlist-1.0-CUSHtSFryWrI9MDBW3mD5Y include exceptions-0.10.4 include filepath-1.4.2.2 include megaparsec-9.2.2-CXNkr8Jyx1qIKGj9CIV2DL include mtl-2.2.2 include syb-0.7.2.2-5KgRcWwlMo4GY4F4crbqCP include template-haskell-2.18.0.0 include text-1.2.5.0 include th-lift-instances-0.1.20-AaIytDMPaepGWKZU8p0Etg Ormolu=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu,Ormolu.Config=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Config,Ormolu.Diff.ParseResult=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Diff.ParseResult,Ormolu.Diff.Text=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Diff.Text,Ormolu.Exception=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Exception,Ormolu.Fixity=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Fixity,Ormolu.Fixity.Internal=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Fixity.Internal,Ormolu.Fixity.Parser=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Fixity.Parser,Ormolu.Fixity.Printer=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Fixity.Printer,Ormolu.Imports=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Imports,Ormolu.Parser=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Parser,Ormolu.Parser.CommentStream=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Parser.CommentStream,Ormolu.Parser.Pragma=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Parser.Pragma,Ormolu.Parser.Result=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Parser.Result,Ormolu.Printer=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer,Ormolu.Printer.Combinators=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Combinators,Ormolu.Printer.Comments=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Comments,Ormolu.Printer.Internal=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Internal,Ormolu.Printer.Meat.Common=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Common,Ormolu.Printer.Meat.Declaration=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration,Ormolu.Printer.Meat.Declaration.Annotation=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Annotation,Ormolu.Printer.Meat.Declaration.Class=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Class,Ormolu.Printer.Meat.Declaration.Data=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Data,Ormolu.Printer.Meat.Declaration.Default=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Default,Ormolu.Printer.Meat.Declaration.Foreign=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Foreign,Ormolu.Printer.Meat.Declaration.Instance=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Instance,Ormolu.Printer.Meat.Declaration.OpTree=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.OpTree,Ormolu.Printer.Meat.Declaration.RoleAnnotation=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.RoleAnnotation,Ormolu.Printer.Meat.Declaration.Rule=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Rule,Ormolu.Printer.Meat.Declaration.Signature=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Signature,Ormolu.Printer.Meat.Declaration.Splice=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Splice,Ormolu.Printer.Meat.Declaration.Type=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Type,Ormolu.Printer.Meat.Declaration.TypeFamily=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.TypeFamily,Ormolu.Printer.Meat.Declaration.Value=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Value,Ormolu.Printer.Meat.Declaration.Warning=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Declaration.Warning,Ormolu.Printer.Meat.ImportExport=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.ImportExport,Ormolu.Printer.Meat.Module=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Module,Ormolu.Printer.Meat.Pragma=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Pragma,Ormolu.Printer.Meat.Type=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Meat.Type,Ormolu.Printer.Operators=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.Operators,Ormolu.Printer.SpanStream=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Printer.SpanStream,Ormolu.Processing.Common=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Processing.Common,Ormolu.Processing.Cpp=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Processing.Cpp,Ormolu.Processing.Preprocess=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Processing.Preprocess,Ormolu.Terminal=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Terminal,Ormolu.Utils=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Utils,Ormolu.Utils.Cabal=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Utils.Cabal,Ormolu.Utils.Fixity=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Utils.Fixity,Ormolu.Utils.IO=ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS:Ormolu.Utils.IO unit ormolu-0.5.0.1-2f2M8NFPLNcFHXI5cEnj3-ormolu include base-4.16.3.0 include containers-0.6.5.1 include filepath-1.4.2.2 include ghc-lib-parser-9.2.4.20220729-IKxrswr4gmOD9vG8LKIAKF include gitrev-1.3.1-KNQzTEFPF9KEYnkpOJfvEJ include optparse-applicative-0.16.1.0-1pLIoFcDc695Eh6NjySIuV include ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS include text-1.2.5.0 unit ormolu-0.5.0.1-KPQFWrUQdo2FPoLOjp5Zoo-tests include QuickCheck-2.14.2-GmIzHg8jhXyDhZvBXz41zC include base-4.16.3.0 include containers-0.6.5.1 include directory-1.3.6.2 include filepath-1.4.2.2 include ghc-lib-parser-9.2.4.20220729-IKxrswr4gmOD9vG8LKIAKF include hspec-2.8.5-CEzJ7qgUR7pAFpVzlBHD include hspec-megaparsec-2.2.0-5BxFUMtQOFYMVcbnakFhf include megaparsec-9.2.2-CXNkr8Jyx1qIKGj9CIV2DL include ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS include path-0.9.2-IEeF4XXuv6d9xGgeh1rNEi include path-io-1.7.0-A8z8Ds2QvntIIrfnB4uEOf include temporary-1.3-FlbeFp24SRdK0U8DUWAIl9 include text-1.2.5.0 Ready component graph: definite ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS depends ghc-lib-parser-9.2.4.20220729-IKxrswr4gmOD9vG8LKIAKF depends Cabal-3.6.3.0 depends Diff-0.4.1-IIBZH1A0aKFTGXDn4tS5Y depends MemoTrie-0.6.10-276xFzKfwWIv1LtSuAuQz depends aeson-2.0.3.0-KGI828kplxuF24X4Jwm8Mi depends ansi-terminal-0.11.3-nsuVAOuHTE2rZj7YIBaiZ depends array-0.5.4.0 depends base-4.16.3.0 depends bytestring-0.11.3.1 depends containers-0.6.5.1 depends directory-1.3.6.2 depends dlist-1.0-CUSHtSFryWrI9MDBW3mD5Y depends exceptions-0.10.4 depends filepath-1.4.2.2 depends megaparsec-9.2.2-CXNkr8Jyx1qIKGj9CIV2DL depends mtl-2.2.2 depends syb-0.7.2.2-5KgRcWwlMo4GY4F4crbqCP depends template-haskell-2.18.0.0 depends text-1.2.5.0 depends th-lift-instances-0.1.20-AaIytDMPaepGWKZU8p0Etg definite ormolu-0.5.0.1-2f2M8NFPLNcFHXI5cEnj3-ormolu depends base-4.16.3.0 depends containers-0.6.5.1 depends filepath-1.4.2.2 depends ghc-lib-parser-9.2.4.20220729-IKxrswr4gmOD9vG8LKIAKF depends gitrev-1.3.1-KNQzTEFPF9KEYnkpOJfvEJ depends optparse-applicative-0.16.1.0-1pLIoFcDc695Eh6NjySIuV depends ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS depends text-1.2.5.0 definite ormolu-0.5.0.1-KPQFWrUQdo2FPoLOjp5Zoo-tests depends QuickCheck-2.14.2-GmIzHg8jhXyDhZvBXz41zC depends base-4.16.3.0 depends containers-0.6.5.1 depends directory-1.3.6.2 depends filepath-1.4.2.2 depends ghc-lib-parser-9.2.4.20220729-IKxrswr4gmOD9vG8LKIAKF depends hspec-2.8.5-CEzJ7qgUR7pAFpVzlBHD depends hspec-megaparsec-2.2.0-5BxFUMtQOFYMVcbnakFhf depends megaparsec-9.2.2-CXNkr8Jyx1qIKGj9CIV2DL depends ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS depends path-0.9.2-IEeF4XXuv6d9xGgeh1rNEi depends path-io-1.7.0-A8z8Ds2QvntIIrfnB4uEOf depends temporary-1.3-FlbeFp24SRdK0U8DUWAIl9 depends text-1.2.5.0 Using Cabal-3.6.3.0 compiled by ghc-9.2 Using compiler: ghc-9.2.4 Using install prefix: /nix/store/m067avdxq2p81bjklnmwrwbyb4lhdf3m-ormolu-0.5.0.1 Executables installed in: /nix/store/m067avdxq2p81bjklnmwrwbyb4lhdf3m-ormolu-0.5.0.1/bin Libraries installed in: /nix/store/m067avdxq2p81bjklnmwrwbyb4lhdf3m-ormolu-0.5.0.1/lib/ghc-9.2.4/aarch64-osx-ghc-9.2.4/ormolu-0.5.0.1-22EpehlK2k45yQbU8ojqpS Dynamic Libraries installed in: /nix/store/m067avdxq2p81bjklnmwrwbyb4lhdf3m-ormolu-0.5.0.1/lib/ghc-9.2.4/aarch64-osx-ghc-9.2.4 Private executables installed in: /nix/store/m067avdxq2p81bjklnmwrwbyb4lhdf3m-ormolu-0.5.0.1/libexec/aarch64-osx-ghc-9.2.4/ormolu-0.5.0.1 Data files installed in: /nix/store/m067avdxq2p81bjklnmwrwbyb4lhdf3m-ormolu-0.5.0.1/share/aarch64-osx-ghc-9.2.4/ormolu-0.5.0.1 Documentation installed in: /nix/store/kss6767s0zlnq30lb9niwwd74k8dwjja-ormolu-0.5.0.1-doc/share/doc/ormolu-0.5.0.1 Configuration files installed in: /nix/store/m067avdxq2p81bjklnmwrwbyb4lhdf3m-ormolu-0.5.0.1/etc No alex found Using ar found on system at: /nix/store/5wvlj00dr22ivh210b18ccv1i60h6c1q-cctools-binutils-darwin-949.0.1/bin/ar No c2hs found No cpphs found No doctest found Using gcc version 11.1.0 given by user at: /nix/store/48py6zrawzim9ghrnkqwm36jl4j1l23x-clang-wrapper-11.1.0/bin/clang Using ghc version 9.2.4 found on system at: /nix/store/rq59lz1dv0nb1qdic4yalfgpgbsx3v63-ghc-9.2.4/bin/ghc Using ghc-pkg version 9.2.4 found on system at: /nix/store/rq59lz1dv0nb1qdic4yalfgpgbsx3v63-ghc-9.2.4/bin/ghc-pkg-9.2.4 No ghcjs found No ghcjs-pkg found No greencard found Using haddock version 2.26.0 found on system at: /nix/store/rq59lz1dv0nb1qdic4yalfgpgbsx3v63-ghc-9.2.4/bin/haddock-ghc-9.2.4 No happy found Using haskell-suite found on system at: haskell-suite-dummy-location Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location No hmake found Using hpc version 0.68 found on system at: /nix/store/rq59lz1dv0nb1qdic4yalfgpgbsx3v63-ghc-9.2.4/bin/hpc Using hsc2hs version 0.68.8 found on system at: /nix/store/rq59lz1dv0nb1qdic4yalfgpgbsx3v63-ghc-9.2.4/bin/hsc2hs Using hscolour version 1.24 found on system at: /nix/store/d155rhw7nia4cz0zvf12fxabgm0w86rh-hscolour-1.24.4/bin/HsColour No jhc found Using ld found on system at: /nix/store/31qax6ymz94imlp821qnb8f46pyw8slc-cctools-binutils-darwin-wrapper-949.0.1/bin/ld No pkg-config found Using runghc version 9.2.4 found on system at: /nix/store/rq59lz1dv0nb1qdic4yalfgpgbsx3v63-ghc-9.2.4/bin/runghc-9.2.4 Using strip found on system at: /nix/store/48py6zrawzim9ghrnkqwm36jl4j1l23x-clang-wrapper-11.1.0/bin/strip Using tar found on system at: /nix/store/rfi0yjry4jnvnblbrkwpgj77ac4z78id-gnutar-1.34/bin/tar No uhc found @nix { "action": "setPhase", "phase": "buildPhase" } building Preprocessing library for ormolu-0.5.0.1.. Building library for ormolu-0.5.0.1.. [ 1 of 53] Compiling GHC.DynFlags ( src/GHC/DynFlags.hs, dist/build/GHC/DynFlags.o, dist/build/GHC/DynFlags.dyn_o ) [ 2 of 53] Compiling Ormolu.Fixity.Internal ( src/Ormolu/Fixity/Internal.hs, dist/build/Ormolu/Fixity/Internal.o, dist/build/Ormolu/Fixity/Internal.dyn_o ) [ 3 of 53] Compiling Ormolu.Fixity ( src/Ormolu/Fixity.hs, dist/build/Ormolu/Fixity.o, dist/build/Ormolu/Fixity.dyn_o ) [ 4 of 53] Compiling Ormolu.Fixity.Parser ( src/Ormolu/Fixity/Parser.hs, dist/build/Ormolu/Fixity/Parser.o, dist/build/Ormolu/Fixity/Parser.dyn_o ) [ 5 of 53] Compiling Ormolu.Fixity.Printer ( src/Ormolu/Fixity/Printer.hs, dist/build/Ormolu/Fixity/Printer.o, dist/build/Ormolu/Fixity/Printer.dyn_o ) [ 6 of 53] Compiling Ormolu.Parser.Pragma ( src/Ormolu/Parser/Pragma.hs, dist/build/Ormolu/Parser/Pragma.o, dist/build/Ormolu/Parser/Pragma.dyn_o ) [ 7 of 53] Compiling Ormolu.Printer.SpanStream ( src/Ormolu/Printer/SpanStream.hs, dist/build/Ormolu/Printer/SpanStream.o, dist/build/Ormolu/Printer/SpanStream.dyn_o ) [ 8 of 53] Compiling Ormolu.Processing.Cpp ( src/Ormolu/Processing/Cpp.hs, dist/build/Ormolu/Processing/Cpp.o, dist/build/Ormolu/Processing/Cpp.dyn_o ) [ 9 of 53] Compiling Ormolu.Utils ( src/Ormolu/Utils.hs, dist/build/Ormolu/Utils.o, dist/build/Ormolu/Utils.dyn_o ) [10 of 53] Compiling Ormolu.Terminal ( src/Ormolu/Terminal.hs, dist/build/Ormolu/Terminal.o, dist/build/Ormolu/Terminal.dyn_o ) [11 of 53] Compiling Ormolu.Diff.Text ( src/Ormolu/Diff/Text.hs, dist/build/Ormolu/Diff/Text.o, dist/build/Ormolu/Diff/Text.dyn_o ) [12 of 53] Compiling Ormolu.Exception ( src/Ormolu/Exception.hs, dist/build/Ormolu/Exception.o, dist/build/Ormolu/Exception.dyn_o ) [13 of 53] Compiling Ormolu.Config ( src/Ormolu/Config.hs, dist/build/Ormolu/Config.o, dist/build/Ormolu/Config.dyn_o ) [14 of 53] Compiling Ormolu.Processing.Common ( src/Ormolu/Processing/Common.hs, dist/build/Ormolu/Processing/Common.o, dist/build/Ormolu/Processing/Common.dyn_o ) [15 of 53] Compiling Ormolu.Processing.Preprocess ( src/Ormolu/Processing/Preprocess.hs, dist/build/Ormolu/Processing/Preprocess.o, dist/build/Ormolu/Processing/Preprocess.dyn_o ) [16 of 53] Compiling Ormolu.Printer.Operators ( src/Ormolu/Printer/Operators.hs, dist/build/Ormolu/Printer/Operators.o, dist/build/Ormolu/Printer/Operators.dyn_o ) [17 of 53] Compiling Ormolu.Parser.CommentStream ( src/Ormolu/Parser/CommentStream.hs, dist/build/Ormolu/Parser/CommentStream.o, dist/build/Ormolu/Parser/CommentStream.dyn_o ) [18 of 53] Compiling Ormolu.Printer.Internal ( src/Ormolu/Printer/Internal.hs, dist/build/Ormolu/Printer/Internal.o, dist/build/Ormolu/Printer/Internal.dyn_o ) [19 of 53] Compiling Ormolu.Printer.Comments ( src/Ormolu/Printer/Comments.hs, dist/build/Ormolu/Printer/Comments.o, dist/build/Ormolu/Printer/Comments.dyn_o ) [20 of 53] Compiling Ormolu.Printer.Combinators ( src/Ormolu/Printer/Combinators.hs, dist/build/Ormolu/Printer/Combinators.o, dist/build/Ormolu/Printer/Combinators.dyn_o ) [21 of 53] Compiling Ormolu.Printer.Meat.Pragma ( src/Ormolu/Printer/Meat/Pragma.hs, dist/build/Ormolu/Printer/Meat/Pragma.o, dist/build/Ormolu/Printer/Meat/Pragma.dyn_o ) [22 of 53] Compiling Ormolu.Printer.Meat.Declaration.Value[boot] ( src/Ormolu/Printer/Meat/Declaration/Value.hs-boot, dist/build/Ormolu/Printer/Meat/Declaration/Value.o-boot, dist/build/Ormolu/Printer/Meat/Declaration/Value.dyn_o ) [23 of 53] Compiling Ormolu.Printer.Meat.Declaration.OpTree[boot] ( src/Ormolu/Printer/Meat/Declaration/OpTree.hs-boot, dist/build/Ormolu/Printer/Meat/Declaration/OpTree.o-boot, dist/build/Ormolu/Printer/Meat/Declaration/OpTree.dyn_o ) [24 of 53] Compiling Ormolu.Printer.Meat.Common ( src/Ormolu/Printer/Meat/Common.hs, dist/build/Ormolu/Printer/Meat/Common.o, dist/build/Ormolu/Printer/Meat/Common.dyn_o ) [25 of 53] Compiling Ormolu.Printer.Meat.Type ( src/Ormolu/Printer/Meat/Type.hs, dist/build/Ormolu/Printer/Meat/Type.o, dist/build/Ormolu/Printer/Meat/Type.dyn_o ) [26 of 53] Compiling Ormolu.Printer.Meat.Declaration.Default ( src/Ormolu/Printer/Meat/Declaration/Default.hs, dist/build/Ormolu/Printer/Meat/Declaration/Default.o, dist/build/Ormolu/Printer/Meat/Declaration/Default.dyn_o ) [27 of 53] Compiling Ormolu.Printer.Meat.ImportExport ( src/Ormolu/Printer/Meat/ImportExport.hs, dist/build/Ormolu/Printer/Meat/ImportExport.o, dist/build/Ormolu/Printer/Meat/ImportExport.dyn_o ) [28 of 53] Compiling Ormolu.Printer.Meat.Declaration.Warning ( src/Ormolu/Printer/Meat/Declaration/Warning.hs, dist/build/Ormolu/Printer/Meat/Declaration/Warning.o, dist/build/Ormolu/Printer/Meat/Declaration/Warning.dyn_o ) [29 of 53] Compiling Ormolu.Printer.Meat.Declaration.TypeFamily ( src/Ormolu/Printer/Meat/Declaration/TypeFamily.hs, dist/build/Ormolu/Printer/Meat/Declaration/TypeFamily.o, dist/build/Ormolu/Printer/Meat/Declaration/TypeFamily.dyn_o ) [30 of 53] Compiling Ormolu.Printer.Meat.Declaration.Type ( src/Ormolu/Printer/Meat/Declaration/Type.hs, dist/build/Ormolu/Printer/Meat/Declaration/Type.o, dist/build/Ormolu/Printer/Meat/Declaration/Type.dyn_o ) [31 of 53] Compiling Ormolu.Printer.Meat.Declaration.Signature ( src/Ormolu/Printer/Meat/Declaration/Signature.hs, dist/build/Ormolu/Printer/Meat/Declaration/Signature.o, dist/build/Ormolu/Printer/Meat/Declaration/Signature.dyn_o ) [32 of 53] Compiling Ormolu.Printer.Meat.Declaration.RoleAnnotation ( src/Ormolu/Printer/Meat/Declaration/RoleAnnotation.hs, dist/build/Ormolu/Printer/Meat/Declaration/RoleAnnotation.o, dist/build/Ormolu/Printer/Meat/Declaration/RoleAnnotation.dyn_o ) [33 of 53] Compiling Ormolu.Printer.Meat.Declaration.Foreign ( src/Ormolu/Printer/Meat/Declaration/Foreign.hs, dist/build/Ormolu/Printer/Meat/Declaration/Foreign.o, dist/build/Ormolu/Printer/Meat/Declaration/Foreign.dyn_o ) [34 of 53] Compiling Ormolu.Printer.Meat.Declaration.Data ( src/Ormolu/Printer/Meat/Declaration/Data.hs, dist/build/Ormolu/Printer/Meat/Declaration/Data.o, dist/build/Ormolu/Printer/Meat/Declaration/Data.dyn_o ) [35 of 53] Compiling Ormolu.Printer.Meat.Declaration[boot] ( src/Ormolu/Printer/Meat/Declaration.hs-boot, dist/build/Ormolu/Printer/Meat/Declaration.o-boot, dist/build/Ormolu/Printer/Meat/Declaration.dyn_o ) [36 of 53] Compiling Ormolu.Printer.Meat.Declaration.Value ( src/Ormolu/Printer/Meat/Declaration/Value.hs, dist/build/Ormolu/Printer/Meat/Declaration/Value.o, dist/build/Ormolu/Printer/Meat/Declaration/Value.dyn_o ) [37 of 53] Compiling Ormolu.Printer.Meat.Declaration.Splice ( src/Ormolu/Printer/Meat/Declaration/Splice.hs, dist/build/Ormolu/Printer/Meat/Declaration/Splice.o, dist/build/Ormolu/Printer/Meat/Declaration/Splice.dyn_o ) [38 of 53] Compiling Ormolu.Printer.Meat.Declaration.Rule ( src/Ormolu/Printer/Meat/Declaration/Rule.hs, dist/build/Ormolu/Printer/Meat/Declaration/Rule.o, dist/build/Ormolu/Printer/Meat/Declaration/Rule.dyn_o ) [39 of 53] Compiling Ormolu.Printer.Meat.Declaration.OpTree ( src/Ormolu/Printer/Meat/Declaration/OpTree.hs, dist/build/Ormolu/Printer/Meat/Declaration/OpTree.o, dist/build/Ormolu/Printer/Meat/Declaration/OpTree.dyn_o ) [40 of 53] Compiling Ormolu.Printer.Meat.Declaration.Annotation ( src/Ormolu/Printer/Meat/Declaration/Annotation.hs, dist/build/Ormolu/Printer/Meat/Declaration/Annotation.o, dist/build/Ormolu/Printer/Meat/Declaration/Annotation.dyn_o ) [41 of 53] Compiling Ormolu.Printer.Meat.Declaration.Instance ( src/Ormolu/Printer/Meat/Declaration/Instance.hs, dist/build/Ormolu/Printer/Meat/Declaration/Instance.o, dist/build/Ormolu/Printer/Meat/Declaration/Instance.dyn_o ) [42 of 53] Compiling Ormolu.Printer.Meat.Declaration.Class ( src/Ormolu/Printer/Meat/Declaration/Class.hs, dist/build/Ormolu/Printer/Meat/Declaration/Class.o, dist/build/Ormolu/Printer/Meat/Declaration/Class.dyn_o ) [43 of 53] Compiling Ormolu.Printer.Meat.Declaration ( src/Ormolu/Printer/Meat/Declaration.hs, dist/build/Ormolu/Printer/Meat/Declaration.o, dist/build/Ormolu/Printer/Meat/Declaration.dyn_o ) [44 of 53] Compiling Ormolu.Printer.Meat.Module ( src/Ormolu/Printer/Meat/Module.hs, dist/build/Ormolu/Printer/Meat/Module.o, dist/build/Ormolu/Printer/Meat/Module.dyn_o ) [45 of 53] Compiling Ormolu.Parser.Result ( src/Ormolu/Parser/Result.hs, dist/build/Ormolu/Parser/Result.o, dist/build/Ormolu/Parser/Result.dyn_o ) [46 of 53] Compiling Ormolu.Printer ( src/Ormolu/Printer.hs, dist/build/Ormolu/Printer.o, dist/build/Ormolu/Printer.dyn_o ) [47 of 53] Compiling Ormolu.Imports ( src/Ormolu/Imports.hs, dist/build/Ormolu/Imports.o, dist/build/Ormolu/Imports.dyn_o ) [48 of 53] Compiling Ormolu.Parser ( src/Ormolu/Parser.hs, dist/build/Ormolu/Parser.o, dist/build/Ormolu/Parser.dyn_o ) [49 of 53] Compiling Ormolu.Diff.ParseResult ( src/Ormolu/Diff/ParseResult.hs, dist/build/Ormolu/Diff/ParseResult.o, dist/build/Ormolu/Diff/ParseResult.dyn_o ) [50 of 53] Compiling Ormolu.Utils.Cabal ( src/Ormolu/Utils/Cabal.hs, dist/build/Ormolu/Utils/Cabal.o, dist/build/Ormolu/Utils/Cabal.dyn_o ) [51 of 53] Compiling Ormolu.Utils.IO ( src/Ormolu/Utils/IO.hs, dist/build/Ormolu/Utils/IO.o, dist/build/Ormolu/Utils/IO.dyn_o ) [52 of 53] Compiling Ormolu.Utils.Fixity ( src/Ormolu/Utils/Fixity.hs, dist/build/Ormolu/Utils/Fixity.o, dist/build/Ormolu/Utils/Fixity.dyn_o ) [53 of 53] Compiling Ormolu ( src/Ormolu.hs, dist/build/Ormolu.o, dist/build/Ormolu.dyn_o ) Preprocessing executable 'ormolu' for ormolu-0.5.0.1.. Building executable 'ormolu' for ormolu-0.5.0.1.. :15:10: error: warning: non-portable path to file '"dist/build/Ormolu/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] #include "dist/build/ormolu/autogen/cabal_macros.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "dist/build/Ormolu/autogen/cabal_macros.h" 1 warning generated. :15:10: error: warning: non-portable path to file '"dist/build/Ormolu/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] #include "dist/build/ormolu/autogen/cabal_macros.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "dist/build/Ormolu/autogen/cabal_macros.h" 1 warning generated. [1 of 2] Compiling Paths_ormolu ( dist/build/ormolu/autogen/Paths_ormolu.hs, dist/build/ormolu/ormolu-tmp/Paths_ormolu.o, dist/build/ormolu/ormolu-tmp/Paths_ormolu.dyn_o ) [2 of 2] Compiling Main ( app/Main.hs, dist/build/ormolu/ormolu-tmp/Main.o, dist/build/ormolu/ormolu-tmp/Main.dyn_o ) :15:10: error: warning: non-portable path to file '"dist/build/Ormolu/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] #include "dist/build/ormolu/autogen/cabal_macros.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "dist/build/Ormolu/autogen/cabal_macros.h" 1 warning generated. :15:10: error: warning: non-portable path to file '"dist/build/Ormolu/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] #include "dist/build/ormolu/autogen/cabal_macros.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "dist/build/Ormolu/autogen/cabal_macros.h" 1 warning generated. Linking dist/build/ormolu/ormolu ... Preprocessing test suite 'tests' for ormolu-0.5.0.1.. Building test suite 'tests' for ormolu-0.5.0.1.. [ 1 of 11] Compiling Ormolu.CabalInfoSpec ( tests/Ormolu/CabalInfoSpec.hs, dist/build/tests/tests-tmp/Ormolu/CabalInfoSpec.o, dist/build/tests/tests-tmp/Ormolu/CabalInfoSpec.dyn_o ) [ 2 of 11] Compiling Ormolu.Diff.TextSpec ( tests/Ormolu/Diff/TextSpec.hs, dist/build/tests/tests-tmp/Ormolu/Diff/TextSpec.o, dist/build/tests/tests-tmp/Ormolu/Diff/TextSpec.dyn_o ) [ 3 of 11] Compiling Ormolu.Fixity.ParserSpec ( tests/Ormolu/Fixity/ParserSpec.hs, dist/build/tests/tests-tmp/Ormolu/Fixity/ParserSpec.o, dist/build/tests/tests-tmp/Ormolu/Fixity/ParserSpec.dyn_o ) [ 4 of 11] Compiling Ormolu.Fixity.PrinterSpec ( tests/Ormolu/Fixity/PrinterSpec.hs, dist/build/tests/tests-tmp/Ormolu/Fixity/PrinterSpec.o, dist/build/tests/tests-tmp/Ormolu/Fixity/PrinterSpec.dyn_o ) [ 5 of 11] Compiling Ormolu.HackageInfoSpec ( tests/Ormolu/HackageInfoSpec.hs, dist/build/tests/tests-tmp/Ormolu/HackageInfoSpec.o, dist/build/tests/tests-tmp/Ormolu/HackageInfoSpec.dyn_o ) [ 6 of 11] Compiling Ormolu.OpTreeSpec ( tests/Ormolu/OpTreeSpec.hs, dist/build/tests/tests-tmp/Ormolu/OpTreeSpec.o, dist/build/tests/tests-tmp/Ormolu/OpTreeSpec.dyn_o ) [ 7 of 11] Compiling Ormolu.Parser.OptionsSpec ( tests/Ormolu/Parser/OptionsSpec.hs, dist/build/tests/tests-tmp/Ormolu/Parser/OptionsSpec.o, dist/build/tests/tests-tmp/Ormolu/Parser/OptionsSpec.dyn_o ) [ 8 of 11] Compiling Ormolu.Parser.ParseFailureSpec ( tests/Ormolu/Parser/ParseFailureSpec.hs, dist/build/tests/tests-tmp/Ormolu/Parser/ParseFailureSpec.o, dist/build/tests/tests-tmp/Ormolu/Parser/ParseFailureSpec.dyn_o ) [ 9 of 11] Compiling Ormolu.Parser.PragmaSpec ( tests/Ormolu/Parser/PragmaSpec.hs, dist/build/tests/tests-tmp/Ormolu/Parser/PragmaSpec.o, dist/build/tests/tests-tmp/Ormolu/Parser/PragmaSpec.dyn_o ) [10 of 11] Compiling Ormolu.PrinterSpec ( tests/Ormolu/PrinterSpec.hs, dist/build/tests/tests-tmp/Ormolu/PrinterSpec.o, dist/build/tests/tests-tmp/Ormolu/PrinterSpec.dyn_o ) [11 of 11] Compiling Main ( tests/Spec.hs, dist/build/tests/tests-tmp/Main.o, dist/build/tests/tests-tmp/Main.dyn_o ) Linking dist/build/tests/tests ... /nix/store/48py6zrawzim9ghrnkqwm36jl4j1l23x-clang-wrapper-11.1.0/bin/ld: line 256: 48306 Segmentation fault: 11 /nix/store/5wvlj00dr22ivh210b18ccv1i60h6c1q-cctools-binutils-darwin-949.0.1/bin/ld ${extraBefore+"${extraBefore[@]}"} ${params+"${params[@]}"} ${extraAfter+"${extraAfter[@]}"} clang-11: error: linker command failed with exit code 139 (use -v to see invocation) `cc' failed in phase `Linker'. (Exit code: 139) ```

Expected behavior Should build, and in a reasonable timeframe

Environment

Additional context Add any other context about the problem here.

amesgen commented 1 year ago

Thanks for the report, maybe this is a duplicate of #898?

I think that perhaps a better idea is to parse it at runtime from a ByteString embedded in the executable.

You already have that option (I use it e.g. for local development, as it trades faster compile times for somewhat slower runtimes), just disable the fixity-th flag.


In any case, segfaulting builds on valid Haskell code sound like an upstream issue, especially as I never encountered this with x86_64-linux.

SamirTalwar commented 1 year ago

I had the same issue, and I have seen it fail with nixpkgs on other packages too, so I agree that it's definitely an upstream issue.

For what it's worth, this workaround fixes the issue for me (for the current version of nixpkgs-unstable, at the time of writing):

  let
    haskellPackages = pkgs.haskell.packages.ghc924.override {
      overrides = hself: hsuper:
        let
          # Ormolu v0.5.0.1 doesn't build correctly on aarch64-darwin.
          # Disabling the "fixity-th" flag seems to fix it.
          # https://github.com/tweag/ormolu/issues/927
          fixOrmolu = p: pkgs.lib.pipe p [
            (pkgs.haskell.lib.compose.addExtraLibrary hself.file-embed)
            (pkgs.haskell.lib.compose.disableCabalFlag "fixity-th")
          ];
        in
        {
          ormolu = hself.ormolu_0_5_0_1;
          ormolu_0_5_0_1 = fixOrmolu hsuper.ormolu_0_5_0_1;
          fourmolu = hself.fourmolu_0_8_2_0;
          fourmolu_0_8_2_0 = fixOrmolu hsuper.fourmolu_0_8_2_0;
        };
    };
asarkar commented 1 year ago

stack install ormolu produces errors. Posting this here because AFAICT, this is the only ticket related to M1/Silicon issues.

 > /private/var/folders/94/bkkwz0cd7nd2_j_xn2fwr8ph0000gn/T/stack-6e894ea60c17753d/ormolu-0.5.0.1/<built-in>:15:10: error:
ormolu                       >      warning: non-portable path to file '".stack-work/dist/aarch64-osx/Cabal-3.6.3.0/build/Ormolu/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
ormolu                       > #include ".stack-work/dist/aarch64-osx/Cabal-3.6.3.0/build/ormolu/autogen/cabal_macros.h"
ormolu                       >          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ormolu                       >          ".stack-work/dist/aarch64-osx/Cabal-3.6.3.0/build/Ormolu/autogen/cabal_macros.h"
ormolu                       > 1 warning generated.