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: errors when using pkg-config 0.29.2 from the OpenWRT toolchain #27940
Comments
It's very common for programs to understand Locally, I have
I downloaded
What am I missing? Does OpenWRT compile Ideally we wouldn't remove the |
@mvdan Thanks a lot for your investigation. I am going to ask the OpenWRT developers for taking a look at this issue. Where exactly is the |
It seems like You can see the code in question in
It's true that the manpage doesn't explicitly mention support for Here seems to be OpenWRT's Makefile for pkg-config, though I don't see anything that could change this behavior: https://github.com/openwrt/openwrt/blob/master/tools/pkg-config/Makefile They do build their own glib though, so perhaps they build it in a specific way that affects flag parsing. |
This problem has to be fixed in the OpenWRT toolchain. |
Go for openwrt passes pkg-config arguments in the format of pkg-config --cflags -- pkg-name which in turn will be passed down to the real pkg-config as something like pkg-config.real --cflags -- pkg-name --define... and causes the real pkg-config implementation to missinterpret the given argument list. This also helps to fix golang/go#27940 Signed-off-by: Arthur Skowronek <arthur.skowronek@tuta.io>
Go for openwrt passes pkg-config arguments in the format of pkg-config --cflags -- pkg-name which in turn will be passed down to the real pkg-config as something like pkg-config.real --cflags -- pkg-name --define... and causes the real pkg-config implementation to missinterpret the given argument list. This also helps to fix golang/go#27940 Signed-off-by: Arthur Skowronek <arthur.skowronek@tuta.io>
Go for openwrt passes pkg-config arguments in the format of pkg-config --cflags -- pkg-name which in turn will be passed down to the real pkg-config as something like pkg-config.real --cflags -- pkg-name --define... and causes the real pkg-config implementation to missinterpret the given argument list. This also helps to fix golang/go#27940 Signed-off-by: Arthur Skowronek <arthur.skowronek@tuta.io> (cherry picked from commit 5f2cb6d)
Go for openwrt passes pkg-config arguments in the format of pkg-config --cflags -- pkg-name which in turn will be passed down to the real pkg-config as something like pkg-config.real --cflags -- pkg-name --define... and causes the real pkg-config implementation to missinterpret the given argument list. This also helps to fix golang/go#27940 Signed-off-by: Arthur Skowronek <arthur.skowronek@tuta.io> (cherry picked from commit da2798a)
What version of Go are you using (
go version
)?1.10
Does this issue reproduce with the latest release?
not tried, but relevant code has not been changed since 1.10
What operating system and processor architecture are you using (
go env
)?linux / amd64
What did you do?
I tried to build a binary using the library https://github.com/digineo/fastd/fastd with the OpenWRT toolchain.
What did you expect to see?
A successful build.
pkg-config --cflags -- libuecc
on the host machine with version0.29.1-0ubuntu2
prints-I/usr/include/libuecc-7
What did you see instead?
pkg-config --cflags -- libuecc
in the OpenWRT build environment with pkg-config0.29.2
fails withPackage -- was not found in the pkg-config search path
Possible solution
Remove the
"--"
argument insrc/cmd/go/internal/work/exec.go
:The text was updated successfully, but these errors were encountered: