From patchwork Thu Dec 22 00:23:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 132762 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]) by ozlabs.org (Postfix) with SMTP id 6D028B7142 for ; Thu, 22 Dec 2011 11:24:18 +1100 (EST) Received: (qmail 7930 invoked by alias); 22 Dec 2011 00:24:15 -0000 Received: (qmail 7918 invoked by uid 22791); 22 Dec 2011 00:24:13 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Dec 2011 00:24:00 +0000 Received: by wgbdr1 with SMTP id dr1so13444381wgb.8 for ; Wed, 21 Dec 2011 16:23:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.206.66 with SMTP id ft2mr8362622wbb.8.1324513437549; Wed, 21 Dec 2011 16:23:57 -0800 (PST) Received: by 10.216.69.7 with HTTP; Wed, 21 Dec 2011 16:23:57 -0800 (PST) Date: Thu, 22 Dec 2011 00:23:57 +0000 Message-ID: Subject: adjust installation docs to discourage installing GMP, MPFR and MPC separately From: Jonathan Wakely To: gcc-patches 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 The most frequently asked question on gcc-help, and a frequently reported "bug" in bugzilla, is http://gcc.gnu.org/wiki/FAQ#configure_suffix It is almost always caused by installing libgmp.so etc. in a non-standard location and not using ldconfig, DT_RUNPATH, $LD_LIBRARY_PATH or some other method to tell the dynamic linker how to find them. The current installation docs mention --with-gmp right away, which probably gives the impression that it's the recommended method, whereas it actually causes problems for the majority of users who don't understand dynamic linker search paths. I think rewording the installation docs to suggest building the support libs as part of GCC first, and only using --with-gmp second, might steer people in the right direction. Separately, I also plan to write an "Installing GCC" page on the GCC wiki which (among other things) discourages installing the support libraries by hand, recommending installing prebuilt packages in standard system dirs instead, or if that's not an option then using contrib/download_prerequisites to get the sources and build them in-tree. * doc/install.text (Prerequisites): Suggest building GMP, MPFR and MPC as part of GCC before describing configuring with --with-gmp etc. Tested by running "make doc" and viewing the resulting .info pages, OK for trunk? Index: doc/install.texi =================================================================== --- doc/install.texi (revision 182452) +++ doc/install.texi (working copy) @@ -333,32 +333,35 @@ newer versions, though. @table @asis @item GNU Multiple Precision Library (GMP) version 4.3.2 (or later) -Necessary to build GCC@. If you do not have it installed in your +Necessary to build GCC@. If a GMP source distribution is found in a +subdirectory of your GCC sources named @file{gmp}, it will be built +together with GCC, this avoids the need to build GMP separately. +Alternatively, if GMP is already installed but it is not in your library search path, you will have to configure with the @option{--with-gmp} configure option. See also @option{--with-gmp-lib} -and @option{--with-gmp-include}. Alternatively, if a GMP source -distribution is found in a subdirectory of your GCC sources named -@file{gmp}, it will be built together with GCC@. +and @option{--with-gmp-include}. @item MPFR Library version 2.4.2 (or later) Necessary to build GCC@. It can be downloaded from -@uref{http://www.mpfr.org/}. The @option{--with-mpfr} configure -option should be used if your MPFR Library is not installed in your -default library search path. See also @option{--with-mpfr-lib} and -@option{--with-mpfr-include}. Alternatively, if a MPFR source -distribution is found in a subdirectory of your GCC sources named -@file{mpfr}, it will be built together with GCC@. +@uref{http://www.mpfr.org/}. If an MPFR source distribution is found +in a subdirectory of your GCC sources named @file{mpfr}, it will be +built together with GCC, this avoids the need to build MPFR separately. +Alternatively, if MPFR is already installed but it is not in your +default library search path, the @option{--with-mpfr} configure +option should be used. See also @option{--with-mpfr-lib} and +@option{--with-mpfr-include}. @item MPC Library version 0.8.1 (or later) Necessary to build GCC@. It can be downloaded from -@uref{http://www.multiprecision.org/}. The @option{--with-mpc} -configure option should be used if your MPC Library is not installed -in your default library search path. See also @option{--with-mpc-lib} -and @option{--with-mpc-include}. Alternatively, if an MPC source -distribution is found in a subdirectory of your GCC sources named -@file{mpc}, it will be built together with GCC@. +@uref{http://www.multiprecision.org/}. If an MPC source distribution +is found in a subdirectory of your GCC sources named @file{mpc}, it +will be built together with GCC, this avoids the need to build MPC +separately. Alternatively, if MPC is already installed but it is +not in your default library search path, the @option{--with-mpc} +configure option should be used. See also @option{--with-mpc-lib} +and @option{--with-mpc-include}. @item Parma Polyhedra Library (PPL) version 0.11