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

Local build is not working on OSX #166

Closed
rappizs opened this issue Aug 14, 2023 · 1 comment · Fixed by #169
Closed

Local build is not working on OSX #166

rappizs opened this issue Aug 14, 2023 · 1 comment · Fixed by #169
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rappizs
Copy link
Contributor

rappizs commented Aug 14, 2023

mage build returns an error related to the OSX date: date: illegal option -- d

The bug was introduced here e23ad22, and the problem is related to the mage.GenerateLDFlags (https://github.com/kubernetes-sigs/release-utils/blob/1bf6b4c5d954/mage/version.go#L73) function. This func runs the date command but this works differently on Linux and on OSX (Unix).

For more info please take a look on this topic: https://stackoverflow.com/questions/9804966/date-command-does-not-follow-linux-specifications-mac-os-x-lion

The quick workaround is to install the GNU based date on Mac, brew install coreutils, and then link your date to point to gdate. It is not documented at the moment and I would suggest to use a build process that doesn't require to change system level programs.

@rappizs rappizs added this to the v0.1.0 milestone Aug 14, 2023
@rappizs rappizs added the bug Something isn't working label Aug 14, 2023
@rappizs
Copy link
Contributor Author

rappizs commented Aug 14, 2023

Created upstream issue: kubernetes-sigs/release-utils#90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant