From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20947 invoked by alias); 29 Mar 2002 21:36:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20923 invoked by uid 71); 29 Mar 2002 21:36:01 -0000 Date: Fri, 29 Mar 2002 13:36:00 -0000 Message-ID: <20020329213601.20922.qmail@sources.redhat.com> To: bkoz@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Craig Rodrigues Subject: Re: libstdc++/3593: link error when using ofstream Reply-To: Craig Rodrigues X-SW-Source: 2002-03/txt/msg01212.txt.bz2 List-Id: The following reply was made to PR libstdc++/3593; it has been noted by GNATS. From: Craig Rodrigues 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