Skip to content

Support AIX in Rust standard library - #109882

Merged
bors merged 1 commit into
rust-lang:masterfrom
ecnelises:aix_std
Oct 10, 2023
Merged

Support AIX in Rust standard library#109882
bors merged 1 commit into
rust-lang:masterfrom
ecnelises:aix_std

Conversation

@ecnelises

@ecnelises ecnelises commented Apr 3, 2023

Copy link
Copy Markdown
Contributor

Also containing original contributions from @bzEq .

@rustbot

rustbot commented Apr 3, 2023

Copy link
Copy Markdown
Collaborator

r? @m-ou-se

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 3, 2023
@rustbot

rustbot commented Apr 3, 2023

Copy link
Copy Markdown
Collaborator

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

Comment thread library/std/src/os/aix/fs.rs Outdated
Comment on lines 40 to 43

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we shouldn't carry over a deprecated method to a new platform.

Comment thread library/std/src/os/aix/process.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does AIX actually have pidfds? I thought that's a recent linuxism.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated. AIX indeed has some compatibility for Linux specific API, but not including pidfd.

@bors

bors commented May 8, 2023

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #111346) made this pull request unmergeable. Please resolve the merge conflicts.

@ecnelises

Copy link
Copy Markdown
Contributor Author

Gentle ping for more comments...?

Comment thread library/std/src/os/aix/fs.rs Outdated
@ecnelises

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@ecnelises
ecnelises requested a review from the8472 July 19, 2023 02:34
@workingjubilee

Copy link
Copy Markdown
Member

Is there a reason the powerpc64-ibm-aix target does not have a platform-support.md doc which identifies its maintainers and other appropriate notes about compiling for the target as of this PR?

@workingjubilee workingjubilee added the O-aix OS: Big Blue's Advanced Interactive eXecutive.. label Jul 30, 2023
@ecnelises

Copy link
Copy Markdown
Contributor Author

Is there a reason the powerpc64-ibm-aix target does not have a platform-support.md doc which identifies its maintainers and other appropriate notes about compiling for the target as of this PR?

Thanks, created #114316. When this target was initially added, I thought there are not such necessary things to mention, especially when cross-compilation is not available yet.

@workingjubilee

Copy link
Copy Markdown
Member

Its completeness isn't too important from my POV, as a few targets landed a mere stub for such docs at first and then when they actually had full-ish support the "real" docs were added, I just wanted to make sure it was going to get sorted.

@bors

ghost commented Aug 6, 2023

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #114553) made this pull request unmergeable. Please resolve the merge conflicts.

@kmicklas

ghost commented Sep 5, 2023

Copy link
Copy Markdown
Contributor

As an outside data point, I tried this with a few basic programs and everything seemed to be working fine!

Are there any remaining blockers to getting this merged?

@ecnelises

ghost commented Sep 5, 2023

Copy link
Copy Markdown
Contributor Author

As an outside data point, I tried this with a few basic programs and everything seemed to be working fine!

Are there any remaining blockers to getting this merged?

I think no. ;) This is pending on review process.

@bors

ghost commented Sep 21, 2023

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #115230) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot rustbot added the O-unix Operating system: Unix-like label Sep 25, 2023

ghost left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unix target but with its own folder? Sure, why not.

This looks good to me with or without the mentioned change, but I'd like to hear your thoughts first before proceeding.

pub const FAMILY: &str = "unix";
pub const OS: &str = "aix";
pub const DLL_PREFIX: &str = "lib";
pub const DLL_SUFFIX: &str = ".a";

ghost Oct 3, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really?
Interesting.

ghost Oct 9, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a little weird but true. .so also exists but by convention many dynamic libraries contain .so inside .a.

Comment thread library/std/src/sys/unix/os.rs Outdated
Comment thread library/std/src/sys/unix/os.rs
@workingjubilee

ghost commented Oct 4, 2023

Copy link
Copy Markdown
Member

r? workingjubilee

@bors

ghost commented Oct 9, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 14d29be has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 9, 2023
@bors

ghost commented Oct 9, 2023

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 14d29be with merge 90fd72a...

@rust-log-analyzer

ghost commented Oct 9, 2023

Copy link
Copy Markdown
Collaborator

The job x86_64-apple-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/panics/default-backtrace-ice.rs stdout ----
diff of stderr:

7 
8 aborting due to `-Z treat-err-as-bug=1`
- (end_short_backtrace)
11 (begin_short_backtrace)
12 (end_short_backtrace)
13 (begin_short_backtrace)
---
To only update this specific test, also pass `--test-args panics/default-backtrace-ice.rs`

