Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Another problem with Windows target and `compiler_builtins`

オープン
#801 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
rust
領域
compilers

調査の方向性

報告された bootstrap.toml を使って ./x build を再現することから始め、ターゲット x86_64-pc-windows-gnu に対する compiler_builtins の失敗を調査してください。一時ファイル fake.s がどのように組み立てられるか、また設定されたリンカーが使用されているかを調査してください。誤ったセクションディレクティブの原因を特定し、検証済みの修正または明確な再現手順を定義できれば完了です。

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

説明

Cloned latest Rust,ran ./x build with the following bootstrap.toml:

profile = "dist"  
change-id = 148636

[build]
build-stage = 1
target = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu"]

[rust]
codegen-backends = ["gcc"]  

[target.x86_64-pc-windows-gnu]
cc = "x86_64-w64-mingw32-gcc"
cxx = "x86_64-w64-mingw32-g++"
ar = "x86_64-w64-mingw32-ar"
ranlib = "x86_64-w64-mingw32-ranlib"
linker = "x86_64-w64-mingw32-gcc"

and resulted in:

Building stage1 library artifacts{alloc, compiler_builtins, core, panic_abort, panic_unwind, proc_macro, rustc-std-workspace-core, std, std_detect, sysroot, test, unwind} (stage1:x86_64-unknown-linux-gnu -> stage1:x86_64-pc-windows-gnu)
.......(lots of messages)
/tmp/libgccjit-yPspPh/fake.s: Assembler messages:
/tmp/libgccjit-yPspPh/fake.s:51: fatal error: bad .section directive: want a,l,w,x,M,S,G,T in string
libgccjit.so: error: : error invoking gcc driver
error: failed to build archive at `(rust project dir)/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-pc-windows-gnu/release/deps/libcompiler_builtins-4c849587cc5e14fa.rlib`: failed to open object file: no such file or directory (os error 2)

I've learned the bad .section directive error may be caused by invoking a Linux targeted gcc against a Windows .s file, but I don't understand the detail since I've specified linker = "x86_64-w64-mingw32-gcc" already.

By the way, How to keep temporary file(s) of compilation such as /tmp/libgccjit-yPspPh/fake.s ? They simply vanished when I am to inspect them.

主要言語
Rust
スター
1.2k
フォーク
105
平均マージ
6時間 23分
マージ済み PR(30日)
19

環境構築

はじめの一歩

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

rust-lang/rustc_codegen_gcc のほかの issue

rust-lang/rustc_codegen_gcc の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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