public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Upgrading libstdc++ questions
@ 2002-08-28  2:16 Samir Rajguru
  0 siblings, 0 replies; 2+ messages in thread
From: Samir Rajguru @ 2002-08-28  2:16 UTC (permalink / raw)
  To: gcc-patches, libstdc++, gcc-help


I am trying to upgrade libstdc++ on my gcc installation. The version
of gcc I am using is 2.95.3. The version of libstdc++ I am trying to
upgrade to is 2.90.8 (the latest version that is supposed to work on
2.95.3).

Directions say that I need to rebuild libgcc.a along with the new libstdc++
for things such as namespaces to work correctly (e.g. to use the stl
"std" namespace).

However, my current gcc installation already has namespaces correctly
working (I am able to use the STL "std" namespace, etc.). So my question
is if I just try to build libstdc++ without rebuilding gcc (libgcc.a)
 (by using the --disable-libgcc-rebuild option) will namespaces still
work correctly? If not, why not?

I ask this, because customers who use our libraries do not want to have
to rebuild their gcc compiler as well (we simply provide the new libstdc++
library files to link with).


I am assuming that I must rebuild libgcc.a because when I try to use
the updated library (not having rebuilt libgcc.a) I get a bunch of undefined
reference to errors that look like the following (is this true??):



0): undefined reference to `__length_error(char const *)'
obj/Solaris_GNU/Release/fabricacc/sallite/saldcmd.o: In function `basic_string<char,
char_traits<char>, allocator<char> >::_M_che
ck(unsigned int) const':
obj/Solaris_GNU/Release/fabricacc/sallite/saldcmd.o(.basic_string<char,
char_traits<char>, allocator<char> >::gnu.linkonce.t._M_c
heck(unsigned int) const+0x30): undefined reference to `__out_of_range(char
const *)'
obj/Solaris_GNU/Release/fabricacc/sallite/saldfwconf.o: In function `unNibble(char)':
obj/Solaris_GNU/Release/fabricacc/sallite/saldfwconf.o(.text+0x2f0):
undefined reference to `LogManager::trace(basic_string<char,
 char_traits<char>, allocator<char> > const &, char const *, basic_string<char,
char_traits<char>, allocator<char> > const &, cha
r const *, basic_string<char, char_traits<char>, allocator<char> > const
&, int)'
obj/Solaris_GNU/Release/fabricacc/sallite/saldfwconf.o(.text+0x554):
undefined reference to `LogManager::trace(basic_string<char,
 etc.



All help much appreciated,
Samir

-- 
Samir Rajguru
srajguru@onebox.com - email
(510) 401-3282 x1034 - voicemail/fax

 

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

* Re: Upgrading libstdc++ questions
       [not found] <2F37CED150E21640A9C6E75B8BE6AF83010F7B7A@hq-ex-4>
@ 2002-08-28  6:31 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2002-08-28  6:31 UTC (permalink / raw)
  To: Samir Rajguru; +Cc: libstdc++, gcc-help


First of all, gcc-patches is the list for posting patches that will be
applied to the compiler sources, not questions about usage.

Be warned, I might be talking rubbish here ... just trying to help because
noone else has replied ...

On Wed, Aug 28, 2002 at 02:13:18AM -0700, Samir Rajguru wrote:

> I am trying to upgrade libstdc++ on my gcc installation. The version of gcc
> I am using is 2.95.3. The version of libstdc++ I am trying to upgrade to is
> 2.90.8 (the latest version that is supposed to work on 2.95.3).
> 
> Directions say that I need to rebuild libgcc.a along with the new libstdc++
> for things such as namespaces to work correctly (e.g. to use the stl "std"
> namespace).
> 
> However, my current gcc installation already has namespaces correctly
> working (I am able to use the STL "std" namespace, etc.).

As I understand it, the issue isn't being able to use std::, but that you
can use basic_string, vector etc. without qualifying them as being in the
std namespace.
By default GCC 2.95 ignores std:: qualifiers completely. User-defined
namespaces will work fine, but it makes no difference whether you qualify
standard library names with "std::" or not, the compiler ignores it and
acts as though all the standard names are in the global namespace.
I believe that it's this behaviour that's being referred to as namespaces
not working correctly.

Try this (replacing path to libgcc.a as necessary):

nm -C /usr/lib/libgcc.a | fgrep "exception::what(void)"

If exception::what() isn't qualified with std:: then I think you need to
rebuild libgcc.a with the -fhonor-std flag.

Have you tried it? If the instructions say you should then I'd recommend
at least trying it. People who know what they're talking about (i.e. not me)
should be able to help you further.

jon


-- 
sigfault

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

end of thread, other threads:[~2002-08-28 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-28  2:16 Upgrading libstdc++ questions Samir Rajguru
     [not found] <2F37CED150E21640A9C6E75B8BE6AF83010F7B7A@hq-ex-4>
2002-08-28  6:31 ` Jonathan Wakely

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).