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

arm-unknown-linux-gnueabihf generates dependency on GLIBC_2.28 #712

Closed
jadamcrain opened this issue May 21, 2022 · 8 comments
Closed

arm-unknown-linux-gnueabihf generates dependency on GLIBC_2.28 #712

jadamcrain opened this issue May 21, 2022 · 8 comments

Comments

@jadamcrain
Copy link

Hi,

We're using rust-cross in our CI to generate FFI libraries for a number of targets:

https://github.com/stepfunc/dnp3/blob/refactor/jni-ci-gen/.github/workflows/ci.yml#L274

The generated GLIBC dependencies are as advertised with the exception of arm-unknown-linux-gnueabihf. The table in the README says 2.27 for this target, whereas we have the following two 2.28 dependencies in the .so:

00000000      DF *UND*  00000000  GLIBC_2.28  fcntl
00000000  w   DF *UND*  00000000  GLIBC_2.28  statx

The full objdump.txt

Is this expected? Can the minimum required GLIBC be lowered for this target?

thanks!

Adam

@jadamcrain
Copy link
Author

jadamcrain commented May 21, 2022

The ARM toolchain referenced in the dockerfile explicitly says it contains 2.28 so maybe best to update the table from 2.27 -> 2.28.

I have a user who'd like to use our ARM cross builds on Ubuntu 18.04 which only has 2.27 and is LTS until 2028.

@Emilgardis
Copy link
Member

Thanks for the issue!

Yeah, the table is not accurate, feel free to submit a pr to correct it. We also have #591 which probably will change stuff as well, we haven't gotten to that though yet.

See #680 for a way to possibly select glibc version

@jadamcrain
Copy link
Author

jadamcrain commented May 23, 2022

@Emilgardis Thanks for these.

cargo-zigbuild is pretty fascinating. I just tried to do this locally installing it, zig, and the arm-unknown-linux-gneuabihf target.

My project has ring as an indirect dependency which has a complicated, platform-dependent build script.

  error: Unknown CPU: 'armv6'
  thread 'main' panicked at 'execution failed', /home/jadamcrain/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/ring-0.16.20/build.rs:656:9

I'll take this issue over to the cargo-zigbuild project for suggestions to see if they can help.

Regardless of outcome with zigbuild, is rust-cross interested in supporting older GLIBC for this architecture?. Not supporting Ubuntu 18.04 doesn't seem portable.

@jadamcrain
Copy link
Author

It looks like I'm hamstrung by ziglang/zig#4911 and unable to use cargo-zigbuild until that resolves.

@Emilgardis
Copy link
Member

Regardless of outcome with zigbuild, is rust-cross interested in supporting older GLIBC for this architecture?. Not supporting Ubuntu 18.04 doesn't seem portable.

Yes, as hinted in #680, we want to try to do that

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Jun 10, 2022

This has actually been fixed: we've lowered this (for this target only) to glibc 2.17 (see supported targets). This was part of another bug fix (reported in #426 and fixed in #734). While moving to crosstool for this image build to correctly target ARMv6 rather than ARMv7, we were able to build for a much older glibc so we can have compatibility with RHEL7.

@jadamcrain
Copy link
Author

That's great! How often are releases done? Does it matter if the referenced docker image are updated more frequently?

I guess I'm just wondering when this fix would show up if I'm using Github actions with cross: true.

@Emilgardis
Copy link
Member

You can try it out already if you add

- run: cargo install --git https://github.com/cross-rs/cross --locked to your action

#761

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

No branches or pull requests

3 participants