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

Build script error after updating to Fedora 38 #19

Closed
LeonMatthes opened this issue Apr 20, 2023 · 5 comments
Closed

Build script error after updating to Fedora 38 #19

LeonMatthes opened this issue Apr 20, 2023 · 5 comments

Comments

@LeonMatthes
Copy link
Collaborator

I've just updated to Fedora 38, and now the build script for enet-sys panics.

I get a really strange output regarding a __atomic_wide_counter_struct_ ident of some sort. This ident also seems to point to a file name.
I've attached the output of the compilation, as well as the header file the ident points to.

Do you have any idea what could be causing this?

build-output.txt
atomic_wide_counter.h.txt

@spearman
Copy link
Contributor

I believe it's fixed by this bindgen pull request: rust-lang/rust-bindgen#2319

You can try my master fork commit, there is a small change in lib.rs as it seems latest bindgen outputs usize instead of size_t: spearman@cccd979

@LeonMatthes
Copy link
Collaborator Author

@spearman Thanks a lot, that does indeed fix it. 🥳

I'm currently working on my fork of https://github.com/futile/enet-rs/ where enet_sys::size_t is actually used a lot.
Could you open a PR for this main repository with your changes, and a type alias to pub type size_t = usize for backwards compatability?
Would love for these changes to end up on crates.io, so I can also version-bump enet-rs.

@ruabmbua
Copy link
Owner

Thanks for the report, seems like other linux distros are also affected. I fixed it in master and published a new version to crates.io

@spearman
Copy link
Contributor

I'm currently working on my fork of https://github.com/futile/enet-rs/ where enet_sys::size_t is actually used a lot.
Could you open a PR for this main repository with your changes, and a type alias to pub type size_t = usize for backwards compatability?
Would love for these changes to end up on crates.io, so I can also version-bump enet-rs.

I haven't used that crate, I have my own wrapper here https://github.com/spearman/enet-rs I think at the time I started working on it enet had not been published to crates.io. I am coming back to it now and I am not sure if I'm going to switch yet.

@LeonMatthes
Copy link
Collaborator Author

Thanks for the report, seems like other linux distros are also affected. I fixed it in master and published a new version to crates.io

Hi @ruabmbua

Thank you for the very quick response.

Unfortunately, the new version is missing the enet_sys::size_t type.
That means that switching from 1.0.1 to 1.0.2 is a breaking change!

You could work around this as mentioned by adding:

/// enet's size_t type, now replaced by simply using usize.
///
/// Provided for backwards-compatibility.
#[deprecated]
pub type size_t = usize;

to src/lib.rs.

Could you redact version 1.0.2 and push version 1.0.3 with the type alias added?
That will fix it.

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

3 participants