error: 1 errors occurred comparing output.
status: exit status: 101
command: env -u RUST_BACKTRACE RUSTC_ICE="0" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/panics/default-backtrace-ice.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "--sysroot" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage2" "--target=x86_64-apple-darwin" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/ui/panics/default-backtrace-ice" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/native/rust-test-helpers" "-L" "/Users/runner/work/rust/rust/build/x86_64-apple-darwin/test/ui/panics/default-backtrace-ice/auxiliary" "-Z" "treat-err-as-bug=1"
--- stderr -------------------------------
error[E0425]: cannot find value `missing_ident` in this scope
##[error]  --> /Users/runner/work/rust/rust/tests/ui/panics/default-backtrace-ice.rs:21:13
   |
   |
LL | fn main() { missing_ident; }

thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:1729:30:
thread 'rustc' panicked at compiler/rustc_errors/src/lib.rs:1729:30:
aborting due to `-Z treat-err-as-bug=1`
   0:        0x10e40080b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h294049f9a07aea0b
   1:        0x10e460ed3 - core::fmt::write::h52e3e8b7c2d0a522
   2:        0x10e3f5b2e - std::io::Write::write_fmt::hcf40ac396bb588ce
   3:        0x10e4005e9 - std::sys_common::backtrace::print::hb72910d1b30c0c65
   3:        0x10e4005e9 - std::sys_common::backtrace::print::hb72910d1b30c0c65
   4:        0x10e4039e5 - std::panicking::default_hook::{{closure}}::h7b96da8b020ecd6e
   5:        0x10e40374c - std::panicking::default_hook::ha25f4c14fb9523e7
   6:        0x116dac96c - std[a43861025f7610d9]::panicking::update_hook::<alloc[3dc2bec0211bf39b]::boxed::Box<rustc_driver_impl[e00d2ae08f9eaa2b]::install_ice_hook::{closure#0}>>::{closure#0}
   8:        0x10e403e27 - std::panicking::begin_panic_handler::{{closure}}::hf0dc48752b2a9ca4
   9:        0x10e400d19 - ___udivmoddi4
  10:        0x10e403b9d - _rust_begin_unwind
  11:        0x10e48c215 - core::panicking::panic_fmt::hc47ef192779977cb
  11:        0x10e48c215 - core::panicking::panic_fmt::hc47ef192779977cb
  12:        0x11b8a8c5f - <rustc_errors[969408f09641a42e]::HandlerInner>::panic_if_treat_err_as_bug
  13:        0x11b8a7fa7 - <rustc_errors[969408f09641a42e]::HandlerInner>::emit_diagnostic::{closure#2}
  14:        0x116f16c9f - rustc_interface[dfacfc90e9c82764]::callbacks::track_diagnostic
  15:        0x11b8a790e - <rustc_errors[969408f09641a42e]::HandlerInner>::emit_diagnostic
  16:        0x11b8cafb1 - <rustc_span[9b990933d3dd0449]::ErrorGuaranteed as rustc_errors[969408f09641a42e]::diagnostic_builder::EmissionGuarantee>::diagnostic_builder_emit_producing_guarantee
  17:        0x11a234a8d - <rustc_resolve[fc80e8ddc8ad3c86]::Resolver>::report_errors
  18:        0x11a2b2a03 - <rustc_session[6d1a24395f9e7ded]::session::Session>::time::<(), <rustc_resolve[fc80e8ddc8ad3c86]::Resolver>::resolve_crate::{closure#0}>
  19:        0x11a26806e - <rustc_resolve[fc80e8ddc8ad3c86]::Resolver>::resolve_crate
  20:        0x116f1d765 - rustc_interface[dfacfc90e9c82764]::passes::resolver_for_lowering
  21:        0x11a8b846d - rustc_query_impl[14d46d568edcc75]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[14d46d568edcc75]::query_impl::resolver_for_lowering::dynamic_query::{closure#2}::{closure#0}, rustc_middle[b777dc48ea4451e5]::query::erase::Erased<[u8; 8usize]>>
  22:        0x11aa60049 - <rustc_query_impl[14d46d568edcc75]::query_impl::resolver_for_lowering::dynamic_query::{closure#2} as core[14a1d77baeca402d]::ops::function::FnOnce<(rustc_middle[b777dc48ea4451e5]::ty::context::TyCtxt, ())>>::call_once
  23:        0x11a80aa5b - rustc_query_system[7e0e2b32a7b3d8b0]::query::plumbing::try_execute_query::<rustc_query_impl[14d46d568edcc75]::DynamicConfig<rustc_query_system[7e0e2b32a7b3d8b0]::query::caches::SingleCache<rustc_middle[b777dc48ea4451e5]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[14d46d568edcc75]::plumbing::QueryCtxt, false>
  24:        0x11a8f203a - rustc_query_impl[14d46d568edcc75]::query_impl::resolver_for_lowering::get_query_non_incr::__rust_end_short_backtrace
  25:        0x116d69096 - <rustc_middle[b777dc48ea4451e5]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[e00d2ae08f9eaa2b]::run_compiler::{closure#1}::{closure#2}::{closure#4}, &rustc_data_structures[debe7a0f87bd29eb]::steal::Steal<(rustc_middle[b777dc48ea4451e5]::ty::ResolverAstLowering, alloc[3dc2bec0211bf39b]::rc::Rc<rustc_ast[3189a31994833522]::ast::Crate>)>>
  26:        0x116d8df26 - rustc_span[9b990933d3dd0449]::set_source_map::<core[14a1d77baeca402d]::result::Result<(), rustc_span[9b990933d3dd0449]::ErrorGuaranteed>, rustc_interface[dfacfc90e9c82764]::interface::run_compiler<core[14a1d77baeca402d]::result::Result<(), rustc_span[9b990933d3dd0449]::ErrorGuaranteed>, rustc_driver_impl[e00d2ae08f9eaa2b]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  27:        0x116d732ec - std[a43861025f7610d9]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[dfacfc90e9c82764]::util::run_in_thread_with_globals<rustc_interface[dfacfc90e9c82764]::interface::run_compiler<core[14a1d77baeca402d]::result::Result<(), rustc_span[9b990933d3dd0449]::ErrorGuaranteed>, rustc_driver_impl[e00d2ae08f9eaa2b]::run_compiler::{closure#1}>::{closure#0}, core[14a1d77baeca402d]::result::Result<(), rustc_span[9b990933d3dd0449]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[14a1d77baeca402d]::result::Result<(), rustc_span[9b990933d3dd0449]::ErrorGuaranteed>>
  28:        0x116d74a9e - <<std[a43861025f7610d9]::thread::Builder>::spawn_unchecked_<rustc_interface[dfacfc90e9c82764]::util::run_in_thread_with_globals<rustc_interface[dfacfc90e9c82764]::interface::run_compiler<core[14a1d77baeca402d]::result::Result<(), rustc_span[9b990933d3dd0449]::ErrorGuaranteed>, rustc_driver_impl[e00d2ae08f9eaa2b]::run_compiler::{closure#1}>::{closure#0}, core[14a1d77baeca402d]::result::Result<(), rustc_span[9b990933d3dd0449]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[14a1d77baeca402d]::result::Result<(), rustc_span[9b990933d3dd0449]::ErrorGuaranteed>>::{closure#1} as core[14a1d77baeca402d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  30:     0x7ff815cd71d3 - __pthread_start

error: the compiler unexpectedly panicked. this is a bug.


note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.75.0-nightly (90fd72a4a 2023-10-09) running on x86_64-apple-darwin

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0 -Z treat-err-as-bug=1
query stack during panic:
#0 [resolver_for_lowering] getting the resolver for lowering
end of query stack
------------------------------------------

@bors

ghost commented Oct 9, 2023

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 9, 2023
@workingjubilee

ghost commented Oct 9, 2023

Copy link
Copy Markdown
Member

huh.

@workingjubilee

ghost commented Oct 10, 2023

Copy link
Copy Markdown
Member

A completely unrelated PR also failed on this point so
@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 10, 2023
@bors

ghost commented Oct 10, 2023

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 14d29be with merge fa6d1e7...

@bors

ghost commented Oct 10, 2023

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: workingjubilee
Pushing fa6d1e7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 10, 2023
@bors
bors merged commit fa6d1e7 into rust-lang:master Oct 10, 2023
@rustbot rustbot added this to the 1.75.0 milestone Oct 10, 2023
@ecnelises

ghost commented Oct 10, 2023

Copy link
Copy Markdown
Contributor Author

Thanks!

@rust-timer

ghost commented Oct 10, 2023

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (fa6d1e7): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 627.584s -> 626.006s (-0.25%)
Artifact size: 270.77 MiB -> 270.80 MiB (0.01%)

@workingjubilee

ghost commented Oct 10, 2023

Copy link
Copy Markdown
Member

Thank you!

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

Labels

merged-by-bors This PR was explicitly merged by bors. O-aix OS: Big Blue's Advanced Interactive eXecutive.. O-unix Operating system: Unix-like S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants