-
Notifications
You must be signed in to change notification settings - Fork 181
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
go build gopkg.in/gographics/imagick.v3/imagick: invalid flag in pkg-config --cflags: -fopenmp #155
Comments
Does it work when doing a normal build or install of your program? I have seen |
it works well when I build or run a program without importing imagick |
Thanks for answering that. I was getting at whether it would work when using It was reported already to be added to the whitelist: The workaround for now is to manually whitelist them by setting |
|
sh$ go run -tags no_pkgconfig main.go
|
This is the workaround, from what the ticket says:
The failing flag is a compile flag, so you need to manually whitelist it.
You can't do this without telling it explicit CGO_CFLAGS and CGO_LDFLAGS. That turns off pkg-config which means its now not finding ImageMagick |
Closing this since the problem relates to the cgo whitelist in the latest Go release. |
CentOS7
sh$ uname -a
Imagick.v3
sh$ pkg-config --cflags --libs MagickWand
sh$ go run somethingWithImagick.go
sh$ go build somethingWithImagick.go
imagick.v2
sh$ pkg-config --cflags --libs MagickWand
sh$ go build main.go
The text was updated successfully, but these errors were encountered: