Skip to content

cmd: allow CGO_ENABLED=1#1419

Merged
joelanford merged 1 commit intooperator-framework:masterfrom
jnodorp:allow-cgo
May 15, 2019
Merged

cmd: allow CGO_ENABLED=1#1419
joelanford merged 1 commit intooperator-framework:masterfrom
jnodorp:allow-cgo

Conversation

@jnodorp
Copy link
Contributor

@jnodorp jnodorp commented May 13, 2019

stop overriding CGO_ENABLED on build

Fixes #1404

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 13, 2019
@openshift-ci-robot
Copy link

Hi @jschlichtholz. Thanks for your PR.

I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 13, 2019
@AlexNPavel
Copy link
Contributor

Can you add a check if cgo is not set before the environment setup line for the command? By default, cgo is enabled on macOS and Linux, but this breaks cross-compilation for us (for instance, building on Fedora may link to C-libraries that don't exist in UBI, which is CentOS 7 based). You can use os.LookupEnv and use the second return argument (which is a bool) to figure out if it is set. If it is not set, we should add CGO_ENABLED=0 to make sure cross-compilation works. If it set, leave it unchanged.

@jnodorp
Copy link
Contributor Author

jnodorp commented May 14, 2019

Thanks @AlexNPavel! I updated the PR according to you comment.

stop overriding CGO_ENABLED on build

Fixes #1404
@lilic
Copy link
Member

lilic commented May 14, 2019

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 14, 2019
Copy link
Contributor

@AlexNPavel AlexNPavel left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@lilic lilic left a comment

Choose a reason for hiding this comment

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

The ansible e2e test failed so I restarted the job.

lgtm on green, thanks!

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not override CGO_ENABLED=1 in "operator-sdk build"

5 participants