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

[Merged by Bors] - Update linux_dependencies.md #3517

Closed
wants to merge 1 commit into from
Closed

[Merged by Bors] - Update linux_dependencies.md #3517

wants to merge 1 commit into from

Conversation

godsmith99x
Copy link
Contributor

Thanks for making Bevy. Recommend adding rust-libudev-devel as an additional dependence for Fedora.

Objective

  • Describe the objective or issue this PR addresses.
  • If you're fixing a specific issue, say "Fixes #X".

Solution

  • Describe the solution used to achieve the objective above.

Thanks for making Bevy. Recommend adding rust-libudev-devel as an additional dependence for Fedora.
@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Jan 1, 2022
@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation O-Linux Specific to the Linux desktop operating system and removed S-Needs-Triage This issue needs to be labelled labels Jan 1, 2022
@alice-i-cecile
Copy link
Member

Awesome thanks! Once we can get someone else to verify this (I'm not a Linux expert, and don't have a Fedora install to play with), I'll be happy to merge it in.

@alice-i-cecile alice-i-cecile added the C-Startup A crash that occurs when first attempting to run a Bevy app label Jan 1, 2022
@rparrett
Copy link
Contributor

rparrett commented Jan 1, 2022

Also not a linux expert, but it seems like folks using rustup to manage their rust install might not want to install this package?

@alice-i-cecile
Copy link
Member

@godsmith99x, do you have any thoughts on why Fedora might need this dep, but other distros don't seem to?

@godsmith99x
Copy link
Contributor Author

Sorry, I wouldn't call myself an expert either. I'm new to rust. I used rustup to install my tool chain, but the bevy breakout example didn't compile, at first. I just followed the compiler errors to locate the missing packages until it worked. Just wanted to share my experience. Hope it is helpful.

@alice-i-cecile
Copy link
Member

Sounds good. I'll ask around in the broader community and see if I can find any answers. Thanks for letting us know!

@alice-i-cecile
Copy link
Member

So, summary of my investigation:

So this is probable getting pulled in by either winit or gilrs. Looks like gilrs.

We need an equivalent crate for Ubuntu: sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev, which makes this much less mysterious.

Okay, this makes sense to me now! Thanks for the troubleshooting, I'll merge it in :)

@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Jan 1, 2022
Thanks for making Bevy. Recommend adding rust-libudev-devel as an additional dependence for Fedora.

# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, say "Fixes #X".

## Solution

- Describe the solution used to achieve the objective above.
@bors
Copy link
Contributor

bors bot commented Jan 1, 2022

@bors bors bot changed the title Update linux_dependencies.md [Merged by Bors] - Update linux_dependencies.md Jan 1, 2022
@bors bors bot closed this Jan 1, 2022
@KirmesBude
Copy link
Contributor

Hi @alice-i-cecile,

As @rparrett mentions this conflicts with rust that was installed using rustup.
Rustup is probably the preferred installation method, rather than using the package manager.

For me (rustup installation inside a toolbox with the Fedora35 base image), I ran into the following build error:

  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "`\"pkg-config\" \"--libs\" \"--cflags\" \"libudev\"` did not exit successfully: exit status: 1\nerror: could not find system library 'libudev' required by the 'libudev-sys' crate\n\n--- stderr\nPackage libudev was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libudev.pc'\nto the PKG_CONFIG_PATH environment variable\nPackage 'libudev', required by 'virtual:world', not found\n"', /var/home/bude/._toolbox/rust/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/libudev-sys-0.1.4/build.rs:38:41
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

Which was resolved with just sudo dnf install systemd-devel.

Blindly following the dependencies and installing rust-libudev-devel will install rust via the package manager,
Took me a few hours to understand why rust-analyzer was no longer finding rust-src, because it now attempts to search for it in /usr/lib instead of ~/.rustup/lib.

If you do get rust from your package manager, maybe rust-libudev-devel is actually necessary.
But I dont think suggesting this by default is a good idea.

We should probably ask the user to install rust via rustup and optionally provide additional packages if you do decide to install rust via the package manager.

mockersf added a commit to mockersf/bevy that referenced this pull request Jan 2, 2022
bors bot pushed a commit that referenced this pull request Jan 2, 2022
# Objective

- Revert #3517 as the dependency added (rust-libudev-devel) has a dependency on cargo which install the package manager version, which isn't compatible with rustup version and may break the setup of users


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation C-Startup A crash that occurs when first attempting to run a Bevy app O-Linux Specific to the Linux desktop operating system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants