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

memfd_create is a glibc API, which is not present on uclibc #2566

Merged
merged 3 commits into from
Nov 23, 2021

Conversation

skrap
Copy link
Contributor

@skrap skrap commented Nov 22, 2021

I think the title says it all! The armv7-unknown-linux-uclibceabihf tier-3 target does not build without this change, and I suspect all other uclibc builds are broken as well.

It's a good reminder to try to add some CI validation of the uclibc build, which I will try to do in a followup PR.

To test this, get and unpack https://toolchains.bootlin.com/downloads/releases/toolchains/armv7-eabihf/tarballs/armv7-eabihf--uclibc--bleeding-edge-2020.08-1.tar.bz2

Note instances of PATH_HERE below which you'll have to customize for your system.

config.toml:

[target.armv7-unknown-linux-uclibceabihf]
linker = "/PATH_HERE/buildroot-armv7/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gcc"
runner = "qemu-arm -L /PATH_HERE/armv7-eabihf--uclibc--bleeding-edge-2020.08-1/arm-buildroot-linux-uclibcgnueabihf/sysroot/"

Then run:

cd libc-test
CC_armv7_unknown_linux_uclibceabihf=/PATH_HERE/armv7-eabihf--uclibc--bleeding-edge-2020.08-1/bin/arm-buildroot-linux-uclibcgnueabihf-gcc cargo +nightly test -Zbuild-std --target armv7-unknown-linux-uclibceabihf

(if there's a way to include that CC_armv7_etc cross CC in the config.toml, I'm all ears!)

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

ci/build.sh Outdated
@@ -139,6 +139,7 @@ RUST_NIGHTLY_LINUX_TARGETS="\
aarch64-fuchsia \
armv5te-unknown-linux-gnueabi \
armv5te-unknown-linux-musleabi \
armv7-unknown-linux-uclibceabihf \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this the right way to enable CI testing for this target? I couldn't really untangle how this was meant to work.

Copy link
Member

Choose a reason for hiding this comment

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

This actually needs to go into RUST_LINUX_NO_CORE_TARGETS instead because the uclibc targets are not distributed via rustup and need to be built with -Zbuild-std.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. I added a comment to help the next person. I tried to test this via ci/run-docker.sh armv7-unknown-linux-uclibceabihf

But I get the following error: ci/run.sh: 112: cargo: not found

I suspect there's something messed up with my setup because the same issue occurs for x86_64-unknown-linux-gnu.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I found it - i had a toolchain override in place to my stage2 custom build which did not include cargo.

@Amanieu
Copy link
Member

Amanieu commented Nov 23, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Nov 23, 2021

📌 Commit 6e0c3be has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Nov 23, 2021

⌛ Testing commit 6e0c3be with merge 57b1d92...

@bors
Copy link
Contributor

bors commented Nov 23, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: Amanieu
Pushing 57b1d92 to master...

@bors bors merged commit 57b1d92 into rust-lang:master Nov 23, 2021
bors added a commit that referenced this pull request Jan 19, 2022
uclibc: Don't specialize PTRACE_O_MASK for uclibc

This constant comes from the kernel headers, so its value should not depend on the libc type.

To test: see instructions in #2566
bors added a commit that referenced this pull request Jan 19, 2022
uclibc: Don't specialize PTRACE_O_MASK for uclibc

This constant comes from the kernel headers, so its value should not depend on the libc type.

To test: see instructions in #2566
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.

4 participants