I am trying to use autotools to compile go sources. Adding AC_PROG_GO to
configure.ac I am running into the followring error when running
./configure:

    checking whether we are cross compiling... configure: error: in 
`/home/markus/work/autotools-gotest':
    configure: error: cannot run Go compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details

config.log is attached.

The offending line is:

    f, err := os.Open("conftest.out", os.O_CREATE|os.O_WRONLY, 0777)

The solution is to replace os.Open with os.OpenFile. See [1] for golang 
reference.

This might be fixed in SVN, but I am unable to locate where the source of this 
line is.

[1] http://golang.org/pkg/os/#OpenFile

Reply via email to