bug-autoconf
[Top][All Lists]
Advanced

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

Re: [GNU Autoconf 2.69.59-adc84] testsuite: 132 355 failed


From: Stefano Lattarini
Subject: Re: [GNU Autoconf 2.69.59-adc84] testsuite: 132 355 failed
Date: Tue, 01 Jan 2013 14:40:59 +0100

Hi Eric.

On 01/01/2013 12:17 AM, Eric Blake wrote:
> On 12/29/2012 04:10 AM, Stefano Lattarini wrote:
>> ## -------------------------------------- ##
>> ## GNU Autoconf 2.69.59-adc84 test suite. ##
>> ## -------------------------------------- ##
> 
> Thanks for the report.
> 
>>
>>  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
>>       KEYWORDS
>>
>>  132: autotest.at:300    Tested programs
>>       autotest
> 
> I've reproduced this locally,
>
Glad to be able to leave this issue in your hands ;-)

> and hope to have it fixed soon [SNIP]
>
Thanks.

>>  355: go.at:30           Go
> 
> Hmm, I wasn't able to reproduce this one yet; probably indicates I need
> to install go on my devel machine, but even then, I have no idea what to
> do there.
> 
I have the "gccgo" and "golang" packages installed on my Debian box that
I've used for testing, if that can be of help to you.  Not sure how the
corresponding packages for RedHat/Fedora are called.

>> #                             -*- compilation -*-
>> 355. go.at:30: testing Go ...
>> ./go.at:30: autoconf --force -W obsolete
>> ./go.at:30: /bin/sh -n configure
>> stderr:
>> ./go.at:30: autoheader
>> ./go.at:30: ./configure $configure_options -C
>> --- /dev/null        2012-12-29 08:28:46.151945383 +0100
>> +++ /home/stefano/src/ac/autoconf/tests/testsuite.dir/at-groups/355/stderr   
>> 2012-12-29 11:20:36.000000000 +0100
>> @@ -0,0 +1,4 @@
>> +configure: error: in 
>> `/home/stefano/src/ac/autoconf/tests/testsuite.dir/355':
>> +configure: error: cannot run Go compiled programs.
>> +If you meant to cross compile, use `--host'.
>> +See `config.log' for more details
> 
> Is this indicative of a problem with your environment, rather than the
> autoconf testsuite?
>
I don't think so; I've been seeing this particular failure for some
time now, and it's likely that it would have been already fixed by
Debian if it was a bug of their package.  Further investigation seems
to confirm this (see below).

>>> configure:2051: gccgo -o conftest   conftest.go  >&5
>>> configure:2055: $? = 0
>>> configure:2077: result:
>>> configure:2103: checking whether we are cross compiling
>>> configure:2111: gccgo -o conftest   conftest.go  >&5
>>> conftest.go:4:14: error: too many arguments
> 
> Or, maybe it is indicative of missing shell quoting in the macros for Go
> compilation.  Is this something you can research a bit more?
> 
I can reproduce the same error with Autoconf 2.69 and the following
minimal configure.ac:

  AC_INIT([test-go], [1.0])
  AC_PROG_GO
  AC_OUTPUT

It's not a quoting issue in ./configure, but an error in the Go
program that ./configure tries to compile:

  package main
  import ( "fmt"; "os" )
  func main() {
  f, err := os.Open("conftest.out", os.O_CREATE|os.O_WRONLY, 0777)
    if err != nil {
        fmt.Println(err)
        os.Exit(1)
    }
    if err = f.Close(); err != nil {
        fmt.Println(err)
        os.Exit(1)
    }
    os.Exit(0)
  }

According to <http://golang.org/pkg/os/#Open>, the above snippet
is using 'os.Open' with the wrong number of arguments.  I believe
the best fix would be using the 'os.OpenFile' function instead:
<http://golang.org/pkg/os/#OpenFile>

I might attempt a patch today or tomorrow; if anyone wants to
beat me, please be my guest :-)

HTH,
  Stefano



reply via email to

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