This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Problems with g++ on Tru64 v5.1
- From: Wen Niu <wniu at ECECS dot UC dot EDU>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 16 Aug 2002 18:29:00 -0400 (EDT)
- Subject: Problems with g++ on Tru64 v5.1
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