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

go: add build_style=go to avoid code duplication #20435

Closed
wants to merge 1 commit into from

Conversation

ericonr
Copy link
Member

@ericonr ericonr commented Mar 29, 2020

The GOARCH selection snippet was duplicated in the go build_style script
for environment variables and in the go template itself. Furthermore,
there were discrepancies between the two snippets, which have been
fixed.

This makes the go template leaner, and makes both cases more robust (changes to GOARCH selection can be done in a single place).

@ericonr
Copy link
Member Author

ericonr commented Mar 29, 2020

Seems some builds failed with timeouts, with others the issue was memory consumption during the bootstrap process:

cc1plus: out of memory allocating 262144 bytes after a total of 3915776 bytes

The GOARCH selection snippet was duplicated in the go build_style script
for environment variables and in the go template itself. Furthermore,
there were discrepancies between the two snippets, which have been
fixed.
@Johnnynator
Copy link
Member

This adds go to hostmakedepends and therefore results in a build loop for noncross architectures.

@ericonr
Copy link
Member Author

ericonr commented Mar 30, 2020

This adds go to hostmakedepends and therefore results in a build loop for noncross architectures.

Yeah, I was messing with it and noticed this issue when building for a second time. Do you know if I could just source the c/e/build_style/go.sh file? From what I read of the manual, there isn't any variable that points to the directory where xbps-src is located and I don't know if it's possible for the script to be run from anywhere or if it's always supposed to be run as ./xbps-src.

@q66
Copy link
Contributor

q66 commented Mar 30, 2020

broken does not work in environment, it's not a variable

this PR doesn't really make sense

@q66
Copy link
Contributor

q66 commented Mar 30, 2020

ec937e4 and 927e790 addressed the functional concerns of this, other than that it doesn't really make sense to set build-style here as there is too much of a mismatch and attempting to merge them would create more code than remove.

@q66 q66 closed this Mar 30, 2020
@ericonr ericonr mentioned this pull request Mar 30, 2020
@ericonr ericonr deleted the go-build branch August 3, 2020 04:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants