Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: use w64devkit 1.23.0 , TestScript/list_pkgconfig_error fail #68283

Open
qiulaidongfeng opened this issue Jul 3, 2024 · 3 comments · May be fixed by #68324
Open

cmd/go: use w64devkit 1.23.0 , TestScript/list_pkgconfig_error fail #68283

qiulaidongfeng opened this issue Jul 3, 2024 · 3 comments · May be fixed by #68324
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@qiulaidongfeng
Copy link
Member

qiulaidongfeng commented Jul 3, 2024

Go version

go version devel go1.23-beaf7f32 Mon Jun 10 22:06:47 2024 +0000 windows/amd64

Output of go env in your module/workspace:

set GO111MODULE=auto
set GOARCH=amd64
set GOBIN=
set GOCACHE=D:\file\go-build
set GOENV=C:\Users\26454\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\file\gofile\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\file\gofile
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=D:\file\gofile\gogit\go1
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=local
set GOTOOLDIR=D:\file\gofile\gogit\go1\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=devel go1.23-beaf7f32 Mon Jun 10 22:06:47 2024 +0000
set GODEBUG=
set GOTELEMETRY=on
set GOTELEMETRYDIR=C:\Users\26454\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOAMD64=v3
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\file\gofile\gogit\go1\src\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\26454\AppData\Local\Temp\go-build4081608796=/tmp/go-build -gno-record-gcc-switches

What did you do?

use w64devkit 1.23.0 , from https://github.com/skeeto/w64devkit/releases/tag/v1.23.0 get.
run go test -short -run=TestScript/list_pkgconfig_error cmd/go

What did you see happen?

script_test.go:159: FAIL: testdata\script\list_pkgconfig_error.txt:5: stderr '^# example\n# \[pkg-config .*\]\n(.*\n)*Package .* not found': no match for `(?m)^# example\n# \[pkg-config .*\]\n(.*\n)*Package .* not found` in stderr

What did you expect to see?

test pass.

@skeeto
Copy link

skeeto commented Jul 5, 2024

Adding some detail: The pkg-config implementation in question is u-config, and the test failure isn't specific to Windows. It fails unless standard error includes a very specific error string (Package .* not found), and my implementation outputs a slightly different error string. The two most popular implementations, pkg-config and pkgconf, output something like this:

$ pkg-config --cflags libnot-a-valid-cgo-library
Package libnot-a-valid-cgo-library was not found in the pkg-config search path.
...

While u-config does this, which doesn't match:

$ pkg-config --cflags libnot-a-valid-cgo-library
pkg-config: could not find package 'libnot-a-valid-cgo-library'

@thanm thanm added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. help wanted labels Jul 5, 2024
qiulaidongfeng added a commit to qiulaidongfeng/go that referenced this issue Jul 6, 2024
FIxes golang#68283

Change-Id: I0b456463d9dd7206dd1ed3ed3b3d7a18762cd95d
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/596935 mentions this issue: cmd/go: relax the regular expression of TestScript/list_pkgconfig_error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants