Menu

#111 libstdc++ is not working for Win64 Native

closed-fixed
nobody
None
5
2015-02-16
2009-07-22
No

Building gcc 4.5.0 trunk in Linux 64, using sound Linux 64 cross-compiler. Reported, GCC Bug 40802. In the end it is up to us.

This first occurred in my builds for revision 149619, with last known good 149455. (I can't say the latter with 100% certainty.)

make[3]: Entering directory
`/home/peter/mount/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3'
Making all in include
make[4]: Entering directory
`/home/peter/mount/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include'
mkdir -p ./x86_64-w64-mingw32/bits/stdc++.h.gch
x86_64-w64-mingw32-c++
-L/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/winsup/mingw
-L/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/winsup/w32api/lib
-isystem /home/peter/build/GCC/gcc-trunk/winsup/mingw/include -isystem
/home/peter/build/GCC/gcc-trunk/winsup/w32api/include -x c++-header -g -O2
-I/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32
-I/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include
-I/home/peter/build/GCC/gcc-trunk/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x
/home/peter/build/GCC/gcc-trunk/libstdc++-v3/include/precompiled/stdc++.h \
-o x86_64-w64-mingw32/bits/stdc++.h.gch/O2ggnu++0x.gch
In file included from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/bits/move.h:38:0,
from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/bits/stl_pair.h:60,
from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/bits/stl_algobase.h:66,
from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/bits/char_traits.h:41,
from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/ios:41,
from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/istream:40,
from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/sstream:39,
from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/complex:47,
from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/ccomplex:42,
from
/home/peter/build/GCC/gcc-trunk/libstdc++-v3/include/precompiled/stdc++.h:51:
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/type_traits:185:62:
error: a function call cannot appear in a constant-expression
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/type_traits:185:63:
error: template argument 2 is invalid
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/type_traits:215:54:
error: a function call cannot appear in a constant-expression
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/type_traits:215:55:
error: template argument 2 is invalid
In file included from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/fenv.h:50:0,
from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/cfenv:44,
from
/home/peter/build/GCC/gcc-trunk/libstdc++-v3/include/precompiled/stdc++.h:52:
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:49:11:
error: ‘::fenv_t’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:50:11:
error: ‘::fexcept_t’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:53:11:
error: ‘::feclearexcept’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:54:11:
error: ‘::fegetexceptflag’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:55:11:
error: ‘::feraiseexcept’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:56:11:
error: ‘::fesetexceptflag’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:57:11:
error: ‘::fetestexcept’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:59:11:
error: ‘::fegetround’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:60:11:
error: ‘::fesetround’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:62:11:
error: ‘::fegetenv’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:63:11:
error: ‘::feholdexcept’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:64:11:
error: ‘::fesetenv’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:65:11:
error: ‘::feupdateenv’ has not been declared
In file included from
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/cfenv:54:0,
from
/home/peter/build/GCC/gcc-trunk/libstdc++-v3/include/precompiled/stdc++.h:52:
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:49:11:
error: ‘::fenv_t’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:50:11:
error: ‘::fexcept_t’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:53:11:
error: ‘::feclearexcept’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:54:11:
error: ‘::fegetexceptflag’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:55:11:
error: ‘::feraiseexcept’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:56:11:
error: ‘::fesetexceptflag’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:57:11:
error: ‘::fetestexcept’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:59:11:
error: ‘::fegetround’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:60:11:
error: ‘::fesetround’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:62:11:
error: ‘::fegetenv’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:63:11:
error: ‘::feholdexcept’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:64:11:
error: ‘::fesetenv’ has not been declared
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/tr1_impl/cfenv:65:11:
error: ‘::feupdateenv’ has not been declared
In file included from
/home/peter/build/GCC/gcc-trunk/libstdc++-v3/include/precompiled/stdc++.h:98:0:
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:
In static member function ‘static _ToDuration
std::chrono::__duration_cast_impl<_ToDuration, _CF, _CR, true>::__cast(const
std::chrono::duration<_Rep, _Period>&) [with _Rep = long long int, _Period =
std::ratio<1ll, 1000000ll>, _ToDuration = std::chrono::duration<long long int>,
_CF = std::ratio<1ll, 1000000ll>, _CR = long long int&&]’:
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:152:54:
instantiated from ‘_ToDuration std::chrono::duration_cast(const
std::chrono::duration<_Rep, _Period>&) [with _ToDuration =
std::chrono::duration<long long int>, _Rep = long long int, _Period =
std::ratio<1ll, 1000000ll>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:646:64:
instantiated from here
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:126:74:
error: invalid static_cast from type ‘const intmax_t’ to type ‘long long int&&’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:
In static member function ‘static _ToDuration
std::chrono::__duration_cast_impl<_ToDuration, _CF, _CR, false,
true>::__cast(const std::chrono::duration<_Rep, _Period>&) [with _Rep = long
long int, _Period = std::ratio<1ll>, _ToDuration = std::chrono::duration<long
long int, std::ratio<1ll, 1000000ll> >, _CF = std::ratio<1000000ll>, _CR = long
long int&&]’:
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:152:54:
instantiated from ‘_ToDuration std::chrono::duration_cast(const
std::chrono::duration<_Rep, _Period>&) [with _ToDuration =
std::chrono::duration<long long int, std::ratio<1ll, 1000000ll> >, _Rep = long
long int, _Period = std::ratio<1ll>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:547:61:
instantiated from ‘std::chrono::time_point<_Clock, _ToDuration>
std::chrono::time_point_cast(const std::chrono::time_point<_Clock, _Duration>&)
[with _ToDuration = std::chrono::duration<long long int, std::ratio<1ll,
1000000ll> >, _Clock = std::chrono::system_clock, _Duration =
std::chrono::duration<long long int>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:654:34:
instantiated from here
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:137:74:
error: invalid static_cast from type ‘const intmax_t’ to type ‘long long int&&’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:
In constructor ‘std::chrono::duration<_Rep, _Period>::duration(const _Rep2&)
[with _Rep2 = long long int, _Rep = long long int&&, _Period =
std::ratio<1ll>]’:
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:115:66:
instantiated from ‘static _ToDuration
std::chrono::__duration_cast_impl<_ToDuration, _CF, _CR, true,
true>::__cast(const std::chrono::duration<_Rep, _Period>&) [with _Rep = long
long int, _Period = std::ratio<1ll>, _ToDuration = std::chrono::duration<long
long int&&>, _CF = std::ratio<1ll>, _CR = long long int&&]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:152:54:
instantiated from ‘_ToDuration std::chrono::duration_cast(const
std::chrono::duration<_Rep, _Period>&) [with _ToDuration =
std::chrono::duration<long long int&&>, _Rep = long long int, _Period =
std::ratio<1ll>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:225:53:
instantiated from ‘std::chrono::duration<_Rep, _Period>::duration(const
std::chrono::duration<_Rep, _Period>&) [with _Rep2 = long long int, _Period2 =
std::ratio<1ll>, _Rep = long long int&&, _Period = std::ratio<1ll>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:346:31:
instantiated from ‘typename std::common_type<std::chrono::duration<_Rep1,
_Period1>, std::chrono::duration<_Rep2, _Period2> >::type
std::chrono::operator+(const std::chrono::duration<_Rep1, _Period1>&, const
std::chrono::duration<_Rep2, _Period2>&) [with _Rep1 = long long int, _Period1
= std::ratio<1ll>, _Rep2 = long long int, _Period2 = std::ratio<1ll>, typename
std::common_type<std::chrono::duration<_Rep1, _Period1>,
std::chrono::duration<_Rep2, _Period2> >::type = std::chrono::duration<long
long int&&>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:498:32:
instantiated from ‘std::chrono::time_point<_Clock,
_Duration>::time_point(const duration&) [with _Clock =
std::chrono::system_clock, _Duration = std::chrono::duration<long long int>,
duration = std::chrono::duration<long long int>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:654:33:
instantiated from here
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:215:40:
error: invalid static_cast from type ‘const long long int’ to type ‘long long
int&&’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:
In constructor ‘std::chrono::duration<_Rep, _Period>::duration(const _Rep2&)
[with _Rep2 = long long int, _Rep = long long int&&, _Period = std::ratio<1ll,
1000000ll>]’:
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:115:66:
instantiated from ‘static _ToDuration
std::chrono::__duration_cast_impl<_ToDuration, _CF, _CR, true,
true>::__cast(const std::chrono::duration<_Rep, _Period>&) [with _Rep = long
long int, _Period = std::ratio<1ll, 1000000ll>, _ToDuration =
std::chrono::duration<long long int&&, std::ratio<1ll, 1000000ll> >, _CF =
std::ratio<1ll>, _CR = long long int&&]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:152:54:
instantiated from ‘_ToDuration std::chrono::duration_cast(const
std::chrono::duration<_Rep, _Period>&) [with _ToDuration =
std::chrono::duration<long long int&&, std::ratio<1ll, 1000000ll> >, _Rep =
long long int, _Period = std::ratio<1ll, 1000000ll>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:225:53:
instantiated from ‘std::chrono::duration<_Rep, _Period>::duration(const
std::chrono::duration<_Rep, _Period>&) [with _Rep2 = long long int, _Period2 =
std::ratio<1ll, 1000000ll>, _Rep = long long int&&, _Period = std::ratio<1ll,
1000000ll>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:346:31:
instantiated from ‘typename std::common_type<std::chrono::duration<_Rep1,
_Period1>, std::chrono::duration<_Rep2, _Period2> >::type
std::chrono::operator+(const std::chrono::duration<_Rep1, _Period1>&, const
std::chrono::duration<_Rep2, _Period2>&) [with _Rep1 = long long int, _Period1
= std::ratio<1ll, 1000000ll>, _Rep2 = long long int, _Period2 = std::ratio<1ll,
1000000ll>, typename std::common_type<std::chrono::duration<_Rep1, _Period1>,
std::chrono::duration<_Rep2, _Period2> >::type = std::chrono::duration<long
long int&&, std::ratio<1ll, 1000000ll> >]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:498:32:
instantiated from ‘std::chrono::time_point<_Clock,
_Duration>::time_point(const duration&) [with _Clock =
std::chrono::system_clock, _Duration = std::chrono::duration<long long int,
std::ratio<1ll, 1000000ll> >, duration = std::chrono::duration<long long int,
std::ratio<1ll, 1000000ll> >]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:547:61:
instantiated from ‘std::chrono::time_point<_Clock, _ToDuration>
std::chrono::time_point_cast(const std::chrono::time_point<_Clock, _Duration>&)
[with _ToDuration = std::chrono::duration<long long int, std::ratio<1ll,
1000000ll> >, _Clock = std::chrono::system_clock, _Duration =
std::chrono::duration<long long int>]’
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:654:34:
instantiated from here
/home/peter/build/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include/chrono:215:40:
error: invalid static_cast from type ‘const long long int’ to type ‘long long
int&&’
make[4]: *** [x86_64-w64-mingw32/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1
make[4]: Leaving directory
`/home/peter/mount/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3/include'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home/peter/mount/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/peter/mount/GCC/gcc-trunk/build-win-149872-20090721/x86_64-w64-mingw32/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory
`/home/peter/mount/GCC/gcc-trunk/build-win-149872-20090721'
make: *** [all] Error 2

Discussion

  • drangonzhou

    drangonzhou - 2009-07-22

    adding flag "--disable-libstdcxx-pch" when configure gcc can bypass this.

    and there are another bug make native c++ program crashed, see the following :
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39832

     
  • Nobody/Anonymous

    I think the issue is a little bit more complex.
    For building the native compiler you usually use the same compiler as cross-compiler configuration. So, you have to build a native gcc-4.5.0 linux64 compiler, then a linux64 cross compiler and last the native w64 compiler using the just build cross compiler.
    That should work.

    I build from i686-pc-mingw32 using binutils-cvs from 21th of July, gcc-trunk revision 149846 and mingw-w64-runtime-trunk revision 1036 at the moment. And there is no such libstdc++ issue. And I built every few days in the described way.

    There are still issues with the driver, but that's an other story. You know, you have to build using CFLAGS"-g -O0".

     
  • Kai Tietz

    Kai Tietz - 2009-09-09

    Well, I can agree that this issue works as described below. So I close the bug.

    PS: The driver issue is solved (for trunk and for 4.4.x (x will be >=2).

     
  • Kai Tietz

    Kai Tietz - 2009-09-09
    • status: open --> closed-fixed
     

Log in to post a comment.