Bug#1090806: ghc unimplemented SMP memory barriers on hppa architecture

Helge Deller deller at gmx.de
Thu Dec 19 13:54:17 GMT 2024


Package: ghc
Version: 9.6.6-3
Tags: ftbfs
Usertags: hppa

The ghc source package provides this header file for other programs:
rts-1.0.2/include/stg/SMP.h

So, when building the haskell-ghc-lib-parser package the compiler generates this error:
error: In file included from /usr/lib/ghc/lib/../lib/hppa-linux-ghc-9.6.6/rts-1.0.2/include/Stg.h:415,
                  from /usr/lib/ghc/lib/../lib/hppa-linux-ghc-9.6.6/rts-1.0.2/include/Rts.h:38,
                  from FFIClosures_ProfilingDisabled.hsc:9:
/usr/lib/ghc/lib/../lib/hppa-linux-ghc-9.6.6/rts-1.0.2/include/stg/SMP.h: In function ‘write_barrier’:
/usr/lib/ghc/lib/../lib/hppa-linux-ghc-9.6.6/rts-1.0.2/include/stg/SMP.h:496:2: error: #error memory barriers unimplemented on this architecture
   496 | #error memory barriers unimplemented on this architecture
       |  ^~~~~
/usr/lib/ghc/lib/../lib/hppa-linux-ghc-9.6.6/rts-1.0.2/include/stg/SMP.h: In function ‘store_load_barrier’:
/usr/lib/ghc/lib/../lib/hppa-linux-ghc-9.6.6/rts-1.0.2/include/stg/SMP.h:522:2: error: #error memory barriers unimplemented on this architecture
   522 | #error memory barriers unimplemented on this architecture
       |  ^~~~~
/usr/lib/ghc/lib/../lib/hppa-linux-ghc-9.6.6/rts-1.0.2/include/stg/SMP.h: In function ‘load_load_barrier’:
/usr/lib/ghc/lib/../lib/hppa-linux-ghc-9.6.6/rts-1.0.2/include/stg/SMP.h:548:2: error: #error memory barriers unimplemented on this architecture
   548 | #error memory barriers unimplemented on this architecture

Full log is here:
https://buildd.debian.org/status/fetch.php?pkg=haskell-ghc-lib-parser&arch=hppa&ver=9.6.6.20240701-1&stamp=1726567569&raw=0

The attached patch seems to work.
Alternatively,
__asm__ __volatile__ ("sync" : : : "memory");
should work instead of __sync_synchronize() as well.

Can you please verify, apply it and bring this or a similiar patch upstream?

Thanks!
Helge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SMP.h.patch
Type: text/x-patch
Size: 1101 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-maintainers/attachments/20241219/0cbd79d8/attachment.bin>


More information about the Pkg-haskell-maintainers mailing list