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 our xz2 crate configuration to enable static linking. #173

Merged
merged 3 commits into from
Nov 23, 2023

Conversation

jsirois
Copy link
Collaborator

@jsirois jsirois commented Nov 22, 2023

Previously liblzma was dynamically linked (to a homebrew version).

Fixes #172

Previously liblzma was dynamically linked (to a homebrew version).

Fixes a-scie#172
@jsirois
Copy link
Collaborator Author

jsirois commented Nov 22, 2023

The linking is now:

$ otool -L dist/scie-jump-macos-aarch64
dist/scie-jump-macos-aarch64:
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0)

@jsirois
Copy link
Collaborator Author

jsirois commented Nov 22, 2023

The fix is good, but I'm in a weird state where cargo +nightly fmt is giving different results on the Linux and Mac runners.

Copy link
Collaborator

@huonw huonw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that the Cargo.toml change is the only real change, and the code changes are "just" reformatting?

Are you aware that rustup supports pinning to particular nightlies via nightly-$date? For instance, rustup toolchain add nightly-2023-11-20. https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification This might allow getting stable formatting that only changes when explicitly desired, or at least pinning to a version that doesn't have the inconsistencies.

@jsirois
Copy link
Collaborator Author

jsirois commented Nov 22, 2023

Are you aware that rustup supports pinning to particular nightlies via nightly-$date

Yeah, but I've never had to do this until now - totally unclear why. Even having to use nightly at all is horrible. I'm not sure what is up with the glacial pace of the promotion of rustfmt nightly features compared to rust otherwise.

@jsirois
Copy link
Collaborator Author

jsirois commented Nov 22, 2023

This is a very crappy situation. Wanting to use stable, and encoding that in rust-toolchain so all devs get things working, but then using nightly for rustfmt. Afaict I'm forced to add docs or an outer script or both to make sure fmt just works as well. Having to use a magic nightly pinned version is going to skate right by a new dev. In fact, it will mess me up too I'm sure when I forget a month from now.

@jsirois
Copy link
Collaborator Author

jsirois commented Nov 22, 2023

I'm going to sink some time into this rustfmt reproducibility situation before landing.

@jsirois
Copy link
Collaborator Author

jsirois commented Nov 23, 2023

Alright, much headbanging but I should have looked at issues: rust-lang/rustfmt#5964

Still not sure what to do, but this appears to be a ~temporary problem.

@jsirois
Copy link
Collaborator Author

jsirois commented Nov 23, 2023

Alright - the rustfmt noise is isolated to some ~commented out CI steps and tracked in #174.

I'll merge once green since those CI fixes are minimal despite being orthogonal.

@jsirois jsirois merged commit eed2a6d into a-scie:main Nov 23, 2023
9 checks passed
@jsirois jsirois deleted the issues/172 branch November 23, 2023 23:45
jsirois added a commit to jsirois/jump that referenced this pull request Dec 9, 2023
These skips were added in a-scie#173 to work around this issue:
  rust-lang/rustfmt#5964

It has been resolved; so formatting should now work on all
architectures.

Fixes a-scie#174
jsirois added a commit that referenced this pull request Dec 10, 2023
These skips were added in #173 to work around this issue:
  rust-lang/rustfmt#5964

It has been resolved; so formatting should now work on all
architectures.

Fixes #174
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

Successfully merging this pull request may close these issues.

Unexpected dependency to homebrew xz library from a scie executable
3 participants