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

Using cross for linux fails with: undefined reference to `memfd_create' #1510

Closed
patrickelectric opened this issue Jun 7, 2024 · 1 comment

Comments

@patrickelectric
Copy link

patrickelectric commented Jun 7, 2024

  = note: /target/x86_64-unknown-linux-gnu/release/deps/libnix-f82b5b7b4f999979.rlib(nix-f82b5b7b4f999979.nix.b4d0d405151210f5-cgu.04.rcgu.o): In function `nix::sys::memfd::memfd_create::hcab24415e5acb3e8':
          nix.b4d0d405151210f5-cgu.04:(.text._ZN3nix3sys5memfd12memfd_create17hcab24415e5acb3e8E+0x5): undefined reference to `memfd_create'
          collect2: error: ld returned 1 exit status

It works fine using cargo build locally.

Reference: https://github.com/patrickelectric/eframe_template/actions/runs/9419742036/job/25950196145#step:5:786

@Emilgardis
Copy link
Member

memfd_create requires a newer glibc than what cross 0.2.5 provides by default. You need to use cross from the main branch or specify a newer image to use.

also, be advised that actions-rs is not maintained.

So, either install cross from the main branch with cargo install cross --git https://github.com/cross-rs/cross or specify a newer image in Cross.toml

@Emilgardis Emilgardis closed this as not planned Won't fix, can't repro, duplicate, stale Jun 8, 2024
emilk pushed a commit to emilk/eframe_template that referenced this issue Jul 15, 2024
At the moment, it appears that musl targets are not working:
rust-windowing/winit#1818
To use gnu, it's necessary to use glib 2.27, for that, cross need to be
installed manually from development branch:
cross-rs/cross#1510

---------

Signed-off-by: Patrick José Pereira <[email protected]>
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

No branches or pull requests

2 participants