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

Fix nightly build #315

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Conversation

niklasdewally
Copy link
Contributor

In recent versions of the nightly / beta compilers, the use of linkme causes linker errors. (dtolnay/linkme#94) This is due to the new linker set as default in these versions.

Add linker flags to nightly builds to revert to the old linker behaviour.

See:

@niklasdewally niklasdewally self-assigned this Jun 19, 2024
@niklasdewally niklasdewally added the kind::build-failure The build is broken! label Jun 19, 2024
@niklasdewally niklasdewally force-pushed the fix/linkme-nightly branch 2 times, most recently from 967eed6 to 05d8bd0 Compare June 19, 2024 18:53
@niklasdewally niklasdewally marked this pull request as ready for review June 19, 2024 19:00
@niklasdewally niklasdewally marked this pull request as draft June 19, 2024 19:01
@niklasdewally niklasdewally force-pushed the fix/linkme-nightly branch 2 times, most recently from bef87c1 to 52faabb Compare June 19, 2024 19:19
@ozgurakgun
Copy link
Contributor

Thanks for looking into this @niklasdewally. It doesn't look like there is a trivial fix at the moment, should we temporarily disable the nightly ubuntu test I wonder?

@niklasdewally
Copy link
Contributor Author

niklasdewally commented Jun 20, 2024

Thanks for looking into this @niklasdewally. It doesn't look like there is a trivial fix at the moment, should we temporarily disable the nightly ubuntu test I wonder?

The flags I put in this commit (and given in the rust article above) work -- the issue at the moment is .cargo/config.toml syntax and how to enable it for the build through that. Setting RUSTFLAGS=-Clink-arg=-Wl,-z,nostart-stop-gc when building nightly (and communicating this in the docs) would work as a basic fix for this.

For CI, the fix done in dtolnay/linkme#88 would work for us (i.e. just setting RUSTFLAGS in the CI script) -- however, I think that we should also fix it for non-CI builds without manual intervention -- i.e. in .cargo/config.toml, or in build.rs.

@niklasdewally
Copy link
Contributor Author

niklasdewally commented Jun 20, 2024

I am in full-time work currently so probably won't get to this until Sunday - if anyone wants to take over the PR, feel free. A temporary solution would probably be fine, considering that linkme will eventually fix this upstream.

@niklasdewally niklasdewally force-pushed the fix/linkme-nightly branch 8 times, most recently from 1eba493 to b36f502 Compare June 25, 2024 20:56
In recent versions of the nightly / beta compilers, the use of linkme
causes linker errors. (dtolnay/linkme#94) This
is due to the new linker set as default in these versions.

Add linker flags to nightly builds to revert to the old linker
behaviour.

See:

- dtolnay/linkme#88
- https://blog.rust-lang.org/2024/05/17/enabling-rust-lld-on-linux.html

Signed-off-by: Niklas Dewally <niklas@dewally.com>
@niklasdewally niklasdewally marked this pull request as ready for review June 25, 2024 21:03
@niklasdewally
Copy link
Contributor Author

@ozgurakgun

@ozgurakgun
Copy link
Contributor

Thanks! This looks good! Hope you are enjoying the summer job.

@ozgurakgun ozgurakgun merged commit 24d31d0 into conjure-cp:main Jun 27, 2024
6 checks passed
@niklasdewally niklasdewally deleted the fix/linkme-nightly branch June 27, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind::build-failure The build is broken!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants