Skip to content

fix: CGO_ENABLED #22682

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix: CGO_ENABLED #22682

wants to merge 1 commit into from

Conversation

sivchari
Copy link
Member

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

If we run Argo CD on OSX/Darwin, the CGO_ENABLED is set to 1 automatically.

Signed-off-by: sivchari <[email protected]>
@sivchari sivchari requested a review from a team as a code owner April 15, 2025 17:12
Copy link

bunnyshell bot commented Apr 15, 2025

❌ Preview Environment undeployed from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@rumstead
Copy link
Member

There was a discussion around this in the community meeting, and there was pushback. I believe this PR allows for the ability to supply CGO.

Maybe @leoluz or @agaudreault can add their thoughts.

@sivchari
Copy link
Member Author

sivchari commented Apr 16, 2025

Okay, but make run or make run-local was failed when I executed it in local machine on Darwin/Arm64. Should I make CGO enabled explicit if I want to succeed this task in local ?
Or should I add this content to doc?

@sivchari
Copy link
Member Author

CGO_FLAG=1 STATIC_BUILD=false make mentioned in #22437 hasn't been documented in https://argo-cd.readthedocs.io/en/latest/developer-guide/running-locally/ .
New contributor that they use macOS might be confused that it doesn't work for some reason. So what I should do might be not fix the CGO_FLAG setting but write about this to document.
What do you think ?

@sivchari
Copy link
Member Author

@leoluz @rumstead @agaudreault
ping. What do you think?

@ranakan19
Copy link
Member

I came across issues running some make targets on mac recently. I went back and forth about making these changes and decided not to because these are changes wrt to user's personal dev setup and there isn't just one way to handle it, and they are not issues with all mac but the newer non-intel ones. However if you can word it better, I'm sure it'll be appreciated.

Copy link
Member

@ranakan19 ranakan19 left a comment

Choose a reason for hiding this comment

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

Apart from my previous comment, looking at the code in the PR - I wouldn't set CGO_FLAG based on CGO_ENABLED, because in the rest of the makefile CGO_ENABLED is based on CGO_FLAG. So can just focus on setting CGO_FLAG as mentioned in the comment on line 7

@agaudreault
Copy link
Member

Not sure on this one, either making default or documenting. I was under the impression that this was a problem with one of the lib (something azure related), and this was temporary until the upstream lib is fixed.

I would rather wait until the lib is fixed instead of introducing new code or doc. Sadly, the new contributor experience is degraded, but hopefully the temporary fix is easy to fid when looking up the error message.

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.

4 participants