public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problems with g++ on Tru64 v5.1
       [not found] <1F5D8AF5F137D41195DF009027DE2E1D10EB6EF8@UCMAIL3>
@ 2002-08-16 15:29 ` Wen Niu
  2002-08-16 16:54   ` Wen Niu
  0 siblings, 1 reply; 2+ messages in thread
From: Wen Niu @ 2002-08-16 15:29 UTC (permalink / raw)
  To: gcc-help

Hello gcc gurus,

I recently installed gcc3.1.1 on a Compaq ES40 running Tru64 v5.1.

Here's the command used in configure step:

CC=cc ../gcc-3.1.1/configure --prefix=/usr/local/opt/gcc/gcc311
--with-as=/usr/bin/as --with-ld=/usr/bin/ld --with-stabs --enable-threads

The following message was produced in the 1st try:

17959:/usr/local/opt/bin/makeinfo: /sbin/loader: Fatal Error: Cannot map
library libz.so.1.1.3
19537:/usr/local/opt/bin/makeinfo: /sbin/loader: Fatal Error: Cannot map
library libz.so.1.1.3
20610:/usr/local/opt/bin/makeinfo: /sbin/loader: Fatal Error: Cannot map
library libz.so.1.1.3
configure: warning:
*** Makeinfo is missing or too old.
*** Info documentation will not be built.
Links are now set up to build a native compiler for alphaev68-dec-osf5.1
22437:/usr/local/opt/bin/makeinfo: /sbin/loader: Fatal Error: Cannot map
library libz.so.1.1.3

After I made a symlink libz.so.1.1.3 in /usr/local/lib pointing to
/usr/local/opt/lib/libz.so.1.1.3 before the 2nd try, the configure went
successfully.

The subsequent build and install steps all seemed OK.

Also no problem when I tested the following C code using gcc:
#include <stdio.h>
int main() { printf("Hello world!\n"); return 0; }

However, there are lots of problems with g++.

The sample C++ code, testh.cpp, is as follows:
#include <iostream.h>
int main() { cout << "Hello world!\n"; return 0; }

g++ testh.cpp
produced this warning message:
In file included from
/usr/local/opt/gcc/gcc311/include/c++/3.1.1/iostream.h:31,
                 from testh.cpp:1:
/usr/local/opt/gcc/gcc311/include/c++/3.1.1/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.

When I tried to run a.out, there was
285424:./a.out: /sbin/loader: Fatal Error: Cannot map library libstdc++.so

The error was gone after I created a symlink libstdc++.so in
/usr/local/lib to /usr/local/opt/gcc/gcc311/lib/libstdc++.so.

To conform to the new header standards, I changed <iostream.h> to
<iostream> (and renamed the source to test.cpp), but g++ complained:
test.cpp: In function `int main()':
test.cpp:2: `cout' undeclared (first use this function)
test.cpp:2: (Each undeclared identifier is reported only once for each
	function it appears in.)

I tried to put links in /usr/local/lib and /usr/local/include to point to
gcc_prefix/lib and gcc_prefix/include. All failed to compile.

Seems g++ couldn't find the library files in the default locations. But I
can't figure out why this should happen and how to fix it. Could anyone
give me some advice please?

Wen

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problems with g++ on Tru64 v5.1
  2002-08-16 15:29 ` Problems with g++ on Tru64 v5.1 Wen Niu
@ 2002-08-16 16:54   ` Wen Niu
  0 siblings, 0 replies; 2+ messages in thread
From: Wen Niu @ 2002-08-16 16:54 UTC (permalink / raw)
  To: gcc-help

Hi all,

To aid debugging, I ran g++ -v test.cpp. Here's the result:

Reading specs from
/usr/local/opt/gcc/gcc311/lib/gcc-lib/alphaev68-dec-osf5.1/3.1.1/specs
Configured with: ../gcc-3.1.1/configure --prefix=/usr/local/opt/gcc/gcc311
--with-as=/usr/bin/as --with-ld=/usr/bin/ld --with-stabs --enable-threads
Thread model: single
gcc version 3.1.1
 /usr/local/opt/gcc/gcc311/lib/gcc-lib/alphaev68-dec-osf5.1/3.1.1/cc1plus
-v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=1 -Dunix
-D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__
-D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD
-Asystem=unix -Asystem=xpg4 -D__NO_INLINE__ -D__STDC_HOSTED__=1
-D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus
-Acpu=alpha -Amachine=alpha -D__alpha -D__alpha__ -D__alpha_ev6__
-Acpu=ev6 -D__alpha_bwx__ -Acpu=bwx -D__alpha_max__ -Acpu=max
-D__alpha_fix__ -Acpu=fix -D__alpha_cix__ -Acpu=cix -D__X_FLOAT
-D__EXTERN_PREFIX test.cpp -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS
-D__GXX_ABI_VERSION=100 -quiet -dumpbase test.cpp -version -o
/tmp//ccyFELQk.s
GNU CPP version 3.1.1 (cpplib)
GNU C++ version 3.1.1 (alphaev68-dec-osf5.1)
   compiled by GNU C version 3.1.1.
ignoring nonexistent directory
"/usr/local/opt/gcc/gcc311/alphaev68-dec-osf5.1/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/opt/gcc/gcc311/include/c++/3.1.1
 /usr/local/opt/gcc/gcc311/include/c++/3.1.1/alphaev68-dec-osf5.1
 /usr/local/opt/gcc/gcc311/include/c++/3.1.1/backward
 /usr/local/include
 /usr/local/opt/gcc/gcc311/include
 /usr/local/opt/gcc/gcc311/lib/gcc-lib/alphaev68-dec-osf5.1/3.1.1/include
 /usr/include
End of search list.
test.cpp: In function `int main()':
test.cpp:2: `cout' undeclared (first use this function)
test.cpp:2: (Each undeclared identifier is reported only once for each
function
   it appears in.)


Hope it provides more clues to those knowledgeable. Help is really
appreciated.

Wen

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-16 23:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1F5D8AF5F137D41195DF009027DE2E1D10EB6EF8@UCMAIL3>
2002-08-16 15:29 ` Problems with g++ on Tru64 v5.1 Wen Niu
2002-08-16 16:54   ` Wen Niu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).