Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !932

Closed
Created Mar 09, 2021 by Kirill Smelkov@kirrOwner
  • Report abuse
Report abuse

golang: Fix build to be robust to $GOBIN set from outside

  • Overview 3
  • Commits 1
  • Changes 1

Xavier Thompson reports that when Theia is compiled inside Theia, Go fails to install with the error showing that golang14's make.bash calls go install to install cmd/go and other commands to the outer go.work/bin instead of inside $GOROOT_FINAL set by the build recipe.

Similarly to https://lab.nexedi.com/nexedi/slapos/merge_requests/928 this might be to the fact that internal go install prioritizes $GOBIN even in the presence of set $GOROOT_FINAL.

-> Don't try to fix Go itself, and make the compilation more robust by unsetting $GOBIN, so that even if that variable is set in the environment where buildout runs, it does not affect the compilation procedure.

Fixes: 8eac67a5 (golang: Prepare for future GOPATH removal)
Reported-on: https://www.erp5.com/group_section/forum/Go-compilation-error-P6f5WisQkc

/cc @xavier_thompson, @jerome

Edited Mar 09, 2021 by Kirill Smelkov
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: q/gobin
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7