With 10.9, compiling C packages in Go seems broken. When trying to build a package that ran on 10.8, clan outputs
clang: error: argument unused during compilation: '-fno-eliminate-unused-debug-types'
When I try to fix this up adding the following
#cgo CFLAGS: -Qunused-arguments
Go responds with
could not determine kind of name for C.<ctype>
for the imported types. Any hints how to solve this?
This is a known cgo bug ( probably http://code.google.com/p/go/issues/detail?id=6515 )
You can download a 1.2 release candidate from https://code.google.com/p/go/downloads/list - as of 1.2rc2 this bug is claimed to be fixed.
Per comment 7 from the above bug report (if you don't want to use a release candidate):
You can eliminate the option by editing the file src/cmd/cgo/gcc.go and removing the option from the list of options--just search for it.