lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
690 stars 72 forks source link

Does not build on macOS #280

Closed ldub closed 4 years ago

ldub commented 4 years ago

Running nix-build release.nix on macOS Catalina fails to compile ghc-exactprint.

[13 of 13] Compiling Language.Haskell.GHC.ExactPrint ( src/Language/Haskell/GHC/ExactPrint.hs, dist/build/Language/Haskell/GHC/ExactPrint.p_o )
clang-5.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang-5.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
ld: warning: /nix/store/b4999gs8shcp1cargh2wg51lzwflabvi-libiconv-osx-10.11.6/lib/libiconv.dylib, ignoring unexpected dylib file
ld: warning: /nix/store/b4999gs8shcp1cargh2wg51lzwflabvi-libiconv-osx-10.11.6/lib/libiconv.dylib, ignoring unexpected dylib file
ignoring (possibly broken) abi-depends field for packages
Preprocessing test suite 'test' for ghc-exactprint-0.5.8.0..
Building test suite 'test' for ghc-exactprint-0.5.8.0..
[1 of 5] Compiling Test.Consistency ( tests/Test/Consistency.hs, dist/build/test/test-tmp/Test/Consistency.o )
[2 of 5] Compiling Test.Common      ( tests/Test/Common.hs, dist/build/test/test-tmp/Test/Common.o )
[3 of 5] Compiling Test.NoAnnotations ( tests/Test/NoAnnotations.hs, dist/build/test/test-tmp/Test/NoAnnotations.o )
[4 of 5] Compiling Test.Transform   ( tests/Test/Transform.hs, dist/build/test/test-tmp/Test/Transform.o )
[5 of 5] Compiling Main             ( tests/Test.hs, dist/build/test/test-tmp/Main.o )
Linking dist/build/test/test ...
clang-5.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
clang-5.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
running tests
Running 1 test suites...
Test suite test: RUNNING...
GHC82
### Failure in: 1:Round-trip tests:1:ghc710:20:Control.hs
tests/Test/Common.hs:123
Control.hs
### Failure in: 1:Round-trip tests:1:ghc710:75:Internals.hs
tests/Test/Common.hs:123
Internals.hs
Cases: 1764  Tried: 1764  Errors: 0  Failures: 2
Counts {cases = 1764, tried = 1764, errors = 0, failures = 2}
Test suite test: FAIL
Test suite logged to: dist/test/ghc-exactprint-0.5.8.0-test.log
0 of 1 test suites (0 of 1 test cases) passed.
builder for '/nix/store/h4li5kmazwjndibzfhb8za76fqw7w0i6-ghc-exactprint-0.5.8.0.drv' failed with exit code 1
cannot build derivation '/nix/store/9gn510rp6wcv7kf2dln2z9z053kr242v-brittany-0.12.1.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/9gn510rp6wcv7kf2dln2z9z053kr242v-brittany-0.12.1.1.drv' failed
lspitzner commented 4 years ago

I will forward you to https://github.com/alanz/ghc-exactprint/issues/66.

(At one point we had an issue with CPP in macOS; I think macro expansion behaviour was different when there was whitespace involved? These kind of bugs are annoying to track down.)

I don't think brittany is involved here, and there is nothing I could do to mitigate this, so I am gonna close this.