Bug#1052144: ghc: Needs to link against libatomic on at least m68k

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.ports.68k
Message-ID <169502053988.1688451.13125723432827682312.reportbug__31827.8281878278$1695020637$gmane$org@nofan.physik.fu-berlin.de>
Source: ghc
Version: 9.4.6-1
Severity: normal
User: [email protected]
Usertags: m68k
X-Debbugs-Cc: [email protected]

Hello!

On m68k, building ghc fails with:

"inplace/bin/ghc-stage1" -o utils/iserv/stage2_p/build/tmp/ghc-iserv-prof -hisuf p_hi -osuf  p_o -hcsuf p_hc -static -prof  -H32m -O -lffi -optl-pthread -Wall     -hide-all-packages -package-env - -i -iutils/iserv/src -iutils/iserv/stage2_p/build -Iutils/iserv/stage2_p/build -iutils/iserv/stage2_p/build/iserv/autogen -Iutils/iserv/stage2_p/build/iserv/autogen -Iutils/iserv/. -Iutils/iserv/stage2_p/build/.  -optP-include -optPutils/iserv/stage2_p/build/iserv/autogen/cabal_macros.h -package-id array-0.5.4.0 -package-id base-4.17.2.0 -package-id binary-0.8.9.1 -package-id bytestring-0.11.5.1 -package-id containers-0.6.7 -package-id deepseq-1.4.8.0 -package-id ghci-9.4.6 -package-id libiserv-9.4.6 -package-id unix-2.7.3 -no-hs-main -XHaskell2010  -threaded -optl-Wl,--export-dynamic -no-hs-main -no-user-package-db -rtsopts      -Wnoncanonical-monad-instances  -outputdir utils/iserv/stage2_p/build -split-sections   -static -prof  -H32m -O -lffi -optl-pthread -Wall     -hide-all-packages -package-env - -i -iutils/iserv/src -iutils/iserv/stage2_p/build -Iutils/iserv/stage2_p/build -iutils/iserv/stage2_p/build/iserv/autogen -Iutils/iserv/stage2_p/build/iserv/autogen -Iutils/iserv/. -Iutils/iserv/stage2_p/build/.  -optP-include -optPutils/iserv/stage2_p/build/iserv/autogen/cabal_macros.h -package-id array-0.5.4.0 -package-id base-4.17.2.0 -package-id binary-0.8.9.1 -package-id bytestring-0.11.5.1 -package-id containers-0.6.7 -package-id deepseq-1.4.8.0 -package-id ghci-9.4.6 -package-id libiserv-9.4.6 -package-id unix-2.7.3 -no-hs-main -XHaskell2010  -threaded -optl-Wl,--export-dynamic -no-hs-main -no-user-package-db -rtsopts      -Wnoncanonical-monad-instances  utils/iserv/stage2_p/build/Main.p_o utils/iserv/stage2_p/build/cbits/iservmain.p_o    
Warning: -rtsopts and -with-rtsopts have no effect with -no-hs-main.
    Call hs_init_ghc() from your main() function to set these options.
/usr/bin/ld.bfd: /<<PKGBUILDDIR>>/libraries/ghc-prim/dist-install/build/libHSghc-prim-0.9.1_p.a(atomic.p_o): in function `hs_cmpxchg64':
atomic.c:(.text.hs_cmpxchg64+0x16): undefined reference to `__sync_val_compare_and_swap_8'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
make[2]: *** [utils/iserv/ghc.mk:104: utils/iserv/stage2_p/build/tmp/ghc-iserv-prof] Error 1
make[2]: *** Waiting for unfinished jobs....


which indicates that the build needs to link against libatomic.

This issue has also been reported upstream [1].

Thanks,
Adrian

> [1] https://gitlab.haskell.org/ghc/ghc/-/issues/23974

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.