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 ARM compiler path on Windows #49

Merged
merged 4 commits into from
Sep 13, 2023

Conversation

parasyte
Copy link
Contributor

Looks like the compiler path changed in recent versions. I'm using Version 12.3.Rel1, released July 28, 2023.

https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

Possible fix for #44?

Looks like the compiler path changed in recent versions. I'm using
Version `12.3.Rel1`, released July 28, 2023.

https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

Possible fix for pd-rs#44?
@parasyte
Copy link
Contributor Author

parasyte commented Aug 28, 2023

Should this path really be hardcoded? Assuming the toolchain installer sets your path correctly, and it does in my case, this absolute path can just be removed, and the environment relied on. Doing this would be more robust since there will be no need to update crank in lockstep with the compiler toolchain.

I've confirmed this works for me:

diff --git a/src/main.rs b/src/main.rs
index 25359e2..c38e9be 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -28,8 +28,7 @@ const GCC_PATH_STR: &'static str = "/usr/local/bin/arm-none-eabi-gcc";
 #[cfg(all(unix, not(target_os = "macos")))]
 const GCC_PATH_STR: &'static str = "arm-none-eabi-gcc";
 #[cfg(windows)]
-const GCC_PATH_STR: &'static str =
-    r"C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\12.3 rel1\bin\arm-none-eabi-gcc.exe";
+const GCC_PATH_STR: &'static str = "arm-none-eabi-gcc.exe";

 #[cfg(unix)]
 #[allow(unused)]

@boozook
Copy link
Member

boozook commented Sep 4, 2023

This looks like kinda breaking change for old versions and system without arm-gcc in the PATH. That's ok, but so need to bump minor version component.
Also as I see there's new problems with integration tests on CI.

@parasyte parasyte mentioned this pull request Sep 5, 2023
@parasyte parasyte marked this pull request as draft September 5, 2023 06:23
Copy link
Member

@boozook boozook left a comment

Choose a reason for hiding this comment

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

Okay, that's ok, but I'm sure there also need to mention in the readme that arm-gcc should be in path on windows.

@boozook
Copy link
Member

boozook commented Sep 11, 2023

Also, how about use my new utils to find gcc? Here is example.

@parasyte
Copy link
Contributor Author

WRT the new stuff, I'm going to have to migrate to it. When I started my project, none of that was even publicly available.

@parasyte
Copy link
Contributor Author

Oh look, this fixes the broken Windows test, lol. 🎉

Yeah, I can update the readme.

Include a note about GCC ARM compiler being required in the `PATH` env var.
@parasyte parasyte marked this pull request as ready for review September 12, 2023 17:22
@boozook boozook merged commit 7eea747 into pd-rs:main Sep 13, 2023
7 checks passed
@parasyte parasyte deleted the fix/windows-arm-compiler-path branch September 14, 2023 19:23
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