Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dl_iterate_phdr to some BSD OSs #1953

Merged
merged 4 commits into from
Oct 27, 2020
Merged

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Oct 23, 2020

Add dl_iterate_phdr for freebsd, openbsd and netbsd: #1066
cc rust-lang/backtrace-rs#325

@rust-highfive
Copy link

r? @JohnTitor

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

@tesuji

This comment has been minimized.

@tesuji tesuji changed the title Add dl_iterate_phdr to some bsd OSes Add dl_iterate_phdr to some BSD OSes Oct 25, 2020
@tesuji tesuji force-pushed the bsd-dl_iterate_phdr branch from 456f1bf to 2058e37 Compare October 25, 2020 05:16
@tesuji
Copy link
Contributor Author

tesuji commented Oct 25, 2020

Done. CI should be green!

@tesuji tesuji changed the title Add dl_iterate_phdr to some BSD OSes Add dl_iterate_phdr to some BSD OSs Oct 25, 2020
@semarie
Copy link
Contributor

semarie commented Oct 25, 2020 via email

@tesuji tesuji force-pushed the bsd-dl_iterate_phdr branch 3 times, most recently from 3e869ee to fd8bb24 Compare October 25, 2020 09:16
@semarie
Copy link
Contributor

semarie commented Oct 25, 2020

tests are fine on OpenBSD. thanks !

@tesuji tesuji force-pushed the bsd-dl_iterate_phdr branch 2 times, most recently from 624f531 to 5c23d75 Compare October 27, 2020 02:59
@tesuji
Copy link
Contributor Author

tesuji commented Oct 27, 2020

Looks like it works: rust-lang/rust#78184 (comment).
Ping @JohnTitor @joshtriplett

@JohnTitor
Copy link
Member

Looks good to me, thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Oct 27, 2020

📌 Commit 5c23d75 has been approved by JohnTitor

bors added a commit that referenced this pull request Oct 27, 2020
Add dl_iterate_phdr to some BSD OSs

Add dl_iterate_phdr for freebsd, openbsd and netbsd: #1066
cc rust-lang/backtrace-rs#325
@bors
Copy link
Contributor

bors commented Oct 27, 2020

⌛ Testing commit 5c23d75 with merge 199a516...

@bors
Copy link
Contributor

bors commented Oct 27, 2020

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

The failure is:

error: type alias is never used: `Elf_Addr`
  --> src/unix/bsd/netbsdlike/netbsd/mod.rs:34:9
   |
34 |         type Elf_Addr = Elf64_Addr;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: the lint level is defined here
  --> src/lib.rs:18:38
   |
18 | #![cfg_attr(libc_deny_warnings, deny(warnings))]
   |                                      ^^^^^^^^
   = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`

error: type alias is never used: `Elf_Half`
  --> src/unix/bsd/netbsdlike/netbsd/mod.rs:35:9
   |
35 |         type Elf_Half = Elf64_Half;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: type alias is never used: `Elf_Phdr`
  --> src/unix/bsd/netbsdlike/netbsd/mod.rs:36:9
   |
36 |         type Elf_Phdr = Elf64_Phdr;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors

Ah, anyway we should "use" them here.

* Include some header files
* Ingore tests for p_type field of `Elf*_Phdr` because of
  conflicting with p_type macro from resolve.h
@tesuji tesuji force-pushed the bsd-dl_iterate_phdr branch from 5c23d75 to be37f01 Compare October 27, 2020 11:03
@tesuji
Copy link
Contributor Author

tesuji commented Oct 27, 2020

I'm sorry. I made a mistake in netbsd code. The diff of change is 5c23d75...be37f01 .

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 27, 2020

📌 Commit be37f01 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Oct 27, 2020

⌛ Testing commit be37f01 with merge b1c314f...

bors added a commit that referenced this pull request Oct 27, 2020
Add dl_iterate_phdr to some BSD OSs

Add dl_iterate_phdr for freebsd, openbsd and netbsd: #1066
cc rust-lang/backtrace-rs#325
@bors
Copy link
Contributor

bors commented Oct 27, 2020

💔 Test failed - checks-actions

@tesuji
Copy link
Contributor Author

tesuji commented Oct 27, 2020

What is this error? https://github.com/rust-lang/libc/runs/1314551399#step:5:1496

2020-10-27T12:32:07.6255772Z LLVM ERROR: unable to allocate function return #6
2020-10-27T12:32:07.6305138Z error: could not compile `compiler_builtins`
+ rustup target add sparc-unknown-linux-gnu
documenting sparc-unknown-linux-gnu
error: toolchain 'nightly-x86_64-unknown-linux-gnu' does not contain component 'rust-std' for target 'sparc-unknown-linux-gnu'; did you mean 'sparc64-unknown-linux-gnu'?
+ true
+ export RUSTDOCFLAGS=--cfg freebsd11
+ cargo doc --target sparc-unknown-linux-gnu --no-default-features --features extra_traits
   Compiling libc v0.2.80 (/home/runner/work/libc/libc)
 Documenting libc v0.2.80 (/home/runner/work/libc/libc)
error[E0463]: can't find crate for `core`
  |
  = note: the `sparc-unknown-linux-gnu` target may not be installed

error: aborting due to previous error

@JohnTitor
Copy link
Member

The second error is unrelated, sparc-unknown-linux-gnu is no core target and we use the build-std feature in that case.
I think the first error is the cause, I recently updated compiler_builtins to 0.1.36 (rust-lang/rust#78209) and it seems that the bump causes the failure.

@JohnTitor
Copy link
Member

@bors retry

bors added a commit that referenced this pull request Oct 27, 2020
Rollup of 2 pull requests

Successful merges:

 - #1953 (Add dl_iterate_phdr to some BSD OSs)
 - #1960 (Disable `sparc-unknown-linux-gnu` for now)

Failed merges:

r? `@ghost`
bors added a commit that referenced this pull request Oct 27, 2020
Add dl_iterate_phdr to some BSD OSs

Add dl_iterate_phdr for freebsd, openbsd and netbsd: #1066
cc rust-lang/backtrace-rs#325
@bors
Copy link
Contributor

bors commented Oct 27, 2020

⌛ Testing commit be37f01 with merge 58a9de3...

@JohnTitor
Copy link
Member

@bors retry
Encountered the spurious failure on rollup :(

bors added a commit that referenced this pull request Oct 27, 2020
Rollup of 2 pull requests

Successful merges:

 - #1953 (Add dl_iterate_phdr to some BSD OSs)
 - #1960 (Disable `sparc-unknown-linux-gnu` for now)

Failed merges:

r? `@ghost`
@bors bors merged commit 82b7b6b into rust-lang:master Oct 27, 2020
@bors
Copy link
Contributor

bors commented Oct 27, 2020

⌛ Testing commit be37f01 with merge ebefd7b...

@tesuji tesuji deleted the bsd-dl_iterate_phdr branch October 27, 2020 14:25
@tesuji
Copy link
Contributor Author

tesuji commented Oct 27, 2020

Can we create a new patch release for this PR ?

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

Successfully merging this pull request may close these issues.

5 participants