public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/3593: link error when using ofstream
@ 2002-03-29 13:36 Craig Rodrigues
0 siblings, 0 replies; 4+ messages in thread
From: Craig Rodrigues @ 2002-03-29 13:36 UTC (permalink / raw)
To: bkoz; +Cc: gcc-prs
The following reply was made to PR libstdc++/3593; it has been noted by GNATS.
From: Craig Rodrigues <rodrigc@attbi.com>
To: gcc-gnats@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, db@rtsffm.com, bkoz@gcc.gnu.org
Subject: Re: libstdc++/3593: link error when using ofstream
Date: Fri, 29 Mar 2002 16:35:29 -0500
Hi,
If you take a version of gcc which was compiled on a system
with glibc 2.1, and then use that binary on a system with glibc 2.2,
then you will get these kinds of link errors because
between glibc 2.1 and 2.2, mbstate_t changed from a typedef
to a macro.
I reported this error on the libstdc++ mailing list in Feb. 2001 here:
http://gcc.gnu.org/ml/libstdc++/2001-02/msg00100.html
I posted a summary of the mbstate_t problem to the glibc mailng list here:
http://sources.redhat.com/ml/libc-alpha/2001-02/msg00149.html
So the solutions are:
- if you are using a binary distribution of gcc, make sure that you are
using it on a system with exactly the same version of glibc on which it
was built. One way to do this is to stick to mainstream packaged
distributions you can yell at packagers like Red Hat, Debian, Mandrake,
etc. if something goes wrong.
or:
- rebuild gcc yourself from source on the system where you will be using gcc
This problem has been posted on the gcc mailing lists
at various times:
http://gcc.gnu.org/ml/gcc-help/2001-07/msg00171.html
http://gcc.gnu.org/ml/gcc-help/2001-06/msg00113.html
http://gcc.gnu.org/ml/gcc-bugs/2001-07/msg00247.html
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@attbi.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/3593: link error when using ofstream
@ 2001-10-10 13:46 pme
0 siblings, 0 replies; 4+ messages in thread
From: pme @ 2001-10-10 13:46 UTC (permalink / raw)
To: bkoz, db, gcc-bugs, gcc-prs
Synopsis: link error when using ofstream
State-Changed-From-To: analyzed->closed
State-Changed-By: pme
State-Changed-When: Wed Oct 10 13:46:37 2001
State-Changed-Why:
Cannot reproduce with 3.0.2 prerelease; no feedback
after 3 months.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3593&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/3593: link error when using ofstream
@ 2001-07-16 12:25 bkoz
0 siblings, 0 replies; 4+ messages in thread
From: bkoz @ 2001-07-16 12:25 UTC (permalink / raw)
To: bkoz, db, gcc-bugs, gcc-prs, nobody
Synopsis: link error when using ofstream
Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Mon Jul 16 12:25:16 2001
Responsible-Changed-Why:
Mine.
State-Changed-From-To: open->analyzed
State-Changed-By: bkoz
State-Changed-When: Mon Jul 16 12:25:16 2001
State-Changed-Why:
I cannot reproduce this:
%COMP-gnulocale.sh "-static -g" 3593.cc
<bkoz@fillmore> /mnt/hd/bliss/src.gcc/libstdc++-v3/testsuite %a.out
So, I'm not quite sure what is going on. Can you try to run 'make check' inside the libstdc++-v3 build directory, and make sure your built library is fine?
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3593&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* libstdc++/3593: link error when using ofstream
@ 2001-07-06 7:26 db
0 siblings, 0 replies; 4+ messages in thread
From: db @ 2001-07-06 7:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 3593
>Category: libstdc++
>Synopsis: link error when using ofstream
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jul 06 07:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Dirk Bonekamper
>Release: 3.0
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
When I try compile and link a program that contains an std::ofstream object, the linking fails with an undefined reference:
> g++ linktest.cxx
/tmp/cct0UdsP.o: In function `std::codecvt<char, char, __mbstate_t> const& std::use_facet<std::codecvt<char, char, __mbstate_t> >(std::locale const&)':
/tmp/cct0UdsP.o(.gnu.linkonce.t._ZSt9use_facetISt7codecvtIcc11__mbstate_tEERKT_RKSt6locale+0x7): undefined reference to `std::codecvt<char, char, __mbstate_t>::id'
collect2: ld returned 1 exit status
I'm using binutils 2.11.2.
Grepping nm output for libstdc++.so returns:
00061468 B std::codecvt<char, char, mbstate_t>::id
>How-To-Repeat:
#include <fstream>
int main()
{ std::ofstream ofs; }
>Fix:
No idea :-(
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-03-29 21:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-29 13:36 libstdc++/3593: link error when using ofstream Craig Rodrigues
-- strict thread matches above, loose matches on Subject: below --
2001-10-10 13:46 pme
2001-07-16 12:25 bkoz
2001-07-06 7:26 db
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).