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

Tweak build flags for internalDup2 on darwin arm64 #743

Merged
merged 1 commit into from Sep 11, 2022
Merged

Tweak build flags for internalDup2 on darwin arm64 #743

merged 1 commit into from Sep 11, 2022

Conversation

lavoiesl
Copy link
Contributor

Fixes an issue that prevents building on darwin amr64 (M1 macs):

$ go build .
# github.com/linkedin/Burrow/core
core/logger.go:172:2: undefined: internalDup2
core/logger.go:173:2: undefined: internalDup2

My understanding is that open_out_log_unix.go was designed to be used everywhere except windows and linux_arm64, as evidenced by the comment:

linux_arm64 doesn't have syscall.Dup2, so use the nearly identical syscall.Dup3 instead

However, the build flags in open_out_log_unix.go were also excluding darwin_arm64, which was not provided (rightly so) by open_out_log_linux_arm64.go.

I decided to go the route of making the build flags of open_out_log_unix.go only exclude linux_arm64 instead of adding mentions of darwin, because I felt it was more semantic; a better representation of the inherent non-overlapping union of the 3 flags:

  1. windows
  2. linux_arm64
  3. !windows && !linux_arm64 (not the first 2)

@lavoiesl lavoiesl requested a review from bai as a code owner February 14, 2022 03:15
@hack3ric hack3ric mentioned this pull request Sep 11, 2022
@bai bai merged commit c26b4c0 into linkedin:master Sep 11, 2022
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.

None yet

2 participants