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: missing space on pkg-config errors #25260

Closed
AlexRouSg opened this issue May 5, 2018 · 1 comment
Closed

cmd/go: missing space on pkg-config errors #25260

AlexRouSg opened this issue May 5, 2018 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@AlexRouSg
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10.2 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Irrevent

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

package main

/*
	#cgo pkg-config: --static sdl2
	#include <SDL.h>
*/
import "C"

func main() {
}

Building packages using pkg-config and using pkg-config flags like --static
where the environment variable PKG_CONFIG_PATH is unset to force a error.

What did you expect to see?

# pkg-config --cflags --static sdl2
Package sdl2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl2' found
pkg-config: exit status 1

What did you see instead?

# pkg-config --cflags --staticsdl2
Package sdl2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl2' found
pkg-config: exit status 1

There is a missing space between --static and sdl2, as far as I can tell this affects both the --cflags and --libs errors.

b.showOutput(nil, p.Dir, b.PkgconfigCmd()+" --cflags "+strings.Join(pcflags, " ")+strings.Join(pkgs, " "), string(out))

b.showOutput(nil, p.Dir, b.PkgconfigCmd()+" --libs "+strings.Join(pcflags, " ")+strings.Join(pkgs, " "), string(out))

I am willing to send a PR however I'm not sure if this needs a test as it seems pretty trivial and completely harmless (only affects the error message).

cc @ianlancetaylor

@agnivade agnivade added the NeedsFix The path to resolution is known, but the work has not been done. label May 5, 2018
@agnivade agnivade added this to the Go1.11 milestone May 5, 2018
@gopherbot
Copy link

Change https://golang.org/cl/111638 mentions this issue: cmd/go: added missing space to pkg-config errors

@golang golang locked and limited conversation to collaborators May 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants