• Failing devel/esbuild after go update?

    From Jonathan Chen@jonc@chen.org.nz to muc.lists.freebsd.ports on Sat Jun 20 08:30:25 2026
    From Newsgroup: muc.lists.freebsd.ports

    Hi,

    I'm trying to build chrome, but I'm getting an error when building one
    of its dependency, devel/esbuild. This appears to be a consequence of
    the go version-bump.

    Building for esbuild-0.28.0_2
    (cd
    /construction/xports/devel/esbuild/work/github.com/evanw/esbuild@v0.28.0;
    for t in ./cmd/esbuild:esbuild; do out=$(/usr/bin/basename $(echo
    ${t} | /usr/bin/se
    d -Ee 's/^[^:]*:([^:]+).*$/\1/' -e 's/^\.$/esbuild/')); pkg=$(echo ${t}
    | /usr/bin/sed -Ee 's/^([^:]*).*$/\1/' -e 's/^esbuild$/./'); echo
    "===> Building ${out} f
    rom ${pkg}"; /usr/bin/env -i
    HOME=/construction/xports/devel/esbuild/work MACHINE_ARCH=amd64
    PWD="${PWD}" GIT_CEILING_DIRECTORIES=/construction/xports/devel/esbu
    ild/work __MAKE_CONF=/nonexistent OSVERSION=1501501 PATH=/usr/local/libexec/ccache:/construction/xports/devel/esbuild/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/l
    ocal/sbin:/usr/local/bin TERM=dumb TMPDIR=/tmp UNAME_m=amd64
    UNAME_p=amd64 UNAME_r=15.1-SYNTH UNAME_s=FreeBSD UNAME_v=FreeBSD\
    15.1-SYNTH XDG_DATA_HOME=/construction
    /xports/devel/esbuild/work XDG_CONFIG_HOME=/construction/xports/devel/esbuild/work XDG_CACHE_HOME=/construction/xports/devel/esbuild/work/.cache HOME=/constructio
    n/xports/devel/esbuild/work TMPDIR="/tmp" PATH=/usr/local/libexec/ccache:/construction/xports/devel/esbuild/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/
    usr/local/bin PKG_CONFIG_LIBDIR=/construction/xports/devel/esbuild/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig
    MK_
    DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fstack-protector-strong -fno-stric
    t-aliasing " CPP="cpp" CPPFLAGS="" LDFLAGS=" " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " CCACHE_DIR="/ccache" BSD_IN
    STALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m
    0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install
    -m 0644" BSD_INSTALL_MAN
    ="install -m 444" CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" GOAMD64= GOARM= GOTMPDIR="/construction/xports/devel/esbuild/w
    ork" GOPATH="/distfiles/go/devel_esbuild" GOBIN="/construction/xports/devel/esbuild/work/bin" GO111MODULE=on GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GOMAXPROC
    S=6 GOPROXY=off /usr/local/bin/go125 build -buildmode=exe -v -trimpath -ldflags '-s ' -buildvcs=false -mod=vendor -o /construction/xports/devel/esbuild/work/bin/${o
    ut} ${pkg}; done)
    Building esbuild from ./cmd/esbuild
    internal/fs/modkey_unix.go:9:2: cannot find module providing package golang.org/x/sys/unix: import lookup disabled by -mod=vendor
    *** Error code 1

    Stop.
    make: stopped making "build" in /xports/devel/esbuild

    The build is on STABLE-15/amd64 using synth. Is anyone else seeing this?

    Cheers.
    --
    Jonathan Chen <jonc@chen.org.nz>



    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Jonathan Chen@jonc@chen.org.nz to muc.lists.freebsd.ports on Mon Jun 22 01:47:25 2026
    From Newsgroup: muc.lists.freebsd.ports

    June 20, 2026 at 8:30 AM, Jonathan Chen wrote:

    Hi,

    I'm trying to build chrome, but I'm getting an error when building one of its dependency, devel/esbuild. This appears to be a consequence of the go version-bump.

    Building for esbuild-0.28.0_2
    (cd /construction/xports/devel/esbuild/work/github.com/evanw/esbuild@v0.28.0; for t in ./cmd/esbuild:esbuild; do out=$(/usr/bin/basename $(echo ${t} | /usr/bin/se
    d -Ee 's/^[^:]*:([^:]+).*$/\1/' -e 's/^\.$/esbuild/')); pkg=$(echo ${t} | /usr/bin/sed -Ee 's/^([^:]*).*$/\1/' -e 's/^esbuild$/./'); echo "===> Building ${out} f
    rom ${pkg}"; /usr/bin/env -i HOME=/construction/xports/devel/esbuild/work MACHINE_ARCH=amd64 PWD="${PWD}" GIT_CEILING_DIRECTORIES=/construction/xports/devel/esbu
    ild/work __MAKE_CONF=/nonexistent OSVERSION=1501501 PATH=/usr/local/libexec/ccache:/construction/xports/devel/esbuild/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/l
    ocal/sbin:/usr/local/bin TERM=dumb TMPDIR=/tmp UNAME_m=amd64 UNAME_p=amd64 UNAME_r=15.1-SYNTH UNAME_s=FreeBSD UNAME_v=FreeBSD\ 15.1-SYNTH XDG_DATA_HOME=/construction
    /xports/devel/esbuild/work XDG_CONFIG_HOME=/construction/xports/devel/esbuild/work XDG_CACHE_HOME=/construction/xports/devel/esbuild/work/.cache HOME=/constructio
    n/xports/devel/esbuild/work TMPDIR="/tmp" PATH=/usr/local/libexec/ccache:/construction/xports/devel/esbuild/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/
    usr/local/bin PKG_CONFIG_LIBDIR=/construction/xports/devel/esbuild/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_
    DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fstack-protector-strong -fno-stric
    t-aliasing " CPP="cpp" CPPFLAGS="" LDFLAGS=" " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " CCACHE_DIR="/ccache" BSD_IN
    STALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN
    ="install -m 444" CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" GOAMD64= GOARM= GOTMPDIR="/construction/xports/devel/esbuild/w
    ork" GOPATH="/distfiles/go/devel_esbuild" GOBIN="/construction/xports/devel/esbuild/work/bin" GO111MODULE=on GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GOMAXPROC
    S=6 GOPROXY=off /usr/local/bin/go125 build -buildmode=exe -v -trimpath -ldflags '-s ' -buildvcs=false -mod=vendor -o /construction/xports/devel/esbuild/work/bin/${o
    ut} ${pkg}; done)
    Building esbuild from ./cmd/esbuild
    internal/fs/modkey_unix.go:9:2: cannot find module providing package golang.org/x/sys/unix: import lookup disabled by -mod=vendor
    *** Error code 1
    I've just tried building from /usr/ports, and I see that the actual cause of the error is from the "fetch" phase:
    # make
    esbuild-0.28.0_2 depends on file: /usr/local/sbin/pkg - found
    esbuild-0.28.0_2 depends on file: /usr/local/bin/go125 - found
    Fetching all distfiles required by esbuild-0.28.0_2 for building
    Fetching github.com/evanw/esbuild dependencies
    Extracting for esbuild-0.28.0_2
    SHA256 Checksum OK for go/devel_esbuild/esbuild-v0.28.0/v0.28.0.mod.
    SHA256 Checksum OK for go/devel_esbuild/esbuild-v0.28.0/v0.28.0.zip.
    Tidying github.com/evanw/esbuild dependencies
    go: finding module for package golang.org/x/sys/unix
    go: github.com/evanw/esbuild/internal/fs imports
    golang.org/x/sys/unix: module golang.org/x/sys@latest found (v0.0.0-20220715151400-c0bba94af5f8), but does not contain package golang.org/x/sys/unix
    Vendoring github.com/evanw/esbuild dependencies
    go: github.com/evanw/esbuild/internal/fs imports
    golang.org/x/sys/unix: no required module provides package golang.org/x/sys/unix; to add it:
    go get golang.org/x/sys/unix
    go: no dependencies to vendor
    Patching for esbuild-0.28.0_2
    esbuild-0.28.0_2 depends on file: /usr/local/bin/go125 - found
    Configuring for esbuild-0.28.0_2
    Building for esbuild-0.28.0_2
    (cd /tmp/usr/ports/devel/esbuild/work/github.com/evanw/esbuild@v0.28.0; for t in ./cmd/esbuild:esbuild; do out=$(/usr/bin/basename $(echo ${t} | /usr/bin/sed -Ee 's/^[^:]*:([^:]+).*$/\1/' -e 's/^\.$/esbuild/')); pkg=$(echo ${t} | /usr/bin/sed -Ee 's/^([^:]*).*$/\1/' -e 's/^esbuild$/./'); echo "===> Building ${out} from ${pkg}"; /usr/bin/env -i HOME=/tmp/usr/ports/devel/esbuild/work MACHINE_ARCH=amd64 PWD="${PWD}" GIT_CEILING_DIRECTORIES=/tmp/usr/ports/devel/esbuild/work __MAKE_CONF=/nonexistent OSVERSION=1501501 PATH=/tmp/usr/ports/devel/esbuild/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin TERM=screen XDG_DATA_HOME=/tmp/usr/ports/devel/esbuild/work XDG_CONFIG_HOME=/tmp/usr/ports/devel/esbuild/work XDG_CACHE_HOME=/tmp/usr/ports/devel/esbuild/work/.cache HOME=/tmp/usr/ports/devel/esbuild/work PATH=/tmp/usr/ports/devel/esbuild/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/tmp/usr/ports/devel/esbuild/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="" LDFLAGS=" " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" GOAMD64= GOARM= GOTMPDIR="/tmp/usr/ports/devel/esbuild/work" GOPATH="/var/distfiles/go/devel_esbuild" GOBIN="/tmp/usr/ports/devel/esbuild/work/bin" GO111MODULE=on GOFLAGS=-modcacherw GOSUMDB=sum.golang.org GOMAXPROCS=24 GOPROXY=off /usr/local/bin/go125 build -buildmode=exe -v -trimpath -ldflags '-s ' -buildvcs=false -mod=vendor -o /tmp/usr/ports/devel/esbuild/work/bin/${out} ${pkg}; done)
    Building esbuild from ./cmd/esbuild
    internal/fs/modkey_unix.go:9:2: cannot find module providing package golang.org/x/sys/unix: import lookup disabled by -mod=vendor
    *** Error code 1
    Stop.
    make: stopped making "all" in /usr/ports/devel/esbuild
    Is anyone else not seeing this? If not, how can I get a usable copy of golang/x/sys/unix?
    Cheers.
    --
    Jonathan Chen <jonc@chen.org.nz>
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris Torek@chris.torek@gmail.com to muc.lists.freebsd.ports on Mon Jun 22 04:27:41 2026
    From Newsgroup: muc.lists.freebsd.ports

    ...
    Building esbuild from ./cmd/esbuild
    internal/fs/modkey_unix.go:9:2: cannot find module providing package golang.org/x/sys/unix: import lookup disabled by -mod=vendor
    *** Error code 1

    Stop.
    make: stopped making "all" in /usr/ports/devel/esbuild

    Is anyone else not seeing this? If not, how can I get a usable copy of golang/x/sys/unix?

    This should "just work" (but see below). I tested it with
    "synth build devel/esbuild" on my (16-current) system and it
    did in fact build fine, using Go 1.25.11.

    Here's the relevant fetch phase output:

    --------------------------------------------------------------------------------
    -- Phase: fetch --------------------------------------------------------------------------------
    License MIT accepted by the user
    v0.28.0.mod doesn't seem to exist in
    /distfiles/go/devel_esbuild/esbuild-v0.28.0.
    Attempting to fetch
    https://proxy.golang.org/github.com/evanw/esbuild/@v/v0.28.0.mod
    v0.28.0.mod 428 B 4910 kBps 00s
    v0.28.0.zip doesn't seem to exist in
    /distfiles/go/devel_esbuild/esbuild-v0.28.0.
    Attempting to fetch
    https://proxy.golang.org/github.com/evanw/esbuild/@v/v0.28.0.zip
    v0.28.0.zip 2101 kB 9314 kBps 01s
    Fetching all distfiles required by esbuild-0.28.0_2 for building
    Fetching github.com/evanw/esbuild dependencies
    # get https://proxy.golang.org/golang.org/x/sys/@v/v0.0.0-20220715151400-c0bba94af5f8.mod
    # get https://proxy.golang.org/golang.org/x/sys/@v/v0.0.0-20220715151400-c0bba94af5f8.mod:
    200 OK (0.196s)
    # get https://proxy.golang.org/sumdb/sum.golang.org/supported
    # get https://proxy.golang.org/sumdb/sum.golang.org/supported: 404 Not
    Found (0.027s)
    # get https://sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20220715151400-c0bba94af5f8
    # get https://sum.golang.org/lookup/golang.org/x/sys@v0.0.0-20220715151400-c0bba94af5f8:
    200 OK (0.350s)

    Note that at this point Go will have the appropriate
    golang.org/x/sys/unix files.

    I've seen this kind of behavior before with bad cached distfiles. If you
    look at /usr/ports/distfiles/go/devel_esbuild/ you'll find them; removing
    all of them is no doubt overkill but will almost certainly fix your build.

    I think what this means is that the Uses/go.mk rules aren't quite
    right, that they need to clean up old (wrong version of Go) modules
    that got cached via `-mod=vendor`. Coming up with a fix is a little
    beyond what I have time for right now though, as there are all those
    little complexities with these Mk/Uses/ files.

    (Running `make gomod-clean` should also remove the
    stale modules, except you might have to get synth to do
    that in the special build environment.)

    Chris


    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Jonathan Chen@jonc@chen.org.nz to muc.lists.freebsd.ports on Mon Jun 22 20:13:45 2026
    From Newsgroup: muc.lists.freebsd.ports

    June 22, 2026 at 11:27 PM, Chris Torek wrote:
    ...
    I've seen this kind of behavior before with bad cached distfiles. If you
    look at /usr/ports/distfiles/go/devel_esbuild/ you'll find them; removing
    all of them is no doubt overkill but will almost certainly fix your build.
    Thank you! This indeed fixed the problem with the build. I will make a note to clear out ${DISTFILES}/go everytime there is a go-revision bump.
    Thanks again!
    --
    Jonathan Chen <jonc@chen.org.nz>
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris Torek@chris.torek@gmail.com to muc.lists.freebsd.ports on Wed Jun 24 08:24:04 2026
    From Newsgroup: muc.lists.freebsd.ports

    On Mon, Jun 22, 2026 at 1:13rC>PM Jonathan Chen <jonc@chen.org.nz> wrote:
    Thank you! This indeed fixed the problem with the build. I will make a note to clear out ${DISTFILES}/go everytime there is a go-revision bump.
    I stared at this some more and now I wonder why "go mod download all"
    didn't download the correct versions, so that the build with downloads
    disabled can find them. (The old versions would presumably collect as
    garbage cache entries of course.) The Go documentation is rather
    opaque on this point.
    Chris
    --
    Posted automagically by a mail2news gateway at muc.de e.V.
    Please direct questions, flames, donations, etc. to news-admin@muc.de
    --- Synchronet 3.22a-Linux NewsLink 1.2