Bug 18166 - libstc++ compile errors
libstc++ compile errors
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: libstdc++ (Show other bugs)
7.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
: 18739 19068 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-02 22:02 EDT by Need Real Name
Modified: 2007-04-18 12:28 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-01 11:47:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2000-10-02 22:02:46 EDT
When I tried to compile lyx-1.1.5pre3 under a new install of RH7 I get the
following errors.
There appears to be syntax errors in the libstc++ headers
----------------
make[3]: Entering directory `/root/lyx-1.1.5pre3/src/mathed'
/bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I.
-I../../src -I.
./../images -I./../   -I/usr/X11R6/include  -g -O -fhonor-std -W -Wall
-Wconvers
ion -Winline -c formula.C
g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I../../images -I./../
-I/usr/X11R6/incl
ude -g -O -fhonor-std -W -Wall -Wconversion -Winline -c formula.C -o
formula.o
In file included from /usr/include/g++-3/cstddef:7,
                 from /usr/include/g++-3/std/bastring.h:36,
                 from /usr/include/g++-3/string:7,
                 from /usr/include/g++-3/sstream:31,
                 from formula.C:20:
/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h:147: syntax error
befor
e `typedef'
In file included from /usr/include/g++-3/alloc.h:22,
                 from /usr/include/g++-3/std/bastring.h:40,
                 from /usr/include/g++-3/string:7,
                 from /usr/include/g++-3/sstream:31,
                 from formula.C:20:
/usr/include/g++-3/stl_alloc.h:733: parse error before `;'
/usr/include/g++-3/stl_alloc.h:773: parse error before `;'
/usr/include/g++-3/stl_alloc.h:808: parse error before `;'
/usr/include/g++-3/stl_alloc.h:851: parse error before `;'
In file included from /usr/include/g++-3/iterator:39,
                 from /usr/include/g++-3/std/bastring.h:45,
                 from /usr/include/g++-3/string:7,
                 from /usr/include/g++-3/sstream:31,
                 from formula.C:20:
/usr/include/g++-3/stl_iterator.h:88: parse error before `,'
/usr/include/g++-3/stl_iterator.h:92: template declaration of `typedef 
_Tp value_type'
/usr/include/g++-3/stl_iterator.h:92: Internal error: Segmentation 
fault.
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[3]: *** [formula.lo] Error 1
make[3]: Leaving directory `/root/lyx-1.1.5pre3/src/mathed'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/lyx-1.1.5pre3/src'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/root/lyx-1.1.5pre3/src'
make: *** [all-recursive] Error 1
---------------------


James Boulton
Comment 1 Jakub Jelinek 2000-10-03 06:37:34 EDT
Ok, from current investigation it looks like it is partly bug on lyx side and
maybe there is some bug in libstdc++, will need to investigate more.
The bug on lyx side is that it assumes gcc 2.96 means libstdc++-v3 which is
wrong assumption (even current CVS gcc 2.97 does not build libstdc++-v3
by default), changing aclocal.m4 and configure so that on 2.96) it does the
same as with 2.95.*) cures it.
Another problem is that in 2.96 libstdc++ there is sstream header, but probably
not the one lyx assumes to see (again I think it thinks it must be from
libstdc++-v3). Commenting #define HAVE_SSTREAM 1 out of src/config.h after
configure or taking it out of configure.in/configure makes lyx to compile
on RHL7.
I'll ask the C++ folks whether using -fhonor-std with libstdc++-v2 headers
is actually allowed, whether <sstream> is allowed to include <string> (that is
one reason why formula.C fails because lyxstring.h defines its own string class
which conflicts with the one defined in <string> and whether sstream should
be compilable with -fno-rtti or not (that is the other reason).
Comment 2 Jakub Jelinek 2000-10-11 05:21:00 EDT
*** Bug 18739 has been marked as a duplicate of this bug. ***
Comment 3 Need Real Name 2000-10-19 16:13:48 EDT
*** Bug 19068 has been marked as a duplicate of this bug. ***
Comment 4 Benjamin Kosnik 2004-10-01 11:47:30 EDT
> lyxstring.h defines its own string class
>which conflicts with the one defined in <string> 

Bug.

with gcc-2.x compilers, without namespace support, this is a violation
of ODR.

-benjamin

Note You need to log in before you can comment on or make changes to this bug.