Gcc 2.95.2 - includes problem

Howard Gilbert post@howard-gilbert.uklinux.net
Sat Sep 23 01:23:00 GMT 2000


Hi,

I am re-sending a plea for help which had no response when sent a week
ago. If the reason for no response is because my mail is inappropriate in
some way please tell me.  

Best wishes,
Howard.
(A.H.Gilbert, Thornaby, North Yorkshire)

---------- Forwarded message ----------
Date: Sat, 16 Sep 2000 16:52:01 +0100 (GMT)
From: Howard Gilbert <post@howard-gilbert.uklinux.net>
To: gcc-help@gcc.gnu.org
Subject: Gcc 2.95.2 - includes problem (fwd)

Hi,

I recently donwloaded gcc 2.95.2 and it seemed to configure, make and
install smoothly. When I attempted to make other software
(noteedit)  however, I seem to run into strange problems.
These seem to concern the gcc set-up rather than noteedit itself. 

First time I had a lots of errors from unistd.h and string.h most of which
were related to size_t as a type specifier, which was undefined. eg:-

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# make
g++   -I/usr/local/qt/include -I/usr/include    -c -o mainframewidget.o 
mainframewidget.cpp
In file included from mainframewidget.cpp:23:
/usr/include/unistd.h:208: type specifier omitted for parameter
/usr/include/unistd.h:208: parse error before `)'
/usr/include/unistd.h:209: type specifier omitted for parameter
/usr/include/unistd.h:209: parse error before `)'
/usr/include/unistd.h:212: type specifier omitted for parameter
/usr/include/unistd.h:212: parse error before `)'
/usr/include/unistd.h:213: type specifier omitted for parameter
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

( one similar error was  related to undefined ptrdiff_t)

Doing a grep on "#define size_t" found it in malloc.h, but when I included
this it didn't help 'cos it said something like size_t was not defined in
this context. So, to see what would happen,  I modified the .cpp file in
question to contain:-
 #define size_t unsigned int
 #define ptrdiff_t int  

This got past the above error messages but now gave lots which all seemed
to be associated with NULL being an "invalid type 'void *' for default
argument". Each error of this type, below, (and more not included) is
associated with NULL as the default value.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# make
g++   -I/usr/local/qt/include -I/usr/include    -c -o mainframewidget.o
mainframewidget.cpp
In file included from /usr/local/qt/include/qfile.h:32,
                 from /usr/local/qt/include/qfileinfo.h:30,
                 from /usr/local/qt/include/qdir.h:31,
                 from /usr/local/qt/include/qfiledialog.h:38,
                 from mainframewidget.h:30,
                 from mainframewidget.cpp:31:
/usr/include/stdio.h:66: declaration does not declare anything
In file included from
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/iostream.h:31,
                 from
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/strstream.h:32,
                 from filehandler.h:26,
                 from mainframewidget.cpp:42:
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/streambuf.h:403: invalid
type `void *' for default argument to `ios *'
In file included from
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/strstream.h:32,
                 from filehandler.h:26,
                 from mainframewidget.cpp:42:
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/iostream.h:50: invalid
type `void *' for default argument to `ostream *'
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/iostream.h:123: invalid
type `void *' for default argument to `ostream *'
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/iostream.h:231: invalid
type `void *' for default argument to `ostream *'
In file included from filehandler.h:26,
                 from mainframewidget.cpp:42:
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/strstream.h:64: invalid
type `void *' for default argument to `signed char *'
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/strstream.h:58: invalid
type `void *' for default argument to `unsigned char *'

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I've been getting nowhere with this for a week now so I think I need to
seek help, PLEASE.  I give info about my gcc installation below.

I appologise for the length of this mailing.

Thankyou and best wishes,
Howard.
(A.H.Gilbert, Thornaby, North Yorkshire)



================================================================================================
My OS is Linux using RedHat Distribution v5.2 but with updated kernel
v2.2.14.

EXECUTABLES.

The following executables were installed in /usr/local/bin with the date
of latest gcc installation:-
 c++*
 c++filt*
 chill*
 cpp*
 g++*
 g77*
 gcc*
 gcj*
 gcjh*
 gcov*

The following executables were installed in
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/ with the date  
of latest gcc installation:- 
 cc1*
 cc1chill*
 cc1obj*
 cc1plus*
 collect2* 
 cpp*
 f771*
 jc1*
 jvgenmain*

There is also a link:-
/usr/bin/gcc -> /usr/local/bin/gcc*

LIBRARIES

A library was installed in /usr/local/lib with date of latest gcc
install:-
 libstdc++.a.2.10.0

The following were installed in
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2 with date of latest gcc
instalation:-
 libchill.a
 libg2c.a
 libgcc.a
 libobjc.a
 libstdc++.a ->../../../libstdc++.a.2.10.0 
 libstdc++.la*
 libstdc++.so.3*
 libstdc++.so.3.0.0*

There are also older lidstdc++ v2.7 in /usr/i486-linux-libc5/lib/

INCLUDES

There are include (*.h) files in the following directories which are date
as recent gcc install:-
/usr/local/include/g++-3/
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/

There are also many *.h files in
/usr/include/
some of these date from the last Linux kernel update others are
older. Many of these have the same name as *.h files from the recent gcc
installation but are very different.


Then there are a lot more lib* and *.h files under
/user/local/lib/gcc-lib/i586-linux/egcs-2.91.66.1/














More information about the Gcc-help mailing list