Summary
Building library/std for hexagon-unknown-qurt from the current rust-lang/rust master (using a custom bootstrap.toml for Hexagon/QURT toolchain) fails. I hit a sequence of failures (libunwind headers, then libc target support), and even after switching to a local libc fork + allowing warnings, std still fails with many missing libc symbols/types and missing platform modules.
Steps to reproduce (Command used)
-
Clone Rust:
git clone https://github.com/rust-lang/rust.git
cd rust
- rust
git rev-parse HEAD: 7704328ba5ae8d6ce0ac303c9d5a1a1605906766
-
Create bootstrap.toml (example below) and point it at the Hexagon toolchain.
-
Clean and build std for Hexagon/QURT:
./x.py clean
./x.py build --stage 1 library/std --target hexagon-unknown-qurt
Expected behaviour
./x.py build --stage 1 library/std --target hexagon-unknown-qurt succeeds (or fails with a clear “target unsupported” message if this target is not expected to build std).
Actual behaviour
-
Baseline: build from current Rust git + recommended-ish bootstrap.toml
Command:
./x.py build --stage 1 library/std --target hexagon-unknown-qurt
Failure (libunwind build step) (terminal_output_ver1.txt):
- While building
libunwind.a for hexagon-unknown-qurt, compilation fails because link.h is missing:
.../libunwind/src/AddressSpace.hpp: fatal error: 'link.h' file not found
-
Tried disabling libunwind
Change:
- Set
llvm-libunwind = "no" and backtrace = false.
Result terminal_output_ver2.txt:
- This allowed progress past the libunwind failure, but the build later failed in
libc/std compilation:
error[E0432]: unresolved import 'unistd' (coming from libc internals for the target).
-
Switched to local libc (fork/path override)
Attempted:
cargo update -p libc (updated libc version in the lockfile, but did not resolve the target issue).
- Switched to a local libc checkout/fork (path override) based on
rust-lang/libc with QURT/hexagon adjustments.
- clib
git rev-parse HEAD: 4b38c69e31afadbead63af49794850b5a41f7dc4
Result terminal_output_ver3.txt:
- Build aborted due to “warnings are denied …” (warnings treated as errors).
-
Tried allowing warnings
Attempt:
- Added
deny-warnings = false in bootstrap.toml.
Result terminal_output_ver4.txt:
-
The build moved forward using the local libc, but then generated many libc-related issues:
- lots of missing libc functions/constants/types (
open, pread, pwrite, fcntl, O_*, socket constants, signals, etc.).
- and additional errors where libc items are present but not publicly exported as expected (private type aliases/modules).
-
In addition, std fails with missing platform modules for unix paths (e.g. cannot find platform::fs / platform::raw).
Bootstrap configuration (bootstrap.toml)
[build]
build-stage = 1
host = ["x86_64-unknown-linux-gnu"]
target = ["x86_64-unknown-linux-gnu", "hexagon-unknown-qurt"]
[target.hexagon-unknown-qurt]
cc = "/home/user/Projects/qualcomm/5.5.2.0/tools/HEXAGON_Tools/8.7.06/Tools/bin/hexagon-clang"
cxx = "/home/user/Projects/qualcomm/5.5.2.0/tools/HEXAGON_Tools/8.7.06/Tools/bin/hexagon-clang++"
ar = "llvm-ar"
ranlib = "llvm-ranlib"
llvm-libunwind = 'in-tree'
Also tried:
[rust]
backtrace = false
[target.hexagon-unknown-qurt]
llvm-libunwind = "no"
And:
[rust]
deny-warnings = false
Operating system
- Host:
x86_64-unknown-linux-gnu (Linux VM)
- Target:
hexagon-unknown-qurt
- Hexagon toolchain:
hexagon-clang/clang++ from Qualcomm HEXAGON Tools (8.7.06) (paths in bootstrap.toml)
- Build command:
./x.py build --stage 1 library/std --target hexagon-unknown-qurt
HEAD
rust git rev-parse HEAD: 7704328ba5ae8d6ce0ac303c9d5a1a1605906766
clib git rev-parse HEAD: 4b38c69e31afadbead63af49794850b5a41f7dc4
Additional context
- Is
hexagon-unknown-qurt expected to support building std in-tree?
- It seems like it suggests/targets std support based on:
- If yes: what is the intended libc + unwind setup for this target (in-tree libunwind vs SDK/unwindless, libc source/version/branch)?
- If no: is there an official stance / tracking issue for
core/alloc-only vs std support for this target?
Summary
Building
library/stdforhexagon-unknown-qurtfrom the currentrust-lang/rustmaster (using a custombootstrap.tomlfor Hexagon/QURT toolchain) fails. I hit a sequence of failures (libunwind headers, then libc target support), and even after switching to a local libc fork + allowing warnings,stdstill fails with many missing libc symbols/types and missing platform modules.Steps to reproduce (Command used)
Clone Rust:
git clone https://github.com/rust-lang/rust.git cd rustgit rev-parse HEAD:7704328ba5ae8d6ce0ac303c9d5a1a1605906766Create
bootstrap.toml(example below) and point it at the Hexagon toolchain.Clean and build std for Hexagon/QURT:
Expected behaviour
./x.py build --stage 1 library/std --target hexagon-unknown-qurtsucceeds (or fails with a clear “target unsupported” message if this target is not expected to buildstd).Actual behaviour
Baseline: build from current Rust git + recommended-ish bootstrap.toml
Command:
Failure (libunwind build step) (terminal_output_ver1.txt):
libunwind.aforhexagon-unknown-qurt, compilation fails becauselink.his missing:Tried disabling libunwind
Change:
llvm-libunwind = "no"andbacktrace = false.Result terminal_output_ver2.txt:
libc/stdcompilation:error[E0432]: unresolved import 'unistd'(coming fromlibcinternals for the target).Switched to local libc (fork/path override)
Attempted:
cargo update -p libc(updatedlibcversion in the lockfile, but did not resolve the target issue).rust-lang/libcwith QURT/hexagon adjustments.git rev-parse HEAD:4b38c69e31afadbead63af49794850b5a41f7dc4Result terminal_output_ver3.txt:
Tried allowing warnings
Attempt:
deny-warnings = falseinbootstrap.toml.Result terminal_output_ver4.txt:
The build moved forward using the local libc, but then generated many libc-related issues:
open,pread,pwrite,fcntl,O_*, socket constants, signals, etc.).In addition,
stdfails with missingplatformmodules forunixpaths (e.g. cannot findplatform::fs/platform::raw).Bootstrap configuration (
bootstrap.toml)Also tried:
And:
Operating system
x86_64-unknown-linux-gnu(Linux VM)hexagon-unknown-qurthexagon-clang/clang++from Qualcomm HEXAGON Tools (8.7.06) (paths inbootstrap.toml)HEAD
rust
git rev-parse HEAD:7704328ba5ae8d6ce0ac303c9d5a1a1605906766clib
git rev-parse HEAD:4b38c69e31afadbead63af49794850b5a41f7dc4Additional context
hexagon-unknown-qurtexpected to support buildingstdin-tree?rust-lang/rusttarget support PR: Add support for hexagon-unknown-qurt target #147173.rust-lang/libcQuRT support commit: rust-lang/libc@8ecae6c.std): https://doc.rust-lang.org/nightly/rustc/platform-support/hexagon-unknown-qurt.html.core/alloc-only vsstdsupport for this target?