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

fourmolu linker failure on x86_64-linux #1488

Closed
dhess opened this issue May 28, 2022 · 0 comments · Fixed by #1502
Closed

fourmolu linker failure on x86_64-linux #1488

dhess opened this issue May 28, 2022 · 0 comments · Fixed by #1502

Comments

@dhess
Copy link
Contributor

dhess commented May 28, 2022

On 1a013a2, we get the following linker failure when building the latest fourmolu in tools on x86_64-linux:

Preprocessing executable 'fourmolu' for fourmolu-0.6.0.0..
--
  | Building executable 'fourmolu' for fourmolu-0.6.0.0..
  | [1 of 2] Compiling Paths_fourmolu   ( dist/build/fourmolu/autogen/Paths_fourmolu.hs, dist/build/fourmolu/fourmolu-tmp/Paths_fourmolu.o, dist/build/fourmolu/fourmolu-tmp/Paths_fourmolu.dyn_o )
  | [2 of 2] Compiling Main             ( app/Main.hs, dist/build/fourmolu/fourmolu-tmp/Main.o, dist/build/fourmolu/fourmolu-tmp/Main.dyn_o )
  | Linking dist/build/fourmolu/fourmolu ...
  | /nix/store/x2zbyl2l4xayv4d5is0b31plfq8xjjym-binutils-2.35.2/bin/ld.gold: error: /nix/store/3m5k46qh6jv5shfr2sby5s9v1l3lbjm5-ghc-9.2.2/lib/ghc-9.2.2/rts/libHSrts.a(Globals.o): multiple definition of 'ghc_unique_inc'
  | /nix/store/x2zbyl2l4xayv4d5is0b31plfq8xjjym-binutils-2.35.2/bin/ld.gold: /nix/store/njgcfnjq187g9kcayajpb7wdl6mdf39i-ghc-lib-parser-lib-ghc-lib-parser-9.2.3.20220527/lib/x86_64-linux-ghc-9.2.2/ghc-lib-parser-9.2.3.20220527-GvRaPbyuMD52PUlH6TgbMC/libHSghc-lib-parser-9.2.3.20220527-GvRaPbyuMD52PUlH6TgbMC.a(genSym.o): previous definition here
  | /nix/store/x2zbyl2l4xayv4d5is0b31plfq8xjjym-binutils-2.35.2/bin/ld.gold: error: /nix/store/3m5k46qh6jv5shfr2sby5s9v1l3lbjm5-ghc-9.2.2/lib/ghc-9.2.2/rts/libHSrts.a(Globals.o): multiple definition of 'ghc_unique_counter'
  | /nix/store/x2zbyl2l4xayv4d5is0b31plfq8xjjym-binutils-2.35.2/bin/ld.gold: /nix/store/njgcfnjq187g9kcayajpb7wdl6mdf39i-ghc-lib-parser-lib-ghc-lib-parser-9.2.3.20220527/lib/x86_64-linux-ghc-9.2.2/ghc-lib-parser-9.2.3.20220527-GvRaPbyuMD52PUlH6TgbMC/libHSghc-lib-parser-9.2.3.20220527-GvRaPbyuMD52PUlH6TgbMC.a(genSym.o): previous definition here
  | collect2: error: ld returned 1 exit status
  | `gcc' failed in phase `Linker'. (Exit code: 1)
  | error: builder for '/nix/store/4vg3bz0jwgjbis9zp4qxw2azjrdn0m5w-fourmolu-exe-fourmolu-0.6.0.0.drv' failed with exit code 1;
  | last 10 log lines:
  | > Building executable 'fourmolu' for fourmolu-0.6.0.0..
  | > [1 of 2] Compiling Paths_fourmolu   ( dist/build/fourmolu/autogen/Paths_fourmolu.hs, dist/build/fourmolu/fourmolu-tmp/Paths_fourmolu.o, dist/build/fourmolu/fourmolu-tmp/Paths_fourmolu.dyn_o )
  | > [2 of 2] Compiling Main             ( app/Main.hs, dist/build/fourmolu/fourmolu-tmp/Main.o, dist/build/fourmolu/fourmolu-tmp/Main.dyn_o )
  | > Linking dist/build/fourmolu/fourmolu ...
  | > /nix/store/x2zbyl2l4xayv4d5is0b31plfq8xjjym-binutils-2.35.2/bin/ld.gold: error: /nix/store/3m5k46qh6jv5shfr2sby5s9v1l3lbjm5-ghc-9.2.2/lib/ghc-9.2.2/rts/libHSrts.a(Globals.o): multiple definition of 'ghc_unique_inc'
  | > /nix/store/x2zbyl2l4xayv4d5is0b31plfq8xjjym-binutils-2.35.2/bin/ld.gold: /nix/store/njgcfnjq187g9kcayajpb7wdl6mdf39i-ghc-lib-parser-lib-ghc-lib-parser-9.2.3.20220527/lib/x86_64-linux-ghc-9.2.2/ghc-lib-parser-9.2.3.20220527-GvRaPbyuMD52PUlH6TgbMC/libHSghc-lib-parser-9.2.3.20220527-GvRaPbyuMD52PUlH6TgbMC.a(genSym.o): previous definition here
  | > /nix/store/x2zbyl2l4xayv4d5is0b31plfq8xjjym-binutils-2.35.2/bin/ld.gold: error: /nix/store/3m5k46qh6jv5shfr2sby5s9v1l3lbjm5-ghc-9.2.2/lib/ghc-9.2.2/rts/libHSrts.a(Globals.o): multiple definition of 'ghc_unique_counter'
  | > /nix/store/x2zbyl2l4xayv4d5is0b31plfq8xjjym-binutils-2.35.2/bin/ld.gold: /nix/store/njgcfnjq187g9kcayajpb7wdl6mdf39i-ghc-lib-parser-lib-ghc-lib-parser-9.2.3.20220527/lib/x86_64-linux-ghc-9.2.2/ghc-lib-parser-9.2.3.20220527-GvRaPbyuMD52PUlH6TgbMC/libHSghc-lib-parser-9.2.3.20220527-GvRaPbyuMD52PUlH6TgbMC.a(genSym.o): previous definition here
  | > collect2: error: ld returned 1 exit status
  | > `gcc' failed in phase `Linker'. (Exit code: 1)
  | For full logs, run 'nix log /nix/store/4vg3bz0jwgjbis9zp4qxw2azjrdn0m5w-fourmolu-exe-fourmolu-0.6.0.0.drv'.
  | error: 1 dependencies of derivation '/nix/store/f9wbr7qnv5zimaypkc9sz00jdi94wlka-pre-commit-config.json.drv' failed to build
  | error: 1 dependencies of derivation '/nix/store/294rnn5cdnawgkacx35phfkmqqbwpyrr-pre-commit-run.drv' failed to build
  | 🚨 Error: The command exited with status 1
  | user command error: exit status 1


(This is new in the last week; previously fourmolu was building fine with the workaround in #1337.)

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

Successfully merging a pull request may close this issue.

1 participant