You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go build -v -o gallerygen.go
github.com/zidizei/iptc
# github.com/zidizei/iptc
ld: warning: ignoring file /usr/local/lib/libiptcdata.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
"_iptc_data_new_from_jpeg", referenced from:
__cgo_61b308e4f4aa_Cfunc_iptc_data_new_from_jpeg in _x002.o
(maybe you meant: __cgo_61b308e4f4aa_Cfunc_iptc_data_new_from_jpeg)
"_iptc_data_unref", referenced from:
__cgo_61b308e4f4aa_Cfunc_iptc_data_unref in _x002.o
(maybe you meant: __cgo_61b308e4f4aa_Cfunc_iptc_data_unref)
"_iptc_dataset_get_as_str", referenced from:
__cgo_61b308e4f4aa_Cfunc_iptc_dataset_get_as_str in _x002.o
(maybe you meant: __cgo_61b308e4f4aa_Cfunc_iptc_dataset_get_as_str)
"_iptc_dataset_get_data", referenced from:
__cgo_61b308e4f4aa_Cfunc_iptc_dataset_get_data in _x002.o
(maybe you meant: __cgo_61b308e4f4aa_Cfunc_iptc_dataset_get_data)
"_iptc_dataset_get_format", referenced from:
__cgo_61b308e4f4aa_Cfunc_iptc_dataset_get_format in _x002.o
(maybe you meant: __cgo_61b308e4f4aa_Cfunc_iptc_dataset_get_format)
"_iptc_dataset_get_value", referenced from:
__cgo_61b308e4f4aa_Cfunc_iptc_dataset_get_value in _x002.o
(maybe you meant: __cgo_61b308e4f4aa_Cfunc_iptc_dataset_get_value)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What did you expect to see?
GOGCCFLAGS using arm64 architecture and then an arm64 compiled executable created.
What did you see instead?
An error message indicating an architecture mismatch between an arm64 library and the current target architecture.
The text was updated successfully, but these errors were encountered:
I am realizing that it's saying amd64 for architecture not arm64 which I think is what it should say on Apple Silicon, so I think I need to investigate that...
Okay, so I just tried the arm64 link again and this time it actually downloaded the arm64 installer and I confirmed with go version that I have the arm version:
$ go version
go version go1.16.5 darwin/arm64
Now, my code compiles as expected and using the arm64 architecture. I’m not sure why github kept sending me the arm64 installer and what made it finally change its mind, but I have everything working now. To anyone else having this issue: remember arm64 looks a lot like amd64 and make sure you’ve actually downloaded the arm64 installer even if you clicked the amd64 link.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
GOGCCFLAGS
usingarm64
architecture and then an arm64 compiled executable created.What did you see instead?
An error message indicating an architecture mismatch between an arm64 library and the current target architecture.
The text was updated successfully, but these errors were encountered: