Windows: .../ghc-9.4.8/mingw/bin/strip.exe: error: Permission denied

オープン
#6,627 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
haskell

調査の方向性

issue に記載された Setup.hs のコピー手順と Cabal の Distribution.Simple.GHC.installExe/installBinary パスから始めます。Windows で提供された Stack コマンドを使って失敗を再現し、その後、strip.exe がインストールされた happy.exe をどのように扱うかを調査します。権限エラーが説明され、ビルドが確実に完了し、リポジトリに適切なテスト場所がある場合は影響を受けるパスのカバレッジが追加されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

component: build component: Cabal library resolution: upstream issue type: bug

While building happy-1.20.1.1 with GHC 9.4.8 on Windows in CI, @hausfell experienced:

happy > .../ghc-9.4.8/mingw/bin/strip.exe: error: Permission denied

This was during the Setup.hs copy step, which sees Cabal (the library), by default, run strip after having moved the executable file to a new location. For example, during stack --verbose build --cabal-verbose --ghc-options=-v:

2024-07-19 18:17:18.401203: [info] creating
2024-07-19 18:17:18.401203: [info] ...\happy-1.20.1.1\.stack-work\install\fd1b2601\bin
2024-07-19 18:17:18.401203: [info] Installing executable .stack-work\dist\f1a1ac53\build\happy\happy.exe to
2024-07-19 18:17:18.401203: [info] ...\happy-1.20.1.1\.stack-work\install\fd1b2601\bin\happy.exe
2024-07-19 18:17:18.401203: [info] "...\ghc-9.4.8\mingw\bin\strip.exe" "...\happy-1.20.1.1\.stack-work\install\fd1b2601\bin\happy.exe"

I think it must be strip.exe seeking to overwrite happy.exe when it is not yet free to do so, for some reason.

Cabal's Distribution.Simple.GHC.installExe has (extract):

        installBinary dest = do
          installExecutableFile
            verbosity
            (buildPref </> exeName' </> exeFileName)
            (dest <.> exeExtension (hostPlatform lbi))
          when (stripExes lbi) $
            Strip.stripExe
              verbosity
              (hostPlatform lbi)
              (withPrograms lbi)
              (dest <.> exeExtension (hostPlatform lbi))

So, it looks to me that things are properly sequenced. Could it be a problem within the MSYS2-supplied strip.exe itself?

主要言語
Haskell
スター
4.1k
フォーク
857
平均マージ
17時間 32分
マージ済み PR(30日)
5

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

commercialhaskell/stack のほかの issue

commercialhaskell/stack の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。