octave-maintainers
[Top][All Lists]
Advanced

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

Re: error when compiling Octave in Cygwin


From: Jaroslav Hajek
Subject: Re: error when compiling Octave in Cygwin
Date: Sat, 13 Dec 2008 18:24:45 +0100

On Fri, Dec 12, 2008 at 2:55 PM, Ivan Sutoris <address@hidden> wrote:
> On Fri, Dec 12, 2008 at 2:28 PM, Jaroslav Hajek <address@hidden> wrote:
>> On Fri, Dec 12, 2008 at 2:12 PM, Ivan Sutoris <address@hidden> wrote:
>>> Thanks for the replies. I'm not insisting on using 3.4.4, it's just
>>> the default version in Cygwin :) Following Dmitri's advice, I found
>>> out that Cygwin includes also gcc 4.3.2 (executables have suffix
>>> "-4"), so I tried to run configure script with parameters "CC=gcc-4
>>> CXX=g++-4 F77=gfortran-4", which went well. The same errors, however,
>>> appeared again during compilation. Are there any other configure flags
>>> one should setup?
>>>
>>
>> No. Please verify in Makeconf that your configuration was properly
>> applied (or may have seen that during the compilation from the
>> commands).
>>
>> Can you try compiling (not linking) the attached test program and tell
>> me the result? To be sure, I asked about the issue on comp-lang-c++.
>> But it seems to me that either there's a mistake on your side, or
>> you've discovered a bug in the cygwin port of gcc. In the latter case,
>> your proper way is to file a bug report to cygwin maintainers.
>>
>> regards,
>>
>>
>>
>> --
>> RNDr. Jaroslav Hajek
>> computing expert
>> Aeronautical Research and Test Institute (VZLU)
>> Prague, Czech Republic
>> url: www.highegg.matfyz.cz
>>
>
> I'm attaching Makeconf, but it seems that right executables were
> called. I tried to compile your program with both versions of
> compiler, and there is indeed a difference:
>
> $ g++ -c test.cc
> test.cc: In function `int main()':
> test.cc:10: error: call of overloaded `method(double&, long int&)' is 
> ambiguous
> test.cc:3: note: candidates are: void method(double, T) [with X = A, T
> = long int]
> test.cc:5: note:  void method(double, long int) [with X = A]
>
> $ g++-4 -c test.cc
> [... no errors here]
>
> Regards
> Ivan Sutoris
>

Thanks for this test. This is really weird, because I think that the
test program is exactly the delicate overload problem that occurs in
oct-inttypes.h. However, you Makeconf seems to be OK (contains
CXX=g++-4).

Meanwhile, I think I resolved the conformance question - for technical
details, see the discussion on comp.lang.c++:
<http://groups.google.com/group/comp.lang.c++/browse_frm/thread/398e6ba0047f902a/bcb993f190dbbf65#bcb993f190dbbf65>.
Unless anyone proves my reasoning wrong, the result is that the code
is indeed standard-conforming.
Can you again give the error output from make, this time with gcc 4?
I'm very surprised that it didn't even change - that's suspicious. Can
other people try building on Cygwin? If the problem persists, I think
it's a bug in the cygwin gcc port.

In that case, I'd say file a bug for cygwin, and I will provide you a
special cygwin patch, because in principle, I don't think it's good to
change std-conforming code due to compiler bugs (unless they occur on
majority of platforms).

regards

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

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