Skip to content

Failed to run local build via citool for OHOS targets #144980

@LuuuXXX

Description

@LuuuXXX

Source Code

git clone -b 1.87.0 https://github.com/rust-lang/rust.git --depth=1

Command used

cargo run --manifest-path src/ci/citool/Cargo.toml run-local dist-ohos

Expected behaviour

Successfully built OHOS targets using the citool run-local command.

Actual behaviour

Building compiler artifacts (stage1:x86_64-unknown-linux-gnu -> stage2:aarch64-unknown-linux-ohos)
[RUSTC-TIMING] build_script_build test:false 0.289
[RUSTC-TIMING] unicode_ident test:false 0.073
...
[RUSTC-TIMING] unicode_security test:false 1.088
   Compiling tracing-subscriber v0.3.18
[RUSTC-TIMING] nix test:false 2.450
[RUSTC-TIMING] time test:false 2.234
[RUSTC-TIMING] ctrlc test:false 0.155
error: empty search path given via `-L`

[RUSTC-TIMING] rustc_llvm test:false 0.017
error: could not compile `rustc_llvm` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

Bootstrap configuration (bootstrap.toml)

This file was automatically generated by citool and is located in the obj/dist-ohos directory.

# Use different pre-set defaults than the global defaults.
#
# See `src/bootstrap/defaults` for more information.
# Note that this has no default value (x.py uses the defaults in `bootstrap.example.toml`).
profile = 'dist'

[llvm]

# When true, link libstdc++ statically into the rustc_llvm.
# This is useful if you don't want to use the dynamic version of that
# library provided by LLVM.
static-libstdcpp = true

[gcc]
# Download GCC from CI instead of building it locally.
# Note that this will attempt to download GCC even if there are local
# modifications to the `src/gcc` submodule.
# Currently, this is only supported for the `x86_64-unknown-linux-gnu` target.
# download-ci-gcc = false

[build]

# Whether to build documentation by default. If false, rustdoc and
# friends will still be compiled but they will not be used to generate any
# documentation.
#
# You can still build documentation when this is disabled by explicitly passing paths,
# e.g. `x doc library`.
docs = false

# Indicate whether git submodules are managed and updated automatically.
submodules = false

# Force Cargo to check that Cargo.lock describes the precise dependency
# set that all the Cargo.toml files create, instead of updating it.
locked-deps = true

# Enable a build of the extended Rust tool set which is not only the compiler
# but also tools such as Cargo. This will also produce "combined installers"
# which are used to install Rust and Cargo together.
# The `tools` (check `bootstrap.example.toml` to see its default value) option specifies
# which tools should be built if `extended = true`.
#
# This is disabled by default.
extended = true

# Set of tools to be included in the installation.
#
# If `extended = false`, the only one of these built by default is rustdoc.
#
# If `extended = true`, they are all included.
#
# If any enabled tool fails to build, the installation fails.
tools = ['cargo', 'clippy', 'rustdocs', 'rustfmt', 'rust-analyzer', 'rust-analyzer-proc-macro-srv', 'analysis', 'src', 'wasm-component-ld']
#    "cargo",
#    "clippy",
#    "rustdoc",
#    "rustfmt",
#    "rust-analyzer",
#    "rust-analyzer-proc-macro-srv",
#    "analysis",
#    "src",
#    "wasm-component-ld",
#    "miri", "cargo-miri" # for dev/nightly channels
#]

# Build the sanitizer runtimes
sanitizers = true

# Build the profiler runtime (required when compiling with options that depend
# on this runtime, such as `-C profile-generate` or `-C instrument-coverage`).
profiler = true

# Use the optimized LLVM C intrinsics for `compiler_builtins`, rather than Rust intrinsics.
# Requires the LLVM submodule to be managed by bootstrap (i.e. not external) so that `compiler-rt`
# sources are available.
#
# Setting this to `false` generates slower code, but removes the requirement for a C toolchain in
# order to run `x check`.
optimized-compiler-builtins = true

# Indicates whether the native libraries linked into Cargo will be statically
# linked or not.
cargo-native-static = true

# Arguments passed to the `./configure` script, used during distcheck. You
# probably won't fill this in but rather it's filled in by the `./configure`
# script. Useful for debugging.
configure-args = ['--enable-profiler', '--disable-docs', '--tools=cargo,clippy,rustdocs,rustfmt,rust-analyzer,rust-analyzer-proc-macro-srv,analysis,src,wasm-component-ld', '--enable-extended', '--enable-sanitizers', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=stable', '--enable-llvm-static-stdcpp', '--set', 'rust.remap-debuginfo', '--debuginfo-level-std=1', '--set', 'rust.codegen-backends=llvm']

# Print out how long each bootstrap step took (mostly intended for CI and
# tracking over time)
print-step-timings = true

# Collect information and statistics about the current build, and write it to
# disk. Enabling this has no impact on the resulting build output. The
# schema of the file generated by the build metrics feature is unstable, and
# this is not intended to be used during local development.
metrics = true

# Indicates whether ccache is used when building certain artifacts (e.g. LLVM).
# Set to `true` to use the first `ccache` in PATH, or set an absolute path to use
# a specific version.
ccache = 'sccache'

[install]

[rust]

# Sets the number of codegen units to build the standard library with,
# regardless of what the codegen-unit setting for the rest of the compiler is.
# NOTE: building with anything other than 1 is known to occasionally have bugs.
codegen-units-std = 1

# Debuginfo level for the standard library.
debuginfo-level-std = 1

# The "channel" for the Rust build to produce. The stable/beta channels only
# allow using stable features, whereas the nightly and dev channels allow using
# nightly features.
#
# You can set the channel to "auto-detect" to load the channel name from `src/ci/channel`.
#
# If using tarball sources, default value is "auto-detect", otherwise, it's "dev".
channel = 'stable'

# Prints each test name as it is executed, to help debug issues in the test harness itself.
verbose-tests = true

# Whether to create a source tarball by default when running `x dist`.
#
# You can still build a source tarball when this is disabled by explicitly passing `x dist rustc-src`.
dist-src = false

# This is an array of the codegen backends that will be compiled for the rustc
# that's being compiled. The default is to only build the LLVM codegen backend,
# and currently the only standard options supported are `"llvm"`, `"cranelift"`
# and `"gcc"`. The first backend in this list will be used as default by rustc
# when no explicit backend is specified.
codegen-backends = ['llvm']

# Map debuginfo paths to `/rust/$sha/...`.
# Useful for reproducible builds. Generally only set for releases
remap-debuginfo = true

[target.x86_64-unknown-linux-gnu]

[dist]

# List of compression formats to use when generating dist tarballs. The list of
# formats is provided to rust-installer, which must support all of them.
#
# This list must be non-empty.
compression-formats = ['xz']

# How much time should be spent compressing the tarballs. The better the
# compression profile, the longer compression will take.
#
# Available options: fast, balanced, best
compression-profile = 'balanced'

Operating system

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions