From patchwork Thu Jan 23 12:41:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 313595 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8AED22C0091 for ; Thu, 23 Jan 2014 23:41:45 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=pYm9vXtGDmM3afLZrUfAg7XElu9v8CAYrQm1Ck4ex6X0cuv1edEDy dX0BglxChOKu1u6HBSqEEmtn32cF+A5uizVO2EzKYxw1yoOi5JL6fJZkBg1GL2Ar 5dQnssOye8wCV28eSJaH0KAmJsSK+QvZ2FFiyWiKZFK7i0Fu7cfxD4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=cYgSpX87nbhBrUDBULA2dbUR8l8=; b=TNepx12/XLD7rr7bOMc7 brmG/kwjdMjoXaZRAX28ZR53XvMBrJkFY62TdLNPTxot6H7aNSVhlG1JeL/nZo8V Sy1yQMcIVdP3NsnnYcB0fBuTDxBLH+RDzty34jy4mrGgJELZW+UJ8FRoeO25MT3n oyUszlyHfGztHNw5zpuTEIc= Received: (qmail 4417 invoked by alias); 23 Jan 2014 12:41:39 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 4400 invoked by uid 89); 23 Jan 2014 12:41:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Jan 2014 12:41:37 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0NCfY2v009994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 Jan 2014 07:41:35 -0500 Received: from localhost (vpn1-5-187.ams2.redhat.com [10.36.5.187]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0NCfX18029200; Thu, 23 Jan 2014 07:41:34 -0500 Date: Thu, 23 Jan 2014 12:41:33 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] Update libstdc++ FAQ Message-ID: <20140123124133.GA26761@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) This expands the FAQ answer on dynamic linking, to be more explicit for people who don't understand the concepts. It also corrects an incorrect symver in abi.xml * doc/xml/faq.xml (a-how_to_set_paths): Expand FAQ answer. * doc/xml/manual/abi.xml (abi.versioning.history): Correct symver. Tested with doc-xml-validate-docbook and doc-html-docbook, comitted to trunk. commit 130bb045a16d0054290641c94a6c6b6948adc9e5 Author: Jonathan Wakely Date: Thu Jan 23 12:22:16 2014 +0000 * doc/xml/faq.xml (a-how_to_set_paths): Expand FAQ answer. * doc/xml/manual/abi.xml (abi.versioning.history): Correct symver. diff --git a/libstdc++-v3/doc/xml/faq.xml b/libstdc++-v3/doc/xml/faq.xml index 501f161..b4a53a2 100644 --- a/libstdc++-v3/doc/xml/faq.xml +++ b/libstdc++-v3/doc/xml/faq.xml @@ -344,7 +344,7 @@ Depending on your platform and library version, the error message might be similar to one of the following: - + ./a.out: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory @@ -358,11 +358,34 @@ executable is run the linker finds and loads the required shared libraries by searching a pre-configured list of directories. If the directory where you've installed libstdc++ is not in this list - then the libraries won't be found. The simplest way to fix this is + then the libraries won't be found. + + + + If you already have an older version of libstdc++ installed then the + error might look like one of the following instead: + + + + ./a.out: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found + ./a.out: /usr/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found + + + + This means the linker found /usr/lib/libstdc++.so.6 + but that library belongs to an older version of GCC than was used to + compile and link the program a.out (or some part + of it). The program depends on code defined in the newer libstdc++ + that belongs to the newer version of GCC, so the linker must be told + how to find the newer libstdc++ shared library. + + + + The simplest way to fix this is to use the LD_LIBRARY_PATH environment variable, which is a colon-separated list of directories in which the linker will search for shared libraries: - + LD_LIBRARY_PATH=${prefix}/lib:$LD_LIBRARY_PATH @@ -370,6 +393,11 @@ + Here the shell variable ${prefix} is assumed to contain + the directory prefix where GCC was installed to. The directory containing + the library might depend on whether you want the 32-bit or 64-bit copy + of the library, so for example would be + ${prefix}/lib64 on some systems. The exact environment variable to use will depend on your platform, e.g. DYLD_LIBRARY_PATH for Darwin, LD_LIBRARY_PATH_32/LD_LIBRARY_PATH_64 for Solaris 32-/64-bit @@ -379,7 +407,8 @@ See the man pages for ld, ldd and ldconfig for more information. The dynamic linker has different names on different platforms but the man page - is usually called something such as ld.so/rtld/dld.so. + is usually called something such as ld.so, + rtld or dld.so. Using LD_LIBRARY_PATH is not always the best solution, Finding Dynamic or Shared diff --git a/libstdc++-v3/doc/xml/manual/abi.xml b/libstdc++-v3/doc/xml/manual/abi.xml index 25d1b30..d1c622c 100644 --- a/libstdc++-v3/doc/xml/manual/abi.xml +++ b/libstdc++-v3/doc/xml/manual/abi.xml @@ -328,7 +328,7 @@ compatible. GCC 4.7.0: GLIBCXX_3.4.17, CXXABI_1.3.6 GCC 4.8.0: GLIBCXX_3.4.18, CXXABI_1.3.7 GCC 4.8.3: GLIBCXX_3.4.19, CXXABI_1.3.7 - GCC 4.9.0: GLIBCXX_3.4.20, CXXABI_1.3.7 + GCC 4.9.0: GLIBCXX_3.4.20, CXXABI_1.3.8