ExitError (-11) when /bin/sh is the dash shell

未关闭
#6,806 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
haskell, shell

调研方向

首先,在 /bin/sh 链接到 dash 的情况下,使用报告中所示的详细 stack build 命令重现该故障。跟踪进程调用 ghc-pkg ... dump --expand-pkgroot,然后验证在将 dash 作为 /bin/sh 的情况下,Stack 能够成功完成构建。

由索引模型根据 Issue 内容生成。

描述

component: linux needs reproduction

Please follow the steps below for reporting a bug in Stack:

Make sure that you are using the latest release (currently Stack 3.7.1). See the
upgrade instructions
to upgrade.

Please use the following schema for your bug report:

General summary/comments (optional)

stack gives off ExitError (-11) when /bin/sh is linked to dash

Steps to reproduce

link /bin/sh to /usr/local/bin/dash
run any stack command: for example - stack build

Expected

Build the program.

Actual

Fails to build the program.

If you suspect that a Stack command misbehaved, please include the output of
that command in --verbose mode. If the output is larger than a page please
paste the output in a Gist.

stack --verbose build

Version 3.7.1, Git revision cfae313a06ea9f7278e0ac55a58341fa0440f1aa x86_64 hpack-0.38.1
2025-09-11 16:02:16.517136: [debug] Checking for project config at: /home/joan/.config/xmonad/stack.yaml
2025-09-11 16:02:16.517372: [debug] Loading project config file stack.yaml
2025-09-11 16:02:16.519595: [debug] Use of Casa server enabled: (CasaRepoPrefix "https://casa.stackage.org", 1280).
2025-09-11 16:02:16.521620: [debug] (SQL) SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2025-09-10 13:02:16.521587036 UTC]
2025-09-11 16:02:16.522097: [debug] Using package location completions from a lock file
2025-09-11 16:02:16.531135: [debug] Loaded snapshot from Pantry database.
2025-09-11 16:02:16.733574: [debug] Running Hpack on /home/joan/.config/xmonad/package.yaml
2025-09-11 16:02:16.735726: [debug] Hpack output unchanged in /home/joan/.config/xmonad/exmonad.cabal
2025-09-11 16:02:16.736369: [debug] Prefetching git repos: []
2025-09-11 16:02:16.736408: [debug] []
2025-09-11 16:02:16.748622: [debug] Asking for a supported GHC version
2025-09-11 16:02:16.748790: [debug] Installed tools: 
 - ghc-tinfo6-9.10.2
2025-09-11 16:02:16.748913: [debug] Run process: /sbin/ldconfig -p
2025-09-11 16:02:16.750329: [debug] Process finished in 1ms: /sbin/ldconfig -p
2025-09-11 16:02:16.750378: [debug] Did not find shared library libc.musl-x86_64.so.1
2025-09-11 16:02:16.750447: [debug] Run process: /bin/ldd --version
2025-09-11 16:02:16.752107: [debug] Process finished in 2ms: /bin/ldd --version
2025-09-11 16:02:16.752154: [debug] Found shared library libc6 in version: 2.42
2025-09-11 16:02:16.752600: [debug] Did not find shared library libtinfo.so.5
2025-09-11 16:02:16.752708: [debug] Found shared library libtinfo.so.6 in /usr/lib/
2025-09-11 16:02:16.752750: [debug] Found shared library libncursesw.so.6 in 'ldconfig -p' output
2025-09-11 16:02:16.752802: [debug] Found shared library libgmp.so.10 in 'ldconfig -p' output
2025-09-11 16:02:16.752979: [debug] Did not find shared library libgmp.so.3
2025-09-11 16:02:16.753011: [debug] Potential GHC builds: tinfo6, ncurses6
2025-09-11 16:02:16.753071: [debug] Found already installed GHC builds: tinfo6
2025-09-11 16:02:16.753250: [debug] (SQL) SELECT "id","actual_version","arch","ghc_path","ghc_size","ghc_modified","ghc_pkg_path","runghc_path","haddock_path","cabal_version","global_db","global_db_cache_size","global_db_cache_modified","info","global_dump" FROM "compiler_cache" WHERE "ghc_path"=?; [PersistText "/home/joan/.local/share/stack/programs/x86_64-linux/ghc-tinfo6-9.10.2/bin/ghc-9.10.2"]
2025-09-11 16:02:16.799258: [debug] Loaded compiler information from cache
2025-09-11 16:02:16.799393: [debug] Asking for a supported GHC version
2025-09-11 16:02:16.799442: [debug] Resolving package entries
2025-09-11 16:02:16.799504: [debug] Parsing the targets
2025-09-11 16:02:16.804234: [debug] Applying and checking flags
2025-09-11 16:02:16.806935: [debug] SourceMap constructed
2025-09-11 16:02:16.812329: [debug] Starting to execute command inside EnvConfig
2025-09-11 16:02:16.815174: [debug] Finding out which packages are already installed
2025-09-11 16:02:16.815343: [debug] Run process: /home/joan/.local/share/stack/programs/x86_64-linux/ghc-tinfo6-9.10.2/bin/ghc-pkg-9.10.2 --global --no-user-package-db dump --expand-pkgroot
2025-09-11 16:02:16.896271: [error] Received ExitFailure (-11) when running
Raw command: /home/joan/.local/share/stack/programs/x86_64-linux/ghc-tinfo6-9.10.2/bin/ghc-pkg-9.10.2 --global --no-user-package-db dump --expand-pkgroot
Stack version
stack --version
Version 3.7.1, Git revision cfae313a06ea9f7278e0ac55a58341fa0440f1aa x86_64 hpack-0.38.1
Method of installation
  • Official binary, downloaded via haskellstack.org or from Stack's repository
Platform

Arch Linux x86_64 - amd64, normal 64bit intel i5

主要语言
Haskell
星标
4.1k
派生
857
平均合并
17 小时 32 分钟
30 天内合并 PR
5

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

commercialhaskell/stack 的其他 Issue

查看 commercialhaskell/stack 的全部 Issue

相似的 Issue

更多 Haskell Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。