Skip to content

bootstrap: Set libc_unstable_time64 when building std - #165172

Draft
tgross35 wants to merge 3 commits into
rust-lang:mainfrom
tgross35:libc-time64
Draft

tgross35 wants to merge 3 commits into
rust-lang:mainfrom
tgross35:libc-time64

Conversation

@tgross35

Copy link
Copy Markdown
Member

Just over a decade to spare

This environment was introduced when check-cfg was unstable, but it has
been stable for a while at this point. Nowadays `libc` unconditionally
emits unknown cfg via `cargo:rustc-check-cfg` directives and no longer
reads the variable.

I'm not exactly sure why this was needed in the first place instead of
always setting `rustc-check-cfg`. Perhaps concerns about getting errors
if the implemention changed while unstable? In any case I removed it
from `libc` over a year ago and we haven't gotten complaints, so
apparently nobody misses it.
These libraries have the option to emit a few lines about their
configuration.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Oct 30, 2026
@tgross35

Copy link
Copy Markdown
Member Author

@bors try jobs=test-i686-gnu*,test-armhf-gnu,test-various,dist-arm-linux-musl,dist-armv7-linux,dist-i586-gnu-i586-i686-musl,dist-ohos-armv7,dist-powepc-linux,dist-i686-mingw-dist-various*

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 30, 2026
bootstrap: Set `libc_unstable_time64` when building `std`


try-job: test-i686-gnu*
try-job: test-armhf-gnu
try-job: test-various
try-job: dist-arm-linux-musl
try-job: dist-armv7-linux
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-ohos-armv7
try-job: dist-powepc-linux
try-job: dist-i686-mingw-dist-various*
@rust-bors

rust-bors Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

💔 Test for d59e033 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling glob-match v0.2.1
   Compiling citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)
    Finished `dev` profile [unoptimized] target(s) in 21.33s
     Running `target/debug/citool calculate-job-matrix`
Run type: TryJob { job_patterns: Some(["test-i686-gnu*", "test-armhf-gnu", "test-various", "dist-arm-linux-musl", "dist-armv7-linux", "dist-i586-gnu-i586-i686-musl", "dist-ohos-armv7", "dist-powepc-linux", "dist-i686-mingw-dist-various*"]), nolimit: false }
Error: Failed to calculate job matrix

Caused by:
    Patterns `dist-powepc-linux, dist-i686-mingw-dist-various*` did not match any auto jobs
##[error]Process completed with exit code 1.
Post job cleanup.

@tgross35

Copy link
Copy Markdown
Member Author

@bors try jobs=test-i686-gnu*,test-armhf-gnu,test-various,dist-arm-linux-musl,dist-armv7-linux,dist-i586-gnu-i586-i686-musl,dist-ohos-armv7,dist-powepc-linux,dist-i686-mingw,dist-various*

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 30, 2026
bootstrap: Set `libc_unstable_time64` when building `std`


try-job: test-i686-gnu*
try-job: test-armhf-gnu
try-job: test-various
try-job: dist-arm-linux-musl
try-job: dist-armv7-linux
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-ohos-armv7
try-job: dist-powepc-linux
try-job: dist-i686-mingw
try-job: dist-various*
@rust-bors

rust-bors Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

💔 Test for e084d59 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling glob-match v0.2.1
   Compiling citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)
    Finished `dev` profile [unoptimized] target(s) in 16.96s
     Running `target/debug/citool calculate-job-matrix`
Run type: TryJob { job_patterns: Some(["test-i686-gnu*", "test-armhf-gnu", "test-various", "dist-arm-linux-musl", "dist-armv7-linux", "dist-i586-gnu-i586-i686-musl", "dist-ohos-armv7", "dist-powepc-linux", "dist-i686-mingw", "dist-various*"]), nolimit: false }
Error: Failed to calculate job matrix

Caused by:
    Patterns `dist-powepc-linux` did not match any auto jobs
##[error]Process completed with exit code 1.

@tgross35

Copy link
Copy Markdown
Member Author

@bors try jobs=test-i686-gnu*,test-armhf-gnu,test-various,dist-arm-linux-musl,dist-armv7-linux,dist-i586-gnu-i586-i686-musl,dist-ohos-armv7,dist-i686-mingw,dist-various*,dist-powerpc-linux

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 30, 2026
bootstrap: Set `libc_unstable_time64` when building `std`


try-job: test-i686-gnu*
try-job: test-armhf-gnu
try-job: test-various
try-job: dist-arm-linux-musl
try-job: dist-armv7-linux
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-ohos-armv7
try-job: dist-i686-mingw
try-job: dist-various*
try-job: dist-powerpc-linux
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-powerpc-linux failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_query_impl test:false 158.383
[RUSTC-TIMING] rustc_driver test:false 16.782
error: linking with `powerpc-unknown-linux-gnu-gcc` failed: exit status: 1
  |
  = note:  "powerpc-unknown-linux-gnu-gcc" "-m32" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/powerpc-unknown-linux-gnu/release/build/rustc-main/71b9440909f3232d/out/rustcKXElV3/symbols.o" "<1 object files omitted>" "-Wl,--as-needed" "-Wl,-Bdynamic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/powerpc-unknown-linux-gnu/release/build/rustc_driver/e7357207ab4851e0/out/librustc_driver-e7357207ab4851e0.so" "-Wl,-Bstatic" "<sysroot>/lib/rustlib/powerpc-unknown-linux-gnu/lib/libcompiler_builtins-*.rlib" "-Wl,-Bdynamic" "-latomic" "-ldl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/powerpc-unknown-linux-gnu/release/build/rustc-main/71b9440909f3232d/out/rustcKXElV3/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/powerpc-unknown-linux-gnu/release/build/rustc_llvm/aa59cfac75e4af87/out" "-L" "/checkout/obj/build/powerpc-unknown-linux-gnu/llvm/lib" "-L" "/x-tools/powerpc-unknown-linux-gnu/lib/gcc/powerpc-unknown-linux-gnu/8.5.0/../../../../powerpc-unknown-linux-gnu/lib" "-L" "<sysroot>/lib/rustlib/powerpc-unknown-linux-gnu/lib" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/powerpc-unknown-linux-gnu/release/build/rustc-main/71b9440909f3232d/out/rustc_main-71b9440909f3232d" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-Wl,-z,origin" "-Wl,-rpath,$ORIGIN/../lib" "-Wl,--compress-debug-sections=zlib"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/powerpc-unknown-linux-gnu/release/build/rustc_driver/e7357207ab4851e0/out/librustc_driver-e7357207ab4851e0.so: undefined reference to `__fstat64_time64'
          /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/powerpc-unknown-linux-gnu/release/build/rustc_driver/e7357207ab4851e0/out/librustc_driver-e7357207ab4851e0.so: undefined reference to `__recvmsg64'
          /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/powerpc-unknown-linux-gnu/release/build/rustc_driver/e7357207ab4851e0/out/librustc_driver-e7357207ab4851e0.so: undefined reference to `__sendmsg64'
          /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/powerpc-unknown-linux-gnu/release/build/rustc_driver/e7357207ab4851e0/out/librustc_driver-e7357207ab4851e0.so: undefined reference to `__ioctl_time64'

@tgross35

Copy link
Copy Markdown
Member Author

I think our PPC32 libc is probably borked, that hasn't been tested in CI in a while. Pleasantly surprised other things seem to work.

@tgross35

Copy link
Copy Markdown
Member Author

Actually these are crosstool builds, maybe it's a config option. But also we say we support very old glibc, asking on Zulip...

@rust-bors

rust-bors Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 763d48e failed: CI. Failed jobs:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants