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
make: fails on Windows environments #11609
Comments
I have no idea what the purpose of this is, looks like it got added in a fairly old commit: #7759 I think we might be able to just delete $HOSTGO it doesn't seem to be used anywhere but the build tools. |
I am able to run make clean multiple times without failure, maybe there is something different in my environment? |
It got added for cross-builds. For example if I am on Linux and run One solution is to remove the |
On Linux this is fine, because of the force flag. However, are you trying on Windows? Because on windows the
|
Ah I see, I was running on Windows in a bash terminal I wasn't using Powershell. Adding support for Powershell should be possible, seems like this is a possible solution: https://stackoverflow.com/questions/63157509/rm-f-equivalent-for-powershell-that-ignore-nonexistent-files |
aaaah! ok that makes sense and I was trying to figure out why we are not seeing these issues in CI and realized we use bash there as well. How hard is it to install the bash terminal in Windows? I have seen a doc that requires installing WSL and I think that is a bit too much to ask of users. |
Pretty easy when you use the bash emulation that comes with Git: https://gitforwindows.org/ which is what I am using. Using WSL is definitely more involved but also possible. |
Ah it uses MinGW. I am wondering if stating that our Makefile requires MinGW on windows is a low bar, to avoid making even more custom changes, especially if a user is already going to the effort to install make on windows. Thoughts? |
I would prefer not adding support for Powershell if we can avoid it, lets just update the documentation saying it requires MinGW. I can do it in #11608 |
Agreed - in the docs if you can show how to install it and start up bash I think that would be acceptable. Thanks! |
Acceptable: This issue was started after a post of me over here Now I was able to use git-bash to compile on windows for both windows and linux. No cmd.exe or powershell required. |
Thanks for the response. I think the PR from last night cleans these up and gets a working makefile under windows again with bash. As such I am going to close this issue. Thanks again! |
Relevant telegraf.conf
n/a
Logs from Telegraf
System info
Windows 10/11
Docker
n/a
Steps to reproduce
make
ormake build-tools
ormake clean
Expected behavior
Telegraf builds successfully, make commands works
Actual behavior
The above failure
Additional info
It appears that our makefile, now that we are building additional tools and dealing with other paths fails. Some issues I have seen:
HOSTGO
variable tries to unset the GOOS, GOARCH, and GOARM variables. In Windowsenv
is not a thing.readme_config_includer
binarymake clean
command fails if any of the files are not available, unlike on linux/macos.The text was updated successfully, but these errors were encountered: