AdguardTeam/dnsproxy

Failed to build dnsproxy on Ubuntu 22.04.4 LTS.

hongyi-zhao opened this issue · 1 comments

See below:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.4 LTS
Release:	22.04
Codename:	jammy

$ git log -1
commit 791906ea48e8bb350a79b456ceeac69915583df0 (HEAD -> master, tag: v0.72.2, origin/master, origin/HEAD)
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Wed Jul 31 19:36:46 2024 +0300

    Pull request 372: AGDNS-2280 Upd golibs
    
    Squashed commit of the following:
    
    commit 55a1cbac4156ca7797ce27148c46d3f0e382c407
    Author: Eugene Burkov <E.Burkov@AdGuard.COM>
    Date:   Wed Jul 31 18:58:28 2024 +0300
    
        all: upd golibs

$ proxychains-ng-socks5 make build
env BRANCH="$( git rev-parse --abbrev-ref HEAD )" COMMIT='' DIST_DIR='build' GO="${GO:-go}" GOAMD64='v1' GOPROXY='https://proxy.golang.org|direct' GOTOOLCHAIN='go1.22.5' OUT='dnsproxy' PATH="${PWD}/bin:$( "${GO:-go}" env GOPATH )/bin:${PATH}" RACE='0' REVISION="$( git rev-parse --short HEAD )" VERBOSE="${VERBOSE:-0}" VERSION="0"           "/bin/sh" ./scripts/make/go-deps.sh
go: downloading go1.22.5 (linux/amd64)
go: download go1.22.5 for linux/amd64: toolchain not available
go: errors parsing go.mod:
/home/werner/Public/anti-gfw/dns/dnsproxy/dnsproxy.git/go.mod:3: invalid go version '1.22.5': must match format 1.23
make: *** [Makefile:59: go-deps] Error 1

Regards,
Zhao

It seems that I used a stale local git repo, the following works:

werner@x13dai-t:~/Public/repo/github.com/AdguardTeam/dnsproxy.git$ git clean -xdf
Removing dnsproxy
werner@x13dai-t:~/Public/repo/github.com/AdguardTeam/dnsproxy.git$ proxychains-ng-socks5 make GOPROXY=$GOPROXY build
env BRANCH="$( git rev-parse --abbrev-ref HEAD )" COMMIT='' DIST_DIR='build' GO="${GO:-go}" GOAMD64='v1' GOPROXY='https://goproxy.cn,direct' GOTOOLCHAIN='go1.22.5' OUT='dnsproxy' PATH="${PWD}/bin:$( "${GO:-go}" env GOPATH )/bin:${PATH}" RACE='0' REVISION="$( git rev-parse --short HEAD )" VERBOSE="${VERBOSE:-0}" VERSION="0"           "/bin/sh" ./scripts/make/go-deps.sh
env BRANCH="$( git rev-parse --abbrev-ref HEAD )" COMMIT='' DIST_DIR='build' GO="${GO:-go}" GOAMD64='v1' GOPROXY='https://goproxy.cn,direct' GOTOOLCHAIN='go1.22.5' OUT='dnsproxy' PATH="${PWD}/bin:$( "${GO:-go}" env GOPATH )/bin:${PATH}" RACE='0' REVISION="$( git rev-parse --short HEAD )" VERBOSE="${VERBOSE:-0}" VERSION="0"           "/bin/sh" ./scripts/make/go-build.sh

The GOPROXY='https://proxy.golang.org|direct' variable used in Makefile is strange, and I've reported this problem here.