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

compile: Replace ancient gcc crate with cc #28

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

MarijnS95
Copy link
Contributor

The gcc crate hasn't been updated for 5 years and clearly states that is deprecated after a rename to cc.

More importantly we're cross-compiling some Windows ISPC code to aarch64 and while GitHub's actions runners definitely have all the cross-compiling packages installed the old gcc crate was complaining that it could not find lib.exe for the desired target.

Note that this strangely happened to work fine on a developer machine, but it is unclear why.

@MarijnS95 MarijnS95 changed the title Replace ancient gcc crate with cc compile: Replace ancient gcc crate with cc Dec 4, 2023
The `gcc` crate hasn't been updated for 5 years and clearly states that
is deprecated after a rename to `cc`.

More importantly we're cross-compiling some Windows ISPC code to aarch64
and while GitHub's actions runners definitely have [all the cross-
compiling packages installed] the old `gcc` crate was complaining that it
could not find `lib.exe` for the desired target.

Note that this strangely happened to work fine on a developer machine,
but it is unclear why.

[all the cross-compiling packages installed]: https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md#workloads-components-and-extensions
@Twinklebear
Copy link
Owner

Thanks @MarijnS95 , this looks great to me! The CI runs have been failing because of an issue with ISPC and fneg that I have to look into. Maybe a newer version of ISPC would fix this.

@Twinklebear Twinklebear merged commit 0abab86 into Twinklebear:master Dec 9, 2023
0 of 3 checks passed
@MarijnS95 MarijnS95 deleted the cc branch December 9, 2023 19:21
@MarijnS95
Copy link
Contributor Author

https://github.com/MarijnS95/ispc-rs/actions/runs/7153113257 1.22 is still broken, fwiw. Only on Mac.

@MarijnS95
Copy link
Contributor Author

MarijnS95 commented Dec 9, 2023

@Twinklebear oh, because Mac installs via brew instead of using the ISPC_VERSION env var to update it. So yes, 1.22 fixes it.

@MarijnS95
Copy link
Contributor Author

If https://formulae.brew.sh/formula/ispc is to be believed, 1.22 should be available.

@MarijnS95
Copy link
Contributor Author

https://github.com/MarijnS95/ispc-rs/actions/runs/7153175524/job/19479324178 hmm brew install ispc@1.22.0 doesn't work. Maybe a similar command to apt update is needed?

@Twinklebear
Copy link
Owner

Actually on my mac it seems I have ISPC 1.22 already, and don't remember doing anything specific to install that version. Maybe it's just a matter of waiting til the CI runners update. I'll update the ISPC version for the jobs that download it from Github

@Twinklebear
Copy link
Owner

Looks like adding a brew update first to the CI job got it to pick up ISPC 1.22 👍 : 6bf0e0b

@MarijnS95
Copy link
Contributor Author

Good find, I only tried that on a run with explicit ispc@1.22.0 install, which it still could not find. While coming across an answer that suggested to install from the raw ispc.rb script link on GitHub, there were a few files with @<version> in the name so it seems selecting a specific version is only limited to a few dependencies. Pretty terrible that we cannot affix it to $ISPC_VERSION to match the other runners.

At least on https://github.com/Traverse-Research/ispc-downsampler/blob/ec3de05b04fe882c8575571ec9ff8fb06b7badf7/.github/workflows/generate-binaries.yaml#L48-L62 we just download ISPC from GitHub releases to match.

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.

2 participants