Aide-memoire: may need to re-install fw_gcc to make g++ work

发表于:2007-05-26来源:作者:点击数: 标签:
1.Itmaybenecessarytore-installfw_gcc[3.3].tardistafterupgradingtheIRIX6.5.20mtoIRIX6.5.22minorderthatg++maywork. 2.Itissuspectedthisisgenerallytrueforallupgrades. 3.gcchoweverisnotaffected. 4.Possiblereasons:duringtheinstallationoffw_gcc[3

1. It may be necessary to re-install fw_gclearcase/" target="_blank" >cc[3.3].tardist after upgrading the IRIX 6.5.20m to IRIX 6.5.22m in order that g++ may work. 

2. It is suspected this is generally true for all upgrades. 

3. gcc however is not affected.

4. Possible reasons: during the installation of fw_gcc[3.3].tardist, there are a number of operations that will fix the header files...

Screenshot of compilation/preprocessing errors below:-






 En_route 回复于:2004-08-07 13:41:26
2. iostream.h -->iostream






 En_route 回复于:2004-08-07 13:43:31
3. gcc is not affected by the OS upgrade from 6.5.20m to 6.5.22m






 En_route 回复于:2004-08-07 13:47:14
4. On my O2, reinstalling fw_gcc-3.3.tardist [after deleting the previous fw_gcc-3.3.tardist] solves the problem i.e. g++ and gcc will both work without the aforesaid compiling/preprocessing problems.

It should solve the problems on my INDY too -- I still have stuff in my indy that need to be backup-ed before I reinstall fw-gcc-3.3.tardist again.

 En_route 回复于:2004-08-09 18:56:16
5.

Appendix A1:

[size=9:67aa6f0726]file: err-file

In file included from /usr/include/internal/ctype_core.h:102,
                 from /usr/include/ctype.h:4,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cctype:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:47,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from hello.cc:1:
/usr/include/internal/locale_attr_core.h:74: error: type specifier omitted for 
   parameter `__SGI_LIBC_NAMESPACE_QUALIFIER'
/usr/include/internal/locale_attr_core.h:74: error: parse error before `)' 
   token
In file included from /usr/include/string.h:4,
                 from /usr/include/sys/select.h:80,
                 from /usr/include/sys/bsd_types.h:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/sys/types.h:410,
                 from /usr/include/internal/time_core.h:34,
                 from /usr/include/time.h:4,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ctime:51,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cwchar:51,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/bits/fpos.h:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from hello.cc:1:
/usr/include/internal/string_core.h:113: error: type specifier omitted for 
   parameter `__SGI_LIBC_NAMESPACE_QUALIFIER'
/usr/include/internal/string_core.h:113: error: parse error before `)' token
/usr/include/internal/string_core.h:116: error: syntax error before `strlcat'
/usr/include/internal/string_core.h:118: error: syntax error before `strlcpy'
In file included from /usr/include/time.h:4,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ctime:51,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cwchar:51,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/bits/fpos.h:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from hello.cc:1:
/usr/include/internal/time_core.h:221: error: parse error before `*' token
/usr/include/internal/time_core.h:231: error: parse error before `*' token
/usr/include/internal/time_core.h:232: error: parse error before `*' token
/usr/include/internal/time_core.h:234: error: parse error before `*' token
In file included from /usr/include/wctype.h:25,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:33,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cwchar:54,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/bits/fpos.h:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from hello.cc:1:
/usr/include/internal/wctype_core.h:79: error: parse error before `)' token
/usr/include/internal/wctype_core.h:112: error: parse error before `,' token
/usr/include/internal/wctype_core.h:114: error: syntax error before `__trwctype
   '
/usr/include/internal/wctype_core.h:169: error: parse error before `)' token
/usr/include/internal/wctype_core.h:170: error: parse error before `)' token
/usr/include/internal/wctype_core.h:171: error: parse error before `)' token
/usr/include/internal/wctype_core.h:172: error: parse error before `)' token
/usr/include/internal/wctype_core.h:173: error: parse error before `)' token
/usr/include/internal/wctype_core.h:174: error: parse error before `)' token
In file included from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cwchar:54,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/bits/fpos.h:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from hello.cc:1:
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:163: error: type 
   specifier omitted for parameter `va_list'
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:164: error: type 
   specifier omitted for parameter `va_list'
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:165: error: type 
   specifier omitted for parameter `va_list'
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:264: error: declaration
   of C function `int __iswctype(long int, long unsigned int)' conflicts with
/usr/include/internal/wctype_core.h:113: error: previous declaration `int 
   __iswctype(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:300: error: declaration
   of C function `int iswascii(long int)' conflicts with
/usr/include/internal/wctype_core.h:169: error: previous declaration `int 
   iswascii(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:301: error: declaration
   of C function `int isphonogram(long int)' conflicts with
/usr/include/internal/wctype_core.h:170: error: previous declaration `int 
   isphonogram(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:302: error: declaration
   of C function `int isideogram(long int)' conflicts with
/usr/include/internal/wctype_core.h:171: error: previous declaration `int 
   isideogram(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:303: error: declaration
   of C function `int isenglish(long int)' conflicts with
/usr/include/internal/wctype_core.h:172: error: previous declaration `int 
   isenglish(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:304: error: declaration
   of C function `int isnumber(long int)' conflicts with
/usr/include/internal/wctype_core.h:173: error: previous declaration `int 
   isnumber(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:305: error: declaration
   of C function `int isspecial(long int)' conflicts with
/usr/include/internal/wctype_core.h:174: error: previous declaration `int 
   isspecial(...)' here[/size:67aa6f0726]






 En_route 回复于:2004-08-09 18:57:49
6.

Appendix B2.

[size=9:bebcbfc91a]file: err-file-mit-dot-h <iostream.h>

In file included from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/backward/iostream.h:31,
                 from hello.cc:1:
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
In file included from /usr/include/internal/ctype_core.h:102,
                 from /usr/include/ctype.h:4,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cctype:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:47,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/backward/iostream.h:32,
                 from hello.cc:1:
/usr/include/internal/locale_attr_core.h:74: error: type specifier omitted for 
   parameter `__SGI_LIBC_NAMESPACE_QUALIFIER'
/usr/include/internal/locale_attr_core.h:74: error: parse error before `)' 
   token
In file included from /usr/include/string.h:4,
                 from /usr/include/sys/select.h:80,
                 from /usr/include/sys/bsd_types.h:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/sys/types.h:410,
                 from /usr/include/internal/time_core.h:34,
                 from /usr/include/time.h:4,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ctime:51,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cwchar:51,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/bits/fpos.h:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/backward/iostream.h:32,
                 from hello.cc:1:
/usr/include/internal/string_core.h:113: error: type specifier omitted for 
   parameter `__SGI_LIBC_NAMESPACE_QUALIFIER'
/usr/include/internal/string_core.h:113: error: parse error before `)' token
/usr/include/internal/string_core.h:116: error: syntax error before `strlcat'
/usr/include/internal/string_core.h:118: error: syntax error before `strlcpy'
In file included from /usr/include/time.h:4,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ctime:51,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cwchar:51,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/bits/fpos.h:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/backward/iostream.h:32,
                 from hello.cc:1:
/usr/include/internal/time_core.h:221: error: parse error before `*' token
/usr/include/internal/time_core.h:231: error: parse error before `*' token
/usr/include/internal/time_core.h:232: error: parse error before `*' token
/usr/include/internal/time_core.h:234: error: parse error before `*' token
In file included from /usr/include/wctype.h:25,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:33,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cwchar:54,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/bits/fpos.h:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/backward/iostream.h:32,
                 from hello.cc:1:
/usr/include/internal/wctype_core.h:79: error: parse error before `)' token
/usr/include/internal/wctype_core.h:112: error: parse error before `,' token
/usr/include/internal/wctype_core.h:114: error: syntax error before `__trwctype
   '
/usr/include/internal/wctype_core.h:169: error: parse error before `)' token
/usr/include/internal/wctype_core.h:170: error: parse error before `)' token
/usr/include/internal/wctype_core.h:171: error: parse error before `)' token
/usr/include/internal/wctype_core.h:172: error: parse error before `)' token
/usr/include/internal/wctype_core.h:173: error: parse error before `)' token
/usr/include/internal/wctype_core.h:174: error: parse error before `)' token
In file included from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/cwchar:54,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/bits/fpos.h:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iosfwd:49,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ios:44,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/ostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/iostream:45,
                 from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/c++/backward/iostream.h:32,
                 from hello.cc:1:
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:163: error: type 
   specifier omitted for parameter `va_list'
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:164: error: type 
   specifier omitted for parameter `va_list'
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:165: error: type 
   specifier omitted for parameter `va_list'
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:264: error: declaration
   of C function `int __iswctype(long int, long unsigned int)' conflicts with
/usr/include/internal/wctype_core.h:113: error: previous declaration `int 
   __iswctype(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:300: error: declaration
   of C function `int iswascii(long int)' conflicts with
/usr/include/internal/wctype_core.h:169: error: previous declaration `int 
   iswascii(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:301: error: declaration
   of C function `int isphonogram(long int)' conflicts with
/usr/include/internal/wctype_core.h:170: error: previous declaration `int 
   isphonogram(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:302: error: declaration
   of C function `int isideogram(long int)' conflicts with
/usr/include/internal/wctype_core.h:171: error: previous declaration `int 
   isideogram(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:303: error: declaration
   of C function `int isenglish(long int)' conflicts with
/usr/include/internal/wctype_core.h:172: error: previous declaration `int 
   isenglish(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:304: error: declaration
   of C function `int isnumber(long int)' conflicts with
/usr/include/internal/wctype_core.h:173: error: previous declaration `int 
   isnumber(...)' here
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3/include/wchar.h:305: error: declaration
   of C function `int isspecial(long int)' conflicts with
/usr/include/internal/wctype_core.h:174: error: previous declaration `int 
   isspecial(...)' here[/size:bebcbfc91a]






 En_route 回复于:2004-08-10 11:29:47
7.

After re-installing fw_gcc3.3.tardist from 

           http://freeware.sgi.com

compiling opengl program using g++ on my INDY (previously at IRIX 6.5.20m)






 En_route 回复于:2004-08-10 11:40:45
8.






 En_route 回复于:2004-08-10 11:43:30
9.






 samcd 回复于:2004-09-23 10:31:27
thans a lot!
but i'm not sure whether i should reinstall gcc if i didn't update my Irix at all.

 En_route 回复于:2004-09-23 11:33:45
[quote:3ef6ef672b="samcd"]but i'm not sure whether i should reinstall gcc if i didn't update my Irix at all.[/quote:3ef6ef672b]

My suggestion would be [after going thru' your postings and assuming that you will be doing quite a bit of programme development:

(1) make sure that IRIX has been properly installed, in particular, [color=orange:3ef6ef672b]the software in the development_libraries and dev_foundation CDs [/color:3ef6ef672b] have been properly installed

(2) After (1), best to upgrade IRIX to at least 6.5.22m if you machine is not as old as mine (low end machines like INDY are not supported beyond IRIX 6.5.22m)

[N.B. by joining SGI as a supportfolio member, 6.5.22m is free]

(3) If you intend to use gcc/g++, SGI freeware fw_gcc and neko_gcc3.4 are O.K.

Have fun and good luck

[color=blue:3ef6ef672b]PS. Please also note that SGI has its own CC/C++ compiler, which are not free, of course. You may wish to see the [color=orange]software development forum at 

www.nekochan.net 

which has very informative discussions on the use of both gcc and SGI's CC/C++.[/color:3ef6ef672b]

 samcd 回复于:2004-09-23 20:54:35
thx to En_route.
Now my gcc does work, but my qt program couldn't link the shared  library.

g++ -Wl, -rpath, /usr/nekoware/qt/lib -o hello hello.o.... -L/usr/nekoware/qt/lib -lC -lqt -lX11 -lm
ld32: WARNING 84: /usr/lib32/libC.so is not used to resolve any symbols
...
....
ld32:ERROR 33:Unresolved text symbol "QWidget...."....

i really don't know what shall i do:(

 samcd 回复于:2004-09-23 20:56:42
my irix version is 6.5.19f 
uname -aR
IRIX64 IRIS 6.5 6.5.19f 01100601 lp35

 En_route 回复于:2004-09-23 21:22:55
[quote:38774c16ed="samcd"]Now my gcc does work..........[/quote:38774c16ed]

Well done and glad to hear you are successful at this very important step -- to have a good complier.

[quote:38774c16ed] but my qt program couldn't link the shared library. 

g++ -Wl, -rpath, /usr/nekoware/qt/lib -o hello hello.o.... -L/usr/nekoware/qt/lib -lC -lqt -lX11 -lm 
ld32: WARNING 84: /usr/lib32/libC.so is not used to resolve any symbols 
... 
.... 
ld32:ERROR 33:Unresolved text symbol "QWidget....".... 
..........[/quote:38774c16ed]

I suspect that it has something to do with the environmental parameter LD_LIBRARY_PATH despite you have already set -L and -l. 

If you can post the result of
% printenv /* assuming you are using C shell */


[quote:38774c16ed] i really don't know what shall i do:( 
ld..........[/quote:38774c16ed]

Well, I must say you have done well in such a short time. Keep trying -- [color=orange:38774c16ed]自古成功在尝试[/color:38774c16ed]。And in the era of INTERNET -- google...

 samcd 回复于:2004-09-23 23:42:03
thanks for ur encourage:)
i really have no excuse to stop. There r so many kind guys, just like u to help me . i'm so lucky.

now i'll give u some of my env setting:)
 =/usr/sbin/swsh
LANG=C
PATH=/usr/nekoware/qt/bin:/usr/nekoware/bin:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/etc:/usr/etc:/usr/bin/X11
....
SHELL=/bin/csh
QTDIR=/usr/nekoware/qt
QMAKESPEC=irix-g++ (i modified it)
LD_LIBRARY_PATH=/usr/nekoware/qt/lib:/usr/nekowre/lib
.....

原文转自:http://www.ltesting.net