Bug 259709 - lang/go: Fails to build with WX page mapping disabled (kern.elf64.allow_wx=0)
Summary: lang/go: Fails to build with WX page mapping disabled (kern.elf64.allow_wx=0)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Guangyuan Yang
URL:
Keywords:
Depends on: 263726
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-08 11:05 UTC by Ivan Rozhuk
Modified: 2022-06-04 13:11 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (ygy)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2021-11-08 11:05:51 UTC
=> SHA256 Checksum OK for go1.17.3.src.tar.gz.
=> SHA256 Checksum OK for go-freebsd-amd64-go1.14.tar.xz.
===>  Patching for go-1.17.3_1,1
===>  Applying FreeBSD patches for go-1.17.3_1,1 from /usr/ports/lang/go/files
===>   go-1.17.3_1,1 depends on file: /usr/local/bin/ccache - found
===>  Configuring for go-1.17.3_1,1
===>  Building for go-1.17.3_1,1
cd /tmp/ports/usr/ports/lang/go/work/go/src ; /usr/bin/env  XDG_CACHE_HOME=/tmp/ports/usr/ports/lang/go/work  GOROOT_BOOTSTRAP=/tmp/ports/usr/ports/lang/go/work/go-freebsd-amd64-bootstrap  GOROOT=/tmp/ports/usr/ports/lang/go/work/go  GOROOT_FINAL=/usr/local/go  GOBIN=  GOOS=freebsd  GOARCH=amd64  GO386=  GOARM=  /bin/sh make.bash -v
-ap: not found
exec_new_vmspace: mapping stack size 0x20000000 prot 0x7 failed mach error 2 errno 13
Abort trap
Building Go cmd/dist using /tmp/ports/usr/ports/lang/go/work/go-freebsd-amd64-bootstrap. ()
cmd/dist
exec_new_vmspace: mapping stack size 0x20000000 prot 0x7 failed mach error 2 errno 13
Abort trap
*** Error code 134

Stop.
Comment 1 Dan Kotowski 2022-04-28 13:37:18 UTC
Still an issue with go-1.18,1
Comment 2 Dmitri Goutnik freebsd_committer freebsd_triage 2022-05-02 01:25:36 UTC
This seems to be fixed upstream in 1.18 [1], but our bootstrap is go1.14. I guess we'll need to update bootstap compilers to go1.17 (which will be a minimum requirement for go1.19 anyway) and backport the fix.

[1] https://github.com/golang/go/issues/48112
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-05-03 12:15:35 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ef05a2efcfa6a36d49ec428c5ed7b544e2e97857

commit ef05a2efcfa6a36d49ec428c5ed7b544e2e97857
Author:     Dmitri Goutnik <dmgk@FreeBSD.org>
AuthorDate: 2022-05-03 12:01:03 +0000
Commit:     Dmitri Goutnik <dmgk@FreeBSD.org>
CommitDate: 2022-05-03 12:14:17 +0000

    lang/{go,go117,go-devel}: Update bootstrap to go1.17.9

    Switch to the newer go1.17.9 bootstrap with backported CL346872
    [1,2], fixes ports 259709.

    [1] https://go-review.googlesource.com/c/go/+/346872/
    [2] https://github.com/golang/go/issues/48112

    PR:             263726
    PR:             259709
    Approved by:    ygy@ (maintainer)

 lang/go-devel/distinfo | 22 +++++++++++-----------
 lang/go/Makefile       |  2 +-
 lang/go/distinfo       | 22 +++++++++++-----------
 lang/go117/distinfo    | 22 +++++++++++-----------
 4 files changed, 34 insertions(+), 34 deletions(-)
Comment 4 Dmitri Goutnik freebsd_committer freebsd_triage 2022-06-04 13:11:56 UTC
I believe this was fixed by the above commit. Please reopen if it is still an issue.