You are not logged in.

#1 2013-02-17 19:42:01

anden.d
Member
From: Sweden
Registered: 2012-12-15
Posts: 7

gcc 4.7.2 fails to find/(or something else with) default library

Hi!

I use the gcc compiler (version 4.7.2) but when I try to compile using the following:

g++ test.cpp 

I have verified that the code itself is perfectly valid because the following error does not occur when compiling on another machine (with the same file)

In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++config.h:414:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:39,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/os_defines.h:45:19: error: missing binary operator before token "("
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/postypes.h:42:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iosfwd:42,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:39,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:66:11: error: '::mbstate_t' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:141:11: error: '::wint_t' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:143:11: error: '::btowc' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:144:11: error: '::fgetwc' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:145:11: error: '::fgetws' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:146:11: error: '::fputwc' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:147:11: error: '::fputws' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:148:11: error: '::fwide' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:149:11: error: '::fwprintf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:150:11: error: '::fwscanf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:151:11: error: '::getwc' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:152:11: error: '::getwchar' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:153:11: error: '::mbrlen' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:154:11: error: '::mbrtowc' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:155:11: error: '::mbsinit' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:156:11: error: '::mbsrtowcs' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:157:11: error: '::putwc' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:158:11: error: '::putwchar' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:160:11: error: '::swprintf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:162:11: error: '::swscanf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:163:11: error: '::ungetwc' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:164:11: error: '::vfwprintf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:166:11: error: '::vfwscanf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:169:11: error: '::vswprintf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:172:11: error: '::vswscanf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:174:11: error: '::vwprintf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:176:11: error: '::vwscanf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:178:11: error: '::wcrtomb' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:179:11: error: '::wcscat' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:180:11: error: '::wcscmp' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:181:11: error: '::wcscoll' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:182:11: error: '::wcscpy' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:183:11: error: '::wcscspn' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:184:11: error: '::wcsftime' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:185:11: error: '::wcslen' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:186:11: error: '::wcsncat' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:187:11: error: '::wcsncmp' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:188:11: error: '::wcsncpy' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:189:11: error: '::wcsrtombs' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:190:11: error: '::wcsspn' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:191:11: error: '::wcstod' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:193:11: error: '::wcstof' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:195:11: error: '::wcstok' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:196:11: error: '::wcstol' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:197:11: error: '::wcstoul' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:198:11: error: '::wcsxfrm' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:199:11: error: '::wctob' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:200:11: error: '::wmemcmp' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:201:11: error: '::wmemcpy' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:202:11: error: '::wmemmove' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:203:11: error: '::wmemset' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:204:11: error: '::wprintf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:205:11: error: '::wscanf' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:206:11: error: '::wcschr' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:207:11: error: '::wcspbrk' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:208:11: error: '::wcsrchr' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:209:11: error: '::wcsstr' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:210:11: error: '::wmemchr' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar: In function 'wchar_t* std::wcschr(wchar_t*, wchar_t)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:215:55: error: invalid conversion from 'const wchar_t*' to 'wchar_t*' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:214:3: error:   initializing argument 1 of 'wchar_t* std::wcschr(wchar_t*, wchar_t)' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar: In function 'wchar_t* std::wcspbrk(wchar_t*, const wchar_t*)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:219:58: error: invalid conversion from 'const wchar_t*' to 'wchar_t*' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:218:3: error:   initializing argument 1 of 'wchar_t* std::wcspbrk(wchar_t*, const wchar_t*)' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar: In function 'wchar_t* std::wcsrchr(wchar_t*, wchar_t)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:223:56: error: invalid conversion from 'const wchar_t*' to 'wchar_t*' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:222:3: error:   initializing argument 1 of 'wchar_t* std::wcsrchr(wchar_t*, wchar_t)' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar: In function 'wchar_t* std::wcsstr(wchar_t*, const wchar_t*)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:227:57: error: invalid conversion from 'const wchar_t*' to 'wchar_t*' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:226:3: error:   initializing argument
 1 of 'wchar_t* std::wcsstr(wchar_t*, const wchar_t*)' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar: In function 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:231:61: error: invalid conversion from 'const wchar_t*' to 'wchar_t*' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:230:3: error:   initializing argument 1 of 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)' [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:250:11: error: '::wcstold' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:259:11: error: '::wcstoll' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:260:11: error: '::wcstoull' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:266:22: error: '__gnu_cxx::wcstold' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:267:22: error: '__gnu_cxx::wcstoll' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:268:22: error: '__gnu_cxx::wcstoull' has not been declared
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iosfwd:42:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:39,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/postypes.h:230:16: error: 'mbstate_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/postypes.h:230:25: error: template argument 1 is invalid
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/postypes.h:230:36: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/postypes.h:232:16: error: 'mbstate_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/postypes.h:232:25: error: template argument 1 is invalid
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/postypes.h:232:37: error: invalid type in declaration before ';' token
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:41:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:65:15: error: 'mbstate_t' in namespace 'std' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:241:15: error: 'mbstate_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:309:15: error: 'wint_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:312:15: error: 'mbstate_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:351:26: error: 'int_type' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:354:33: error: 'int_type' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:359:25: error: 'int_type' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:359:47: error: 'int_type' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:362:33: error: 'int_type' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:366:33: error: 'int_type' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h: In static member function 'static int std::char_traits<wchar_t>::compare(const char_type*, const char_type*, std::size_t)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:328:39: error: 'wmemcmp' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h: In static member function 'static std::size_t std::char_traits<wchar_t>::length(const char_type*)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:332:26: error: 'wcslen' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h: In static member function 'static const char_type* std::char_traits<wchar_t>::find(const char_type*, std::size_t, const char_type&)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:336:37: error: invalid conversion from 'const char_type* {aka const wchar_t*}' to 'wchar_t*' [-fpermissive]
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/postypes.h:42:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iosfwd:42,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:39,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cwchar:230:3: error:   initializing argument 1 of 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)' [-fpermissive]
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:41:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::move(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:340:40: error: 'wmemmove' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::copy(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:344:39: error: 'wmemcpy' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::assign(std::char_traits<wchar_t>::char_type*, std::size_t, std::char_traits<wchar_t>::char_type)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/char_traits.h:348:37: error: 'wmemset' was not declared in this scope
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++locale.h:42:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/localefwd.h:42,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:42,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/clocale: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/clocale:55:11: error: '::lconv' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/clocale:56:11: error: '::setlocale' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/clocale:57:11: error: '::localeconv' has not been declared
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/localefwd.h:42:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:42,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++locale.h:63:11: error: '__locale_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++locale.h:70:26: error: '__c_locale' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++locale.h: In function 'int std::__convert_from_v(const int&, char*, int, const char*, ...)':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++locale.h:78:19: error: 'setlocale' is not a member of 'std'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++locale.h:78:
34: error: 'LC_NUMERIC' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++locale.h:85:2: error: 'setlocale' is not a member of 'std'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++locale.h:105:2: error: 'setlocale' is not a member of 'std'
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/localefwd.h:44:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:42,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:66:11: error: '::isalnum' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:67:11: error: '::isalpha' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:68:11: error: '::iscntrl' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:69:11: error: '::isdigit' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:70:11: error: '::isgraph' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:71:11: error: '::islower' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:72:11: error: '::isprint' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:73:11: error: '::ispunct' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:74:11: error: '::isspace' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:75:11: error: '::isupper' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:76:11: error: '::isxdigit' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:77:11: error: '::tolower' has not been declared
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/cctype:78:11: error: '::toupper' has not been declared
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:42:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/localefwd.h:135:40: error: 'mbstate_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/localefwd.h:135:49: error: template argument 3 is invalid
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/localefwd.h:137:43: error: 'mbstate_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/localefwd.h:137:52: error: template argument 3 is invalid
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr.h:150:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ext/atomicity.h:34,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/ios_base.h:41,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:43,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:53:9: error: 'pthread_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:54:9: error: 'pthread_key_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:55:9: error: 'pthread_once_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:56:9: error: 'pthread_mutex_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:57:9: error: 'pthread_mutex_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:58:9: error: 'pthread_cond_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:140:1: error: 'pthread_once' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:140:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:141:1: error: 'pthread_getspecific' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:141:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:142:1: error: 'pthread_setspecific' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:142:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:144:1: error: 'pthread_create' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:144:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:145:1: error: 'pthread_join' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:145:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:146:1: error: 'pthread_equal' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:146:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:147:1: error: 'pthread_self' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:147:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:148:1: error: 'pthread_detach' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:148:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:150:1: error: 'pthread_cancel' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:150:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:152:1: error: 'sched_yield' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:152:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:154:1: error: 'pthread_mutex_lock' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:154:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:155:1: error: 'pthread_mutex_trylock' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:155:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:157:1: error: 'pthread_mutex_timedlock' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:157:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:159:1: error: 'pthread_mutex_unlock' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:159:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:160:1: error: 'pthread_mutex_init' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:160:1:
 error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:161:1: error: 'pthread_mutex_destroy' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:161:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:163:1: error: 'pthread_cond_init' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:163:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:164:1: error: 'pthread_cond_broadcast' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:164:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:165:1: error: 'pthread_cond_signal' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:165:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:166:1: error: 'pthread_cond_wait' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:166:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:167:1: error: 'pthread_cond_timedwait' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:167:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:168:1: error: 'pthread_cond_destroy' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:168:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:171:1: error: 'pthread_key_create' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:171:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:172:1: error: 'pthread_key_delete' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:172:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:173:1: error: 'pthread_mutexattr_init' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:173:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:174:1: error: 'pthread_mutexattr_settype' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:174:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:175:1: error: 'pthread_mutexattr_destroy' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:175:1: error: invalid type in declaration before ';' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:678:19: error: '__gthread_create' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:678:19: error: '__gthread_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:678:32: error: '__threadid' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:678:44: error: expected primary-expression before 'void'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:679:5: error: expected primary-expression before 'void'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:679:17: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:680:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:685:17: error: '__gthread_join' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:685:17: error: '__gthread_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:685:41: error: expected primary-expression before 'void'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:685:59: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:686:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:691:19: error: '__gthread_detach' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:691:19: error: '__gthread_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:692:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:697:18: error: '__gthread_equal' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:697:18: error: '__gthread_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:697:36: error: '__gthread_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:697:52: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:698:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:702:15: error: '__gthread_t' does not name a type
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h: In function 'int __gthread_yield()':
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:711:33: error: '__gthrw_sched_yield' cannot be used as a function
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h: At global scope:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:715:17: error: '__gthread_once' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:715:17: error: '__gthread_once_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:715:35: error: '__once' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:715:50: error: '__func' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:715:59: error: expected primary-expression before 'void'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:715:64: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:716:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:724:23: error: '__gthread_key_create' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:724:23: error: '__gthread_key_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:724:40: error: '__key' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:724:54: error: '__dtor' was not declared in this
 scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:724:63: error: expected primary-expression before 'void'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:724:70: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:725:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:730:23: error: '__gthread_key_delete' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:730:23: error: '__gthread_key_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:731:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:736:24: error: '__gthread_getspecific' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:736:24: error: '__gthread_key_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:737:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:742:24: error: '__gthread_setspecific' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:742:24: error: '__gthread_key_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:742:47: error: expected primary-expression before 'const'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:742:64: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:743:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:757:26: error: '__gthread_mutex_destroy' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:757:26: error: '__gthread_mutex_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:757:45: error: '__mutex' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:758:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:766:23: error: '__gthread_mutex_lock' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:766:23: error: '__gthread_mutex_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:766:42: error: '__mutex' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:767:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:775:26: error: '__gthread_mutex_trylock' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:775:26: error: '__gthread_mutex_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:775:45: error: '__mutex' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:776:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:785:28: error: '__gthread_mutex_timedlock' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:785:28: error: '__gthread_mutex_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:785:47: error: '__mutex' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:786:7: error: expected primary-expression before 'const'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:786:44: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:787:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:796:25: error: '__gthread_mutex_unlock' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:796:25: error: '__gthread_mutex_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:796:44: error: '__mutex' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:797:1: error: expected ',' or ';' before '{' token
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:807:42: error: '__gthread_recursive_mutex_init_function' declared as an 'inline' variable
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:807:42: error: '__gthread_recursive_mutex_t' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:807:71: error: '__mutex' was not declared in this scope
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr-default.h:808:1: error: expected ',' or ';' before '{' token
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ext/atomicity.h:34:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/ios_base.h:41,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ios:43,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/ostream:40,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/iostream:40,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/gthr.h:153:27: error: expected declaration before end of line

This is an example from a test file that basicly includes the <iostream>
I have been looking around a bit but I'm not entirely sure of what I'm looking for except I suspect gcc can't find a file or something related to that.

Also I was quite unsure however this is a newbie post or programming post...so I made a guess.

Thanks on forehand

//anden.d


Aliquando et insanire iucundum est

Offline

#2 2013-02-17 19:48:44

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,145
Website

Re: gcc 4.7.2 fails to find/(or something else with) default library

Just stabbing in the dark here, and perhaps you've already done so.... https://wiki.archlinux.org/index.php/Ar … Repository
Did you install gcc-multilib and multilib-devel ?


github       bible       screenshot

Offline

#3 2013-02-17 20:30:54

anden.d
Member
From: Sweden
Registered: 2012-12-15
Posts: 7

Re: gcc 4.7.2 fails to find/(or something else with) default library

Checked it out followed instructions on page it did however not work pacman now reports failure while downloading multilib.db  -just about to look it up on google


Aliquando et insanire iucundum est

Offline

#4 2013-02-17 20:37:42

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,145
Website

Re: gcc 4.7.2 fails to find/(or something else with) default library

Can you post the error log?  Also, is multilib enabled in pacman.conf and then pacman -Syy then try to install the multilib packages and you should be good to go.


github       bible       screenshot

Offline

#5 2013-02-17 20:47:32

anden.d
Member
From: Sweden
Registered: 2012-12-15
Posts: 7

Re: gcc 4.7.2 fails to find/(or something else with) default library

warning: database file for 'multilib' does not exist
:: Synchronizing package databases...
error: failed retrieving file 'multilib.db' from ftp.ds.hj.se : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from mirror.us.leaseweb.net : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from mirror.de.leaseweb.net : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from mirror.nl.leaseweb.net : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from archlinux.polymorf.fr : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from archlinux.limun.org : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from hive.ist.unomaha.edu : Failed to connect to 2620:d5:0:22bb::dead:beef: Network is unreachable
error: failed retrieving file 'multilib.db' from mirrors.cicku.me : Could not resolve host: (nil); Name or service not known
error: failed retrieving file 'multilib.db' from mirror.rit.edu : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from mirror.chmuri.net : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from mirrors.kernel.org : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from cake.lib.fit.edu : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from ftp.tuxdroid.org : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from mirror.bytemark.co.uk : The requested URL returned error: 404 Not Found
error: failed retrieving file 'multilib.db' from miroir.ezvan.fr : The requested URL returned error: 404 Not Found

And so on....

also decided to add /etc/pacman.conf

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
HoldPkg     = pacman glibc
# If upgrades are available for these packages they will be asked for first
SyncFirst   = pacman
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#UseDelta
#TotalDownload
CheckSpace
#VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
#SigLevel = Optional TrustedOnly

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#SigLevel = PackageRequired
#Include = /etc/pacman.d/mirrorlist

[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist


[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#SigLevel = PackageRequired
#Include = /etc/pacman.d/mirrorlist

[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist




# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

So multilib is there and I tried pacman -Syy


Aliquando et insanire iucundum est

Offline

#6 2013-02-17 21:10:29

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,145
Website

Re: gcc 4.7.2 fails to find/(or something else with) default library

maybe it is a mirror selection, can you post /etc/pacman.d/mirrorlist ?
Strange, multilib is uncommented correctly.  pacman -Syy shoulda refreshed your pacman database files.

EDIT: I think I led you down the wrong rabbit hole.  Disregard my posts.  Lol. Realized you are 32bit.

Last edited by frank604 (2013-02-17 21:15:31)


github       bible       screenshot

Offline

#7 2013-02-17 21:27:42

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,097
Website

Re: gcc 4.7.2 fails to find/(or something else with) default library

It would be more useful to see the actual source that he's trying to compile rather than investigate choice of mirror...

Offline

#8 2013-02-17 21:51:07

anden.d
Member
From: Sweden
Registered: 2012-12-15
Posts: 7

Re: gcc 4.7.2 fails to find/(or something else with) default library

The problems described in the first post occurs only when I try to include a library such as iostream for example the default "Hello world" the errors described but if don't include anything it compiles. What I find intresting is the fact that the code compiles fine on other systems is what confuses me


Aliquando et insanire iucundum est

Offline

#9 2013-02-18 02:57:21

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,097
Website

Re: gcc 4.7.2 fails to find/(or something else with) default library

...And without seeing the source and the exact command you've used to compile,  no one will be able to replicate this or help you any further.

Offline

#10 2013-02-18 07:57:31

anden.d
Member
From: Sweden
Registered: 2012-12-15
Posts: 7

Re: gcc 4.7.2 fails to find/(or something else with) default library

The exact command is in the first post and the code that generates the error code from the first post is:

#include <iostream>

using namespace std;

int main()
{
return 0;
}

The error message also shows up when using other libraries such as for example vector
generates with the same code as above but with vector instead of iostream

In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/c++config.h:414:0,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/stl_algobase.h:60,
                 from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/vector:61,
                 from test.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/i686-pc-linux-gnu/bits/os_defines.h:45:19: error: missing binary operator before token "("

And the command I use to compile is

g++ test.cpp

Aliquando et insanire iucundum est

Offline

#11 2013-02-20 18:38:52

anden.d
Member
From: Sweden
Registered: 2012-12-15
Posts: 7

Re: gcc 4.7.2 fails to find/(or something else with) default library

Took another look at it today. -And failed to figure it out. If anyone had a similar error it would be appreciated if I was told about it.

Thanks on forehand!

//anden.d


Aliquando et insanire iucundum est

Offline

Board footer

Powered by FluxBB