LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-11-2013, 04:31 AM   #1
rpavankumar
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Rep: Reputation: Disabled
Unhappy Getting error during compilation with g++ on RHEL6.2


Hi all,
I am compiling code in RHEL 6.2 which is already compiled successfully different machine with same configureation.. getting lots of standard error related to namespace please let me know the resolution for this.
errors like: Generating /udir/naveen/from_35/data/objectstore/abl.adb & osschema_libabl.cc (-assf flag) "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/stringfwd.h", line 42: error: expected a "{" namespace std __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cstddef", line 49: error: expected a "{" namespace std __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cwchar", line 65: error: expected a "{" namespace std __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cwchar", line 139: error: expected a "{" namespace std __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cwchar", line 238: error: expected a "{" namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cwchar", line 260: error: expected a "{" namespace std __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cwchar", line 262: error: name followed by "::" must be a class or namespace name using ::__gnu_cxx::wcstold; ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cwchar", line 263: error: name followed by "::" must be a class or namespace name using ::__gnu_cxx::wcstoll; ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cwchar", line 264: error: name followed by "::" must be a class or namespace name using ::__gnu_cxx::wcstoull; ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/postypes.h", line 70: error: expected a "{" namespace std __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 44: error: expected a "{" namespace std __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 46: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 49: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 52: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 55: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 58: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 61: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT>, ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 62: error: allocator is not a template typename _Alloc = allocator<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 65: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT>, ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 66: error: allocator is not a template typename _Alloc = allocator<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 69: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT>, ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 70: error: allocator is not a template typename _Alloc = allocator<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 73: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT>, ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 74: error: allocator is not a template typename _Alloc = allocator<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 77: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 80: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 83: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 86: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 89: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/iosfwd", line 92: error: char_traits is not a template template<typename _CharT, typename _Traits = char_traits<_CharT> > ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/exception", line 120: error: expected a "{" namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/functexcept.h", line 39: error: expected a "{" namespace std __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/cpp_type_traits.h", line 69: error: expected a "{" namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/cpp_type_traits.h", line 76: error: expected a "{" namespace std __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/cpp_type_traits.h", line 310: error: name followed by "::" must be a class or namespace name struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/cpp_type_traits.h", line 310: error: too many arguments for class template "<error>::__is_normal_iterator" struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/type_traits.h", line 37: error: expected a "{" namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/type_traits.h", line 64: error: namespace "std" has no member "__is_integer" typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/type_traits.h", line 64: error: type name is not allowed typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/type_traits.h", line 64: error: too few arguments for class template "<error>::__enable_if" typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/type_traits.h", line 64: error: template parameter "_Tp" may not be redeclared in this scope typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; ^ "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/type_traits.h", line 64: error: expected a ";" typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; ^
 
Old 12-11-2013, 04:54 AM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,102

Rep: Reputation: 181Reputation: 181
what are you trying to compile,is it your own program? or is it from other party?
 
Old 12-11-2013, 05:51 AM   #3
rpavankumar
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
This code is part of my project.
 
Old 12-11-2013, 06:01 AM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,102

Rep: Reputation: 181Reputation: 181
Lightbulb

Quote:
Originally Posted by rpavankumar View Post
This code is part of my project.
I'm not really a software guy, but if you can debug your program or if it is possible to compile by module then do it by module.

In that way you can keep track which part of the code is giving trouble.

And have you tried to compile it using CentOS instead of RHEL?
 
Old 12-11-2013, 07:06 AM   #5
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,072
Blog Entries: 3

Rep: Reputation: 323Reputation: 323Reputation: 323Reputation: 323
that read out point to the header file and actually tells you that the newer gcc well very old old old compiler 4.4.6 needs. look at it real close.
it is telling you what your suppose to change.
Quote:
/bits/cpp_type_traits.h", line 76: error: expected a "{"
It is your code fix it up to compile in the 4.4.6 you probably had 4.3.x 4.4.3 or 4.4.4 before

Quote:
no that means you have one too many of these also it would be nice if you showed your whole code
or you missing a brace

Last edited by Drakeo; 12-11-2013 at 07:15 AM.
 
Old 12-11-2013, 07:59 AM   #6
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,102

Rep: Reputation: 181Reputation: 181
Cool

Quote:
Originally Posted by Drakeo View Post
that read out point to the header file and actually tells you that the newer gcc well very old old old compiler 4.4.6 needs. look at it real close.
it is telling you what your suppose to change.
It is your code fix it up to compile in the 4.4.6 you probably had 4.3.x 4.4.3 or 4.4.4 before
Ohh..Drakeo..you can interpret it..i suppose you're a graveyard guy..hahahah..actually its nice to code at night.. hehehe...
 
Old 12-11-2013, 08:41 AM   #7
rpavankumar
LQ Newbie
 
Registered: Dec 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Drakeo View Post
that read out point to the header file and actually tells you that the newer gcc well very old old old compiler 4.4.6 needs. look at it real close.
it is telling you what your suppose to change.
It is your code fix it up to compile in the 4.4.6 you probably had 4.3.x 4.4.3 or 4.4.4 before
HI Drakeo,
Currently i was using gcc 4.4.6 in my new machine. The same code was compiled in my old machine with same compiler, even machine configuration was also same.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Value out of range error - RHEL6 P.B Linux - Newbie 4 08-05-2013 03:45 PM
Value out of range error - while creating new partition in RHEL6 P.B Linux - Newbie 1 07-28-2013 10:45 AM
network error in rhel6 pushpendra Linux - Networking 2 04-24-2013 07:26 AM
error installing zimbra on rhel6 Gil@LQ Linux - Server 6 05-07-2012 05:43 PM
RHEL6.1 virt-manager error rhel5 Linux - Virtualization and Cloud 11 08-04-2011 04:25 PM


All times are GMT -5. The time now is 01:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration