bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

error with autoconf 2.69 and gccgo (error: cannot run Go compiled progra


From: Markus Rothe
Subject: error with autoconf 2.69 and gccgo (error: cannot run Go compiled programs.)
Date: Wed, 2 Jan 2013 18:25:49 +0100

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

[Prev in Thread] Current Thread [Next in Thread]