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

Build binaries for stackablectl #92

Open
3 of 4 tasks
sbernauer opened this issue Aug 11, 2023 · 1 comment
Open
3 of 4 tasks

Build binaries for stackablectl #92

sbernauer opened this issue Aug 11, 2023 · 1 comment
Assignees

Comments

@sbernauer
Copy link
Member

sbernauer commented Aug 11, 2023

This is needed, so that we can switch from the old stackablectl to the new one. Currently the Windows build is broken. Currently investigated as part of #98 and #111

Tasks

Preview Give feedback
  1. 0 of 10
    sbernauer
  2. 0 of 11
    sbernauer
@sbernauer sbernauer self-assigned this Aug 11, 2023
@sbernauer sbernauer moved this to Development: In Progress in Stackable Engineering Aug 11, 2023
@sbernauer sbernauer moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Aug 14, 2023
@Techassi Techassi moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Aug 14, 2023
@sbernauer sbernauer moved this from Development: In Review to Development: In Progress in Stackable Engineering Aug 16, 2023
@sbernauer sbernauer moved this from Development: In Progress to Ready for Development in Stackable Engineering Aug 16, 2023
@Techassi Techassi self-assigned this Sep 29, 2023
@Techassi Techassi moved this to Development: In Progress in Stackable Engineering Sep 29, 2023
@Techassi
Copy link
Member

Techassi commented Oct 4, 2023

Okay, after several hours of going down rabbit holes, here is the current status:

  • The environment variable CC cannot contain any spaces in the supplied path. This is due to cgo not being able to handle the spaces without escaping. The fix for this is to add single quotes ' around the C compiler path. This error only gets uncovered when working with Windows, as it places the C compiler in C:\Program Files\.... This can be fixed by patching gobuild. See here. This ideally should be fixed upstream, but the project seems unmaintained. Another option is to fix it in a fork.
  • msys2 is needed, as otherwise the build process fails with cl.exe not being able to parse the /Werror argument. This is still weird, as there is no proper support for MSVC builds.
  • The target x86_64-windows-msvc straight up doesn't work (because cgo doesn't support it). Trying to use the MSVC target fails with multiple weird errors which look important, but are not related to the issue at all. See here for more context.
  • Unresolved libs: ld.exe cannot find -lresolv. This cannot be fixed by installing host dependencies bit it seems like it can be fixed by removing the cargo flag cargo:rustc-link-lib=resolv. This seems to be related to changes to cgo in Go 1.20. More context here.

There seems to be one (hopefully) final issue which prevents us from building for Windows: rust-lang/rust#112368. One suggested fix didn't work and I didn't try the alternative approach. This should be resolved by either using an up2date binutils version or waiting for a new Rust GNU toolchain.

@Techassi Techassi moved this from Development: In Progress to Development: Track in Stackable Engineering Oct 4, 2023
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

No branches or pull requests

2 participants