toolkit/crashreporter/google-breakpad/src/third_party/glog/INSTALL

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 Installation Instructions
michael@0 2 *************************
michael@0 3
michael@0 4 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
michael@0 5 2006, 2007 Free Software Foundation, Inc.
michael@0 6
michael@0 7 This file is free documentation; the Free Software Foundation gives
michael@0 8 unlimited permission to copy, distribute and modify it.
michael@0 9
michael@0 10 Glog-Specific Install Notes
michael@0 11 ================================
michael@0 12
michael@0 13 *** NOTE FOR 64-BIT LINUX SYSTEMS
michael@0 14
michael@0 15 The glibc built-in stack-unwinder on 64-bit systems has some problems
michael@0 16 with the glog libraries. (In particular, if you are using
michael@0 17 InstallFailureSignalHandler(), the signal may be raised in the middle
michael@0 18 of malloc, holding some malloc-related locks when they invoke the
michael@0 19 stack unwinder. The built-in stack unwinder may call malloc
michael@0 20 recursively, which may require the thread to acquire a lock it already
michael@0 21 holds: deadlock.)
michael@0 22
michael@0 23 For that reason, if you use a 64-bit system and you need
michael@0 24 InstallFailureSignalHandler(), we strongly recommend you install
michael@0 25 libunwind before trying to configure or install google glog.
michael@0 26 libunwind can be found at
michael@0 27
michael@0 28 http://download.savannah.nongnu.org/releases/libunwind/libunwind-snap-070410.tar.gz
michael@0 29
michael@0 30 Even if you already have libunwind installed, you will probably still
michael@0 31 need to install from the snapshot to get the latest version.
michael@0 32
michael@0 33 CAUTION: if you install libunwind from the URL above, be aware that
michael@0 34 you may have trouble if you try to statically link your binary with
michael@0 35 glog: that is, if you link with 'gcc -static -lgcc_eh ...'. This
michael@0 36 is because both libunwind and libgcc implement the same C++ exception
michael@0 37 handling APIs, but they implement them differently on some platforms.
michael@0 38 This is not likely to be a problem on ia64, but may be on x86-64.
michael@0 39
michael@0 40 Also, if you link binaries statically, make sure that you add
michael@0 41 -Wl,--eh-frame-hdr to your linker options. This is required so that
michael@0 42 libunwind can find the information generated by the compiler required
michael@0 43 for stack unwinding.
michael@0 44
michael@0 45 Using -static is rare, though, so unless you know this will affect you
michael@0 46 it probably won't.
michael@0 47
michael@0 48 If you cannot or do not wish to install libunwind, you can still try
michael@0 49 to use two kinds of stack-unwinder: 1. glibc built-in stack-unwinder
michael@0 50 and 2. frame pointer based stack-unwinder.
michael@0 51
michael@0 52 1. As we already mentioned, glibc's unwinder has a deadlock issue.
michael@0 53 However, if you don't use InstallFailureSignalHandler() or you don't
michael@0 54 worry about the rare possibilities of deadlocks, you can use this
michael@0 55 stack-unwinder. If you specify no options and libunwind isn't
michael@0 56 detected on your system, the configure script chooses this unwinder by
michael@0 57 default.
michael@0 58
michael@0 59 2. The frame pointer based stack unwinder requires that your
michael@0 60 application, the glog library, and system libraries like libc, all be
michael@0 61 compiled with a frame pointer. This is *not* the default for x86-64.
michael@0 62
michael@0 63 If you are on x86-64 system, know that you have a set of system
michael@0 64 libraries with frame-pointers enabled, and compile all your
michael@0 65 applications with -fno-omit-frame-pointer, then you can enable the
michael@0 66 frame pointer based stack unwinder by passing the
michael@0 67 --enable-frame-pointers flag to configure.
michael@0 68
michael@0 69
michael@0 70 Basic Installation
michael@0 71 ==================
michael@0 72
michael@0 73 Briefly, the shell commands `./configure; make; make install' should
michael@0 74 configure, build, and install this package. The following
michael@0 75 more-detailed instructions are generic; see the `README' file for
michael@0 76 instructions specific to this package.
michael@0 77
michael@0 78 The `configure' shell script attempts to guess correct values for
michael@0 79 various system-dependent variables used during compilation. It uses
michael@0 80 those values to create a `Makefile' in each directory of the package.
michael@0 81 It may also create one or more `.h' files containing system-dependent
michael@0 82 definitions. Finally, it creates a shell script `config.status' that
michael@0 83 you can run in the future to recreate the current configuration, and a
michael@0 84 file `config.log' containing compiler output (useful mainly for
michael@0 85 debugging `configure').
michael@0 86
michael@0 87 It can also use an optional file (typically called `config.cache'
michael@0 88 and enabled with `--cache-file=config.cache' or simply `-C') that saves
michael@0 89 the results of its tests to speed up reconfiguring. Caching is
michael@0 90 disabled by default to prevent problems with accidental use of stale
michael@0 91 cache files.
michael@0 92
michael@0 93 If you need to do unusual things to compile the package, please try
michael@0 94 to figure out how `configure' could check whether to do them, and mail
michael@0 95 diffs or instructions to the address given in the `README' so they can
michael@0 96 be considered for the next release. If you are using the cache, and at
michael@0 97 some point `config.cache' contains results you don't want to keep, you
michael@0 98 may remove or edit it.
michael@0 99
michael@0 100 The file `configure.ac' (or `configure.in') is used to create
michael@0 101 `configure' by a program called `autoconf'. You need `configure.ac' if
michael@0 102 you want to change it or regenerate `configure' using a newer version
michael@0 103 of `autoconf'.
michael@0 104
michael@0 105 The simplest way to compile this package is:
michael@0 106
michael@0 107 1. `cd' to the directory containing the package's source code and type
michael@0 108 `./configure' to configure the package for your system.
michael@0 109
michael@0 110 Running `configure' might take a while. While running, it prints
michael@0 111 some messages telling which features it is checking for.
michael@0 112
michael@0 113 2. Type `make' to compile the package.
michael@0 114
michael@0 115 3. Optionally, type `make check' to run any self-tests that come with
michael@0 116 the package.
michael@0 117
michael@0 118 4. Type `make install' to install the programs and any data files and
michael@0 119 documentation.
michael@0 120
michael@0 121 5. You can remove the program binaries and object files from the
michael@0 122 source code directory by typing `make clean'. To also remove the
michael@0 123 files that `configure' created (so you can compile the package for
michael@0 124 a different kind of computer), type `make distclean'. There is
michael@0 125 also a `make maintainer-clean' target, but that is intended mainly
michael@0 126 for the package's developers. If you use it, you may have to get
michael@0 127 all sorts of other programs in order to regenerate files that came
michael@0 128 with the distribution.
michael@0 129
michael@0 130 6. Often, you can also type `make uninstall' to remove the installed
michael@0 131 files again.
michael@0 132
michael@0 133 Compilers and Options
michael@0 134 =====================
michael@0 135
michael@0 136 Some systems require unusual options for compilation or linking that the
michael@0 137 `configure' script does not know about. Run `./configure --help' for
michael@0 138 details on some of the pertinent environment variables.
michael@0 139
michael@0 140 You can give `configure' initial values for configuration parameters
michael@0 141 by setting variables in the command line or in the environment. Here
michael@0 142 is an example:
michael@0 143
michael@0 144 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
michael@0 145
michael@0 146 *Note Defining Variables::, for more details.
michael@0 147
michael@0 148 Compiling For Multiple Architectures
michael@0 149 ====================================
michael@0 150
michael@0 151 You can compile the package for more than one kind of computer at the
michael@0 152 same time, by placing the object files for each architecture in their
michael@0 153 own directory. To do this, you can use GNU `make'. `cd' to the
michael@0 154 directory where you want the object files and executables to go and run
michael@0 155 the `configure' script. `configure' automatically checks for the
michael@0 156 source code in the directory that `configure' is in and in `..'.
michael@0 157
michael@0 158 With a non-GNU `make', it is safer to compile the package for one
michael@0 159 architecture at a time in the source code directory. After you have
michael@0 160 installed the package for one architecture, use `make distclean' before
michael@0 161 reconfiguring for another architecture.
michael@0 162
michael@0 163 Installation Names
michael@0 164 ==================
michael@0 165
michael@0 166 By default, `make install' installs the package's commands under
michael@0 167 `/usr/local/bin', include files under `/usr/local/include', etc. You
michael@0 168 can specify an installation prefix other than `/usr/local' by giving
michael@0 169 `configure' the option `--prefix=PREFIX'.
michael@0 170
michael@0 171 You can specify separate installation prefixes for
michael@0 172 architecture-specific files and architecture-independent files. If you
michael@0 173 pass the option `--exec-prefix=PREFIX' to `configure', the package uses
michael@0 174 PREFIX as the prefix for installing programs and libraries.
michael@0 175 Documentation and other data files still use the regular prefix.
michael@0 176
michael@0 177 In addition, if you use an unusual directory layout you can give
michael@0 178 options like `--bindir=DIR' to specify different values for particular
michael@0 179 kinds of files. Run `configure --help' for a list of the directories
michael@0 180 you can set and what kinds of files go in them.
michael@0 181
michael@0 182 If the package supports it, you can cause programs to be installed
michael@0 183 with an extra prefix or suffix on their names by giving `configure' the
michael@0 184 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
michael@0 185
michael@0 186 Optional Features
michael@0 187 =================
michael@0 188
michael@0 189 Some packages pay attention to `--enable-FEATURE' options to
michael@0 190 `configure', where FEATURE indicates an optional part of the package.
michael@0 191 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
michael@0 192 is something like `gnu-as' or `x' (for the X Window System). The
michael@0 193 `README' should mention any `--enable-' and `--with-' options that the
michael@0 194 package recognizes.
michael@0 195
michael@0 196 For packages that use the X Window System, `configure' can usually
michael@0 197 find the X include and library files automatically, but if it doesn't,
michael@0 198 you can use the `configure' options `--x-includes=DIR' and
michael@0 199 `--x-libraries=DIR' to specify their locations.
michael@0 200
michael@0 201 Specifying the System Type
michael@0 202 ==========================
michael@0 203
michael@0 204 There may be some features `configure' cannot figure out automatically,
michael@0 205 but needs to determine by the type of machine the package will run on.
michael@0 206 Usually, assuming the package is built to be run on the _same_
michael@0 207 architectures, `configure' can figure that out, but if it prints a
michael@0 208 message saying it cannot guess the machine type, give it the
michael@0 209 `--build=TYPE' option. TYPE can either be a short name for the system
michael@0 210 type, such as `sun4', or a canonical name which has the form:
michael@0 211
michael@0 212 CPU-COMPANY-SYSTEM
michael@0 213
michael@0 214 where SYSTEM can have one of these forms:
michael@0 215
michael@0 216 OS KERNEL-OS
michael@0 217
michael@0 218 See the file `config.sub' for the possible values of each field. If
michael@0 219 `config.sub' isn't included in this package, then this package doesn't
michael@0 220 need to know the machine type.
michael@0 221
michael@0 222 If you are _building_ compiler tools for cross-compiling, you should
michael@0 223 use the option `--target=TYPE' to select the type of system they will
michael@0 224 produce code for.
michael@0 225
michael@0 226 If you want to _use_ a cross compiler, that generates code for a
michael@0 227 platform different from the build platform, you should specify the
michael@0 228 "host" platform (i.e., that on which the generated programs will
michael@0 229 eventually be run) with `--host=TYPE'.
michael@0 230
michael@0 231 Sharing Defaults
michael@0 232 ================
michael@0 233
michael@0 234 If you want to set default values for `configure' scripts to share, you
michael@0 235 can create a site shell script called `config.site' that gives default
michael@0 236 values for variables like `CC', `cache_file', and `prefix'.
michael@0 237 `configure' looks for `PREFIX/share/config.site' if it exists, then
michael@0 238 `PREFIX/etc/config.site' if it exists. Or, you can set the
michael@0 239 `CONFIG_SITE' environment variable to the location of the site script.
michael@0 240 A warning: not all `configure' scripts look for a site script.
michael@0 241
michael@0 242 Defining Variables
michael@0 243 ==================
michael@0 244
michael@0 245 Variables not defined in a site shell script can be set in the
michael@0 246 environment passed to `configure'. However, some packages may run
michael@0 247 configure again during the build, and the customized values of these
michael@0 248 variables may be lost. In order to avoid this problem, you should set
michael@0 249 them in the `configure' command line, using `VAR=value'. For example:
michael@0 250
michael@0 251 ./configure CC=/usr/local2/bin/gcc
michael@0 252
michael@0 253 causes the specified `gcc' to be used as the C compiler (unless it is
michael@0 254 overridden in the site shell script).
michael@0 255
michael@0 256 Unfortunately, this technique does not work for `CONFIG_SHELL' due to
michael@0 257 an Autoconf bug. Until the bug is fixed you can use this workaround:
michael@0 258
michael@0 259 CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
michael@0 260
michael@0 261 `configure' Invocation
michael@0 262 ======================
michael@0 263
michael@0 264 `configure' recognizes the following options to control how it operates.
michael@0 265
michael@0 266 `--help'
michael@0 267 `-h'
michael@0 268 Print a summary of the options to `configure', and exit.
michael@0 269
michael@0 270 `--version'
michael@0 271 `-V'
michael@0 272 Print the version of Autoconf used to generate the `configure'
michael@0 273 script, and exit.
michael@0 274
michael@0 275 `--cache-file=FILE'
michael@0 276 Enable the cache: use and save the results of the tests in FILE,
michael@0 277 traditionally `config.cache'. FILE defaults to `/dev/null' to
michael@0 278 disable caching.
michael@0 279
michael@0 280 `--config-cache'
michael@0 281 `-C'
michael@0 282 Alias for `--cache-file=config.cache'.
michael@0 283
michael@0 284 `--quiet'
michael@0 285 `--silent'
michael@0 286 `-q'
michael@0 287 Do not print messages saying which checks are being made. To
michael@0 288 suppress all normal output, redirect it to `/dev/null' (any error
michael@0 289 messages will still be shown).
michael@0 290
michael@0 291 `--srcdir=DIR'
michael@0 292 Look for the package's source code in directory DIR. Usually
michael@0 293 `configure' can determine that directory automatically.
michael@0 294
michael@0 295 `configure' also accepts some other, not widely useful, options. Run
michael@0 296 `configure --help' for more details.
michael@0 297

mercurial