Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

4.2.52 compile error on C++ module on AIX 5.2 using gcc 3.3.2

0 views
Skip to first unread message

RW

unread,
Jan 14, 2004, 8:35:49 AM1/14/04
to
Would someone happen to have some ideas as why this is getting an
error. Get the same problem using IBM's C compiler v 6.0.

Thanks

/bin/sh ./libtool --mode=compile g++ -c -I. -I../dist/..
-D_THREAD_SAFE -O2 ../dist/../cxx/cxx_d
b.cpp
g++ -c -I. -I../dist/.. -D_THREAD_SAFE -O2 ../dist/../cxx/cxx_db.cpp
-DPIC -o .libs/cxx_db.o
In file included from
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/powerpc-ibm-aix5.2.0.0/bits/c
++io.h:35,
from
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/bits/fpos.h:44,
from
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/iosfwd:49,
from
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/ios:44,
from
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/ostream:45,
from
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/iostream:45,
from db_cxx.h:56,
from ../cxx/cxx_db.cpp:17:
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/cstdio:108: error:
`fgetpos' not
declared
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/cstdio:110: error:
`fopen' not
declared
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/cstdio:115: error:
`freopen' not
declared
/cmDevTest/Dev/local/bin/../include/c++/3.3.2/cstdio:118: error:
`fsetpos' not
declared
make: *** [cxx_db.lo] Error 1
aixth4(cmadmin)# nm -BCpg /usr/lib/libc.a | grep freopen
40284 T .freopen64
40764 T .freopen
262296 D freopen64
262320 D freopen

Hans-Bernhard Broeker

unread,
Jan 14, 2004, 9:41:25 AM1/14/04
to
RW <richard...@cinfin.com> wrote:
[...]

> /cmDevTest/Dev/local/bin/../include/c++/3.3.2/cstdio:108: error:
> `fgetpos' not
> declared

This suggests your C++ Standard Library headers are broken in some
interesting ways. You'll have to look at line 108 of that file, and
check for surrounding #if conditions not being satisfied.

> aixth4(cmadmin)# nm -BCpg /usr/lib/libc.a | grep freopen
> 40284 T .freopen64
> 40764 T .freopen
> 262296 D freopen64
> 262320 D freopen

You're getting a compiler error about a missing _declaration_, not an
"undefined reference" from the linker. I.e. it's irrelevant what's in
the library according to 'nm' --- the problem is with the headers, not
the library. You'll have to inspect preprocessor output or the header
file(s) itself to see what's going on there.

--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

RW

unread,
Jan 20, 2004, 10:13:17 AM1/20/04
to
Hans-Bernhard Broeker <bro...@physik.rwth-aachen.de> wrote in message news:<bu3kel$evj$1...@nets3.rz.RWTH-Aachen.DE>...

> RW <richard...@cinfin.com> wrote:
> [...]
> > /cmDevTest/Dev/local/bin/../include/c++/3.3.2/cstdio:108: error:
> > `fgetpos' not
> > declared
>
> This suggests your C++ Standard Library headers are broken in some
> interesting ways. You'll have to look at line 108 of that file, and
> check for surrounding #if conditions not being satisfied.
>
> > aixth4(cmadmin)# nm -BCpg /usr/lib/libc.a | grep freopen
> > 40284 T .freopen64
> > 40764 T .freopen
> > 262296 D freopen64
> > 262320 D freopen
>
> You're getting a compiler error about a missing _declaration_, not an
> "undefined reference" from the linker. I.e. it's irrelevant what's in
> the library according to 'nm' --- the problem is with the headers, not
> the library. You'll have to inspect preprocessor output or the header
> file(s) itself to see what's going on there.


Turns out that defining LARGE_FILES somehow precludes the header file
processing from including the non-64 bit declarations. It compiled
fine if I pass --disable-largefile in the configure step.

My question is should defining LARGE_FILE prevent the declaration of
non-64 bit functions? If not then the problem is either in gcc or the
vendor supplied files.

0 new messages