This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: "cannot run C compiled programs" error
- From: Anna Ceguerra <anna dot ceguerra at sydney dot edu dot au>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: Andi Hellmund <mail at andihellmund dot com>, Ian Lance Taylor <iant at google dot com>, kevin diggs <diggskevin38 at gmail dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Tue, 26 Apr 2011 10:52:48 +1000
- Subject: Re: "cannot run C compiled programs" error
Hi,
On 21/04/11 21/04/11 9:17 AM, "Jonathan Wakely" <jwakely.gcc@gmail.com>
wrote:
> On 21 April 2011 00:00, Anna Ceguerra <anna.ceguerra@sydney.edu.au> wrote:
>> Hi all,
>>
>> Thanks for all of your replies.
>>
>> 1) --enable-languages
>> I put in everything except ada (because I didn't have a dependency) and go
>> (because it was causing errors).
>>
>> The build didn't go smoothly either - I had to remove config.cache (all of
>> them) in the middle when there was an error regarding config.cache.
>
> If you're going to reconfigure with different options it is sometimes
> necessary to remove the entire build directory and start again running
> configure in an empty directory. Doing that will never cause a
> problem, and avoids some potential problems.
Thanks for your reply, it successfully built in one go, and I successfully
installed it. However when I try to compile using the new compiler, I get
the following error:
/usr/local/lib/gcc/i386-apple-darwin10.7.0/4.6.1/../../../../include/c++/4.6
.1/tr1/special_function_util.h: In function âÃÃbool
std::tr1::__detail::__isnan(_Tp)âÃÃ:
/usr/local/lib/gcc/i386-apple-darwin10.7.0/4.6.1/../../../../include/c++/4.6
.1/tr1/special_function_util.h:113:19: error: expected unqualified-id before
âÃÃ(âÃà token
This is the relevant section in the file:
#if _GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
/// This is a wrapper for the isnan function. Otherwise, for NaN,
/// all comparisons result in false. If/when we build a std::isnan
/// out of intrinsics, this will disappear completely in favor of
/// std::isnan.
template<typename _Tp>
inline bool __isnan(const _Tp __x)
{
return std::isnan(__x); // it is failing here
}
#else
template<typename _Tp>
inline bool __isnan(const _Tp __x)
{
return __builtin_isnan(__x);
}
template<>
inline bool __isnan<float>(const float __x)
{
return __builtin_isnanf(__x);
}
template<>
inline bool __isnan<long double>(const long double __x)
{
return __builtin_isnanl(__x);
}
#endif
Am I configuring the program incorrectly?
Thanks,
Anna.