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 sys/personality.h constants for Linux #1849

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

nbaksalyar
Copy link
Contributor

These consts are used for the personality(2) syscall and can be found in /usr/include/sys/personality.h

@rust-highfive
Copy link

r? @JohnTitor

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

@JohnTitor
Copy link
Member

It seems musl and emscripten don't have UNAME26 and FDPIC_FUNCPTRS.

https://github.com/bminor/musl/blob/b4b1e10364c8737a632be61582e05a8d3acf5690/include/sys/personality.h#L8-L16

https://github.com/emscripten-core/emscripten/blob/2bca083cbbd5a4133db61fbd74d04f7feecfa907/system/include/libc/sys/personality.h#L8-L16

You can move them to the platforms that you want to use.

@nbaksalyar
Copy link
Contributor Author

You can move them to the platforms that you want to use.

Thanks! Will do

@nbaksalyar
Copy link
Contributor Author

Hmm. CI fails at the StyleAndDocs step with the following error:

+ cargo doc --target aarch64-unknown-cloudabi --no-default-features --features extra_traits
   Compiling libc v0.2.74 (/home/vsts/work/1/s)
 Documenting libc v0.2.74 (/home/vsts/work/1/s)
error[E0463]: can't find crate for `core`
  |
  = note: the `aarch64-unknown-cloudabi` target may not be installed

Any ideas why this might happen?

@JohnTitor
Copy link
Member

The problem here is that rust-src for that target is missing in today's nightly. I'll fix it soon, one sec.

@JohnTitor
Copy link
Member

Well, I noticed today's nightly is missing rust-src for a lot of targets, testing in #1850, it's... painful :/ Could you wait for fixing this issue on upstream?

@nbaksalyar
Copy link
Contributor Author

Sure, thanks for your help!

@JohnTitor
Copy link
Member

So, it turned out the cargo failure, not component's. I missed this...:

+ cargo doc --target aarch64-unknown-cloudabi -Z build-std=core,alloc --no-default-features --features extra_traits
error: failed to read `/usr/share/rust/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libstd/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

This should be fixed by rust-lang/cargo#8558 and I confirmed the things work well in today's nightly.
Let's re-trigger CI to make it green.

@JohnTitor JohnTitor closed this Jul 31, 2020
@JohnTitor JohnTitor reopened this Jul 31, 2020
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Now it's green, thanks!

@JohnTitor JohnTitor merged commit 939623c into rust-lang:master Jul 31, 2020
@nbaksalyar
Copy link
Contributor Author

Awesome, thanks :)

@nbaksalyar nbaksalyar deleted the personality branch July 31, 2020 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants