haddock crashes with SIGILL when building under DragonFly BSD
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 43/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
调研方向
从 issue 中引用的 COMPILER_SUPPORTS_AVX512 条件附近的 cbits/measure_off.c 开始,然后在 DragonFly BSD 上重现 ghc-9.4.6 构建。比较 AVX512 路径和回退路径,并验证在 AVX512 不可用时 Haddock 能够在不发生 SIGILL 的情况下完成。
由索引模型根据 Issue 内容生成。
描述
While building ghc-9.4.6 under DragonFly BSD we got a strange haddock crash:
/----------------------------------------------------------\
| Successfully built program 'ghc-bin' (Stage1). |
| Executable: _build/stage1/bin/ghc |
| Program synopsis: The Glorious Glasgow Haskell Compiler. |
\----------------------------------------------------------/
| Create directory _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly
| Create directory _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin
| Create directory _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/lib
| Copy file: _build/stage1/bin/ghc => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/ghc-9.4.5
| Copy file: _build/stage1/bin/ghc-pkg => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/ghc-pkg-9.4.5
| Copy file: _build/stage1/bin/hp2ps => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/hp2ps-ghc-9.4.5
| Copy file: _build/stage1/bin/hsc2hs => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/hsc2hs-ghc-9.4.5
| Copy file: _build/stage1/lib/bin/unlit => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/unlit-ghc-9.4.5
| Copy file: _build/stage1/bin/haddock => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/haddock-ghc-9.4.5
| Copy file: _build/stage1/bin/hpc => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/hpc-ghc-9.4.5
| Copy file: _build/stage1/lib/bin/ghc-iserv-dyn => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/ghc-iserv-dyn-ghc-9.4.5
| Copy file: _build/stage1/bin/runghc => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/runghc-9.4.5
| Copy file: _build/stage1/lib/bin/ghc-iserv => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/ghc-iserv-ghc-9.4.5
| Copy file: _build/stage1/lib/bin/ghc-iserv-prof => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/ghc-iserv-prof-ghc-9.4.5
| Copy file: _build/stage1/lib/bin/ghc-iserv-dyn => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/bin/ghc-iserv-dyn-ghc-9.4.5
| Copy directory: _build/stage1/lib => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly
| Copy directory: _build/stage1/lib/x86_64-dragonfly-ghc-9.4.5/rts-1.0.2/include => _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly
# ghc-pkg (for binary-dist-dir)
| Remove file _build/bindist/ghc-9.4.5-x86_64-portbld-dragonfly/lib/settings
| Run Sphinx ManMode: docs/users_guide => /tmp/extra-dir-6060607777810
| Run Sphinx LatexMode: utils/haddock/doc => /tmp/extra-dir-6060607777808
| Run Sphinx HtmlMode: utils/haddock/doc => _build/doc/html/Haddock
| Create directory _build/stage1/haddock-timing-files
| Run Haddock BuildPackage: libraries/ghc-prim/GHC/CString.hs (and 12 more) => _build/doc/html/libraries/ghc-prim-0.9.0/ghc-prim.haddock
| Run Sphinx LatexMode: docs/users_guide => /tmp/extra-dir-6060607777809
| Run Sphinx HtmlMode: docs/users_guide => _build/doc/html/users_guide
Command line: _build/stage1/bin/haddock --verbosity=0 -B_build/stage1/lib --lib=_build/stage1/lib --odir=_build/doc/html/libraries/ghc-prim-0.9.0 --dump-interface=_build/doc/html/libraries/ghc-prim-0.9.0/ghc-prim.haddock --html --hyperlinked-source --hoogle --quickjump '--title=ghc-prim-0.9.0: GHC primitives' --prologue=_build/doc/html/libraries/ghc-prim-0.9.0/haddock-prologue.txt --optghc=-D__HADDOCK_VERSION__=2270 --optghc=-hisuf --optghc=dyn_hi --optghc=-osuf --optghc=dyn_o --optghc=-hcsuf --optghc=dyn_hc --optghc=-fPIC --optghc=-dynamic --optghc=-hide-all-packages --optghc=-no-user-package-db '--optghc=-package-env -' '--optghc=-this-unit-id ghc-prim-0.9.0' '--optghc=-package-id rts-1.0.2' --optghc=-i --optghc=-i/construction/lang/ghc/ghc-9.4.5/_build/stage1/libraries/ghc-prim/build --optghc=-i/construction/lang/ghc/ghc-9.4.5/_build/stage1/libraries/ghc-prim/build/autogen --optghc=-i/construction/lang/ghc/ghc-9.4.5/libraries/ghc-prim --optghc=-Irts/include --optghc=-I_build/stage1/libraries/ghc-prim/build --optghc=-I/usr/local/include --optghc=-I/construction/lang/ghc/ghc-9.4.5/_build/stage1/lib/x86_64-dragonfly-ghc-9.4.5/rts-1.0.2/include --optghc=-optP-include --optghc=-optP_build/stage1/libraries/ghc-prim/build/autogen/cabal_macros.h --optghc=-outputdir --optghc=_build/stage1/libraries/ghc-prim/build --optghc=-this-unit-id --optghc=ghc-prim --optghc=-XHaskell2010 --optghc=-no-global-package-db --optghc=-package-db=/construction/lang/ghc/ghc-9.4.5/_build/stage1/lib/package.conf.d --optghc=-ghcversion-file=rts/include/ghcversion.h --optghc=-ghcversion-file=rts/include/ghcversion.h --optghc=-Wno-deprecated-flags --optghc=-Wno-trustworthy-safe libraries/ghc-prim/GHC/CString.hs libraries/ghc-prim/GHC/Classes.hs libraries/ghc-prim/GHC/Debug.hs libraries/ghc-prim/GHC/Magic.hs libraries/ghc-prim/GHC/Magic/Dict.hs libraries/ghc-prim/GHC/Prim/Exception.hs libraries/ghc-prim/GHC/Prim/Ext.hs libraries/ghc-prim/GHC/Prim/Panic.hs libraries/ghc-prim/GHC/Prim/PtrEq.hs _build/stage1/libraries/ghc-prim/build/GHC/PrimopWrappers.hs libraries/ghc-prim/GHC/Tuple.hs libraries/ghc-prim/GHC/Types.hs _build/stage1/libraries/ghc-prim/build/GHC/Prim.hs +RTS -t_build/stage1/haddock-timing-files/ghc-prim.t --machine-readable -RTS
===> Command failed with error code: -4
Command failed
Build failed.
After some investigation, it seems the issue is that DragonFly BSD does not support AVX512. So changing the ifdef here:
https://github.com/haskell/text/blob/master/cbits/measure_off.c#L214
To avoid going through the avx512 path solved the issue and the build finished ok.
I am not sure whether other OSes will be affected by this issue but it seems the declaration of COMPILER_SUPPORTS_AVX512 alone might not be enough?
- 主要语言
- Haskell
- 星标
- 424
- 派生
- 167
- 平均合并
- 1 天 21 小时
- 30 天内合并 PR
- 6
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
haskell/text 的其他 Issue
-
Relax constraints on decimal / hexadecimal from Data.Text.Read and Data.Text.Lazy.Read可能已有人在做 @Lysxia 于 148 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 64/100
-
难度 3/5 1-2 天 新手友好度 38/100
-
难度 3/5 1-2 天 新手友好度 42/100
-
难度 2/5 1-3 小时 新手友好度 45/100
-
Shrinking is Insanely Slow for `write_read`可能已有人在做 @BebeSparkelSparkel 于 926 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 30/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
haskell/bytestring#730 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
seal-harness/seal-harness#399 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
fmidue/codeworld-tasks#124 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
reflex-frp/reflex#563 ·