glog编译安装mac版

glog是谷歌的日志输出库,而且是跨平台的,windows, macos, linux都可以使用,本篇介绍glog在macos环境下的编译。

1.到github上下载源码

https://github.com/google/glog/tree/v0.4.0

解压后切换到该目录下

MacdeMac-mini:tools macmini$ cd glog-0.4.0

MacdeMac-mini:glog-0.4.0 macmini$ pwd

/Users/macmini/tools/glog-0.4.0

执行./autogen.sh

MacdeMac-mini:glog-0.4.0 macmini$ ./autogen.sh

./autogen.sh: line 5: autoreconf: command not found

autoconf没有安装

使用brew安装autoconf和autoreconf

MacdeMac-mini:local macmini$ brew install autoconf
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/m4-1.4.18.c
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/autoconf-2.
######################################################################## 100.0%
==> Installing dependencies for autoconf: m4
==> Installing autoconf dependency: m4
==> Pouring m4-1.4.18.catalina.bottle.1.tar.gz
🍺  /usr/local/Cellar/m4/1.4.18: 13 files, 672.3KB
==> Installing autoconf
==> Pouring autoconf-2.71.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/autoconf/2.71: 71 files, 3.2MB
MacdeMac-mini:local macmini$ whereis autoconf

MacdeMac-mini:bin macmini$ pwd

/usr/local/Cellar/autoconf/2.71/bin

MacdeMac-mini:bin macmini$ ./autoconf --help
Usage: ./autoconf [OPTION]... [TEMPLATE-FILE]

Generate a configuration script from a TEMPLATE-FILE if given, or
'configure.ac' if present, or else 'configure.in'.  Output is sent
to the standard output if TEMPLATE-FILE is given, else into
'configure'.

Operation modes:
  -h, --help                print this help, then exit
  -V, --version             print version number, then exit
  -v, --verbose             verbosely report processing
  -d, --debug               don't remove temporary files
  -f, --force               consider all files obsolete
  -o, --output=FILE         save output in FILE (stdout is the default)
  -W, --warnings=CATEGORY   report the warnings falling in CATEGORY

Warning categories include:
  cross                  cross compilation issues
  gnu                    GNU coding standards (default in gnu and gnits modes)
  obsolete               obsolete features or constructions (default)
  override               user redefinitions of Automake rules or variables
  portability            portability issues (default in gnu and gnits modes)
  portability-recursive  nested Make variables (default with -Wportability)
  extra-portability      extra portability issues related to obscure tools
  syntax                 dubious syntactic constructs (default)
  unsupported            unsupported or incomplete features (default)
  all                    all the warnings
  no-CATEGORY            turn off warnings in CATEGORY
  none                   turn off all the warnings

The environment variables 'M4' and 'WARNINGS' are honored.

Library directories:
  -B, --prepend-include=DIR  prepend directory DIR to search path
  -I, --include=DIR          append directory DIR to search path

Tracing:
  -t, --trace=MACRO[:FORMAT]  report the list of calls to MACRO
  -i, --initialization        also trace Autoconf's initialization process

In tracing mode, no configuration script is created.  FORMAT defaults
to '$f:$l:$n:$%'; see 'autom4te --help' for information about FORMAT.

Report bugs to <bug-autoconf@gnu.org>.
GNU Autoconf home page: <https://www.gnu.org/software/autoconf/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
MacdeMac-mini:bin macmini$ 

2.设置环境变量

切换到用户目录

MacdeMac-mini:bin macmini$ cd

打开 .bash_profile文件

MacdeMac-mini:~ macmini$ vim .bash_profile

输入

export GLOG_HOME=/usr/local/Cellar/autoconf/2.71

export PATH=$PATH:$GLOG_HOME/bin

执行

source .bash_profile

命令,环境变量立即生效

MacdeMac-mini:glog-0.4.0 macmini$ autoconf -V

autoconf (GNU Autoconf) 2.71

Copyright (C) 2021 Free Software Foundation, Inc.

License GPLv3+/Autoconf: GNU GPL version 3 or later

<https://gnu.org/licenses/gpl.html>, <https://gnu.org/licenses/exceptions.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

MacdeMac-mini:third_party macmini$

MacdeMac-mini:glog-0.4.0 macmini$ ./autogen.sh

Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.71/share/autoconf/Autom4te/FileUtils.pm line 274.

autoreconf: error: aclocal failed with exit status: 2

----------------------------------------------

`aclocal' is part of automake package, try to install it first.
所以,下载了automake之后,编译、安装,在执行就正常了

----------------------------------------------

安装automake

MacdeMac-mini:bin macmini$ brew install automake

==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/automake-1.

#=#=#

curl: (22) The requested URL returned error: 404

Warning: Bottle missing, falling back to the default domain...

==> Downloading https://ghcr.io/v2/homebrew/core/automake/manifests/1.16.3_1

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/automake/blobs/sha256:5f83d4723

==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh

######################################################################## 100.0%

==> Pouring automake--1.16.3_1.catalina.bottle.tar.gz

🍺 /usr/local/Cellar/automake/1.16.3_1: 131 files, 3.4MB

执行./autogen.sh

MacdeMac-mini:glog-0.4.0 macmini$ ./autogen.sh 
configure.ac:14: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:14: You should use the 'AC_CONFIG_HEADERS' macro instead.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:727: AM_CONFIG_HEADER is expanded from...
configure.ac:14: the top level
configure.ac:28: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:28: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:28: the top level
configure.ac:83: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:83: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
m4/ac_have_attribute.m4:1: AX_C___ATTRIBUTE__ is expanded from...
configure.ac:83: the top level
configure.ac:95: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:95: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
m4/ac_have_builtin_expect.m4:1: AX_C___BUILTIN_EXPECT is expanded from...
configure.ac:95: the top level
configure.ac:102: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:102: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
m4/ac_have_sync_val_compare_and_swap.m4:1: AX_C___SYNC_VAL_COMPARE_AND_SWAP is expanded from...
configure.ac:102: the top level
configure.ac:124: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:124: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
m4/acx_pthread.m4:63: ACX_PTHREAD is expanded from...
configure.ac:124: the top level
configure.ac:124: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:124: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
m4/acx_pthread.m4:63: ACX_PTHREAD is expanded from...
configure.ac:124: the top level
configure.ac:197: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:197: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/ac_rwlock.m4:15: AC_RWLOCK is expanded from...
configure.ac:197: the top level
configure.ac:197: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:197: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/ac_rwlock.m4:15: AC_RWLOCK is expanded from...
configure.ac:197: the top level
configure.ac:201: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
configure.ac:201: You should run autoupdate.
./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/namespaces.m4:2: AC_CXX_NAMESPACES is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/stl_namespace.m4:3: AC_CXX_STL_NAMESPACE is expanded from...
configure.ac:201: the top level
configure.ac:201: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:201: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/namespaces.m4:2: AC_CXX_NAMESPACES is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/stl_namespace.m4:3: AC_CXX_STL_NAMESPACE is expanded from...
configure.ac:201: the top level
configure.ac:201: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
configure.ac:201: You should run autoupdate.
./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/stl_namespace.m4:3: AC_CXX_STL_NAMESPACE is expanded from...
configure.ac:201: the top level
configure.ac:201: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:201: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/stl_namespace.m4:3: AC_CXX_STL_NAMESPACE is expanded from...
configure.ac:201: the top level
configure.ac:204: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
configure.ac:204: You should run autoupdate.
./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/using_operator.m4:1: AC_CXX_USING_OPERATOR is expanded from...
configure.ac:204: the top level
configure.ac:204: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:204: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/using_operator.m4:1: AC_CXX_USING_OPERATOR is expanded from...
configure.ac:204: the top level
configure.ac:206: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:206: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
m4/pc_from_ucontext.m4:12: AC_PC_FROM_UCONTEXT is expanded from...
configure.ac:206: the top level
configure.ac:246: warning: AC_OUTPUT should be used without arguments.
configure.ac:246: You should run autoupdate.
configure.ac:24: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: error: /usr/local/Cellar/autoconf/2.71/bin/autoconf failed with exit status: 1
MacdeMac-mini:glog-0.4.0 macmini$ ls

安装libtool

MacdeMac-mini:bin macmini$ brew install libtool

==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/libtool-2.4

#=#=#

curl: (22) The requested URL returned error: 404

Warning: Bottle missing, falling back to the default domain...

==> Downloading https://ghcr.io/v2/homebrew/core/libtool/manifests/2.4.6_3

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/libtool/blobs/sha256:9e4b12c137

==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh

######################################################################## 100.0%

==> Pouring libtool--2.4.6_3.catalina.bottle.tar.gz

==> Caveats

In order to prevent conflicts with Apple's own libtool we have prepended a "g"

so, you have instead: glibtool and glibtoolize.

==> Summary

🍺 /usr/local/Cellar/libtool/2.4.6_3: 71 files, 3.7MB

MacdeMac-mini:bin macmini$

MacdeMac-mini:glog-0.4.0 macmini$ ./autogen.sh 
glibtoolize: putting auxiliary files in '.'.
glibtoolize: copying file './ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltversion.m4'
configure.ac:14: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:14: You should use the 'AC_CONFIG_HEADERS' macro instead.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:727: AM_CONFIG_HEADER is expanded from...
configure.ac:14: the top level
configure.ac:24: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:24: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:24: the top level
configure.ac:28: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:28: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:28: the top level
configure.ac:83: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:83: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
m4/ac_have_attribute.m4:1: AX_C___ATTRIBUTE__ is expanded from...
configure.ac:83: the top level
configure.ac:95: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:95: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
m4/ac_have_builtin_expect.m4:1: AX_C___BUILTIN_EXPECT is expanded from...
configure.ac:95: the top level
configure.ac:102: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:102: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
m4/ac_have_sync_val_compare_and_swap.m4:1: AX_C___SYNC_VAL_COMPARE_AND_SWAP is expanded from...
configure.ac:102: the top level
configure.ac:124: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:124: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
m4/acx_pthread.m4:63: ACX_PTHREAD is expanded from...
configure.ac:124: the top level
configure.ac:124: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:124: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
m4/acx_pthread.m4:63: ACX_PTHREAD is expanded from...
configure.ac:124: the top level
configure.ac:197: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:197: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/ac_rwlock.m4:15: AC_RWLOCK is expanded from...
configure.ac:197: the top level
configure.ac:197: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:197: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/ac_rwlock.m4:15: AC_RWLOCK is expanded from...
configure.ac:197: the top level
configure.ac:201: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
configure.ac:201: You should run autoupdate.
./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/namespaces.m4:2: AC_CXX_NAMESPACES is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/stl_namespace.m4:3: AC_CXX_STL_NAMESPACE is expanded from...
configure.ac:201: the top level
configure.ac:201: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:201: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/namespaces.m4:2: AC_CXX_NAMESPACES is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/stl_namespace.m4:3: AC_CXX_STL_NAMESPACE is expanded from...
configure.ac:201: the top level
configure.ac:201: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
configure.ac:201: You should run autoupdate.
./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/stl_namespace.m4:3: AC_CXX_STL_NAMESPACE is expanded from...
configure.ac:201: the top level
configure.ac:201: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:201: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/stl_namespace.m4:3: AC_CXX_STL_NAMESPACE is expanded from...
configure.ac:201: the top level
configure.ac:204: warning: The macro `AC_LANG_CPLUSPLUS' is obsolete.
configure.ac:204: You should run autoupdate.
./lib/autoconf/c.m4:262: AC_LANG_CPLUSPLUS is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/using_operator.m4:1: AC_CXX_USING_OPERATOR is expanded from...
configure.ac:204: the top level
configure.ac:204: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:204: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/using_operator.m4:1: AC_CXX_USING_OPERATOR is expanded from...
configure.ac:204: the top level
configure.ac:206: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:206: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
m4/pc_from_ucontext.m4:12: AC_PC_FROM_UCONTEXT is expanded from...
configure.ac:206: the top level
configure.ac:246: warning: AC_OUTPUT should be used without arguments.
configure.ac:246: You should run autoupdate.
configure.ac:19: installing './compile'
configure.ac:24: installing './config.guess'
configure.ac:24: installing './config.sub'
configure.ac:13: installing './install-sh'
configure.ac:13: installing './missing'
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
MacdeMac-mini:glog-0.4.0 macmini$ 

生成configure成功

执行./configure命令生成Makefile文件

MacdeMac-mini:glog-0.4.0 macmini$ ./configure --prefix=/usr/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking build system type... x86_64-apple-darwin19.4.0
checking host system type... x86_64-apple-darwin19.4.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin19.4.0 file names to x86_64-apple-darwin19.4.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin19.4.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking for egrep... (cached) /usr/bin/grep -E
checking for stdint.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for pwd.h... yes
checking for unistd.h... (cached) yes
checking for syscall.h... no
checking for sys/syscall.h... yes
checking for execinfo.h... yes
checking for libunwind.h... yes
checking for ucontext.h... no
checking for sys/utsname.h... yes
checking for pwd.h... (cached) yes
checking for syslog.h... yes
checking for sys/time.h... yes
checking for glob.h... yes
checking for unwind.h... yes
checking for windows.h... no
checking size of void *... 8
checking for uint16_t... yes
checking for u_int16_t... yes
checking for __uint16... no
checking for sigaltstack... yes
checking for sigaction... yes
checking for dladdr... yes
checking for fcntl... yes
checking for pread... yes
checking for pwrite... yes
checking for __attribute__... yes
checking for __builtin_expect... yes
checking for __sync_val_compare_and_swap... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking whether to check for GCC pthread/shared inconsistencies... no
checking for pthread_self in -lpthread... yes
checking for main in -lgflags... no
checking for gtest-config... no
checking for main in -lgtest... no
checking for backtrace in -lunwind... no
checking support for pthread_rwlock_* functions... yes
checking whether the compiler implements namespaces... yes
checking what namespace STL code is in... std
checking whether compiler supports using ::operator<<... 1
checking for ucontext.h... (cached) no
checking for sys/ucontext.h... yes
checking how to access the program counter from a struct ucontext... uc_mcontext->__ss.__rip
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/glog/logging.h
config.status: creating src/glog/raw_logging.h
config.status: creating src/glog/vlog_is_on.h
config.status: creating src/glog/stl_logging.h
config.status: creating libglog.pc
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
MacdeMac-mini:glog-0.4.0 macmini$

make编译

MacdeMac-mini:glog-0.4.0 macmini$ make
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/logging_unittest-logging_unittest.o -MD -MP -MF src/.deps/logging_unittest-logging_unittest.Tpo -c -o src/logging_unittest-logging_unittest.o `test -f 'src/logging_unittest.cc' || echo './'`src/logging_unittest.cc
In file included from src/logging_unittest.cc:58:
./src/googletest.h:589:7: warning: 'operator new' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new(size_t size) {
      ^
                                throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:186:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_...
                                                                 ^
In file included from src/logging_unittest.cc:58:
./src/googletest.h:596:7: warning: 'operator new[]' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new[](size_t size) {
      ^
                                  throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:194:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::siz...
                                                                 ^
In file included from src/logging_unittest.cc:58:
./src/googletest.h:600:6: warning: 'operator delete' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete(void* p) {
     ^
                              throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:188:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
                                   ^
In file included from src/logging_unittest.cc:58:
./src/googletest.h:604:6: warning: 'operator delete[]' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete[](void* p) {
     ^
                                throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:196:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p) _NOEXCEPT;
                                   ^
src/logging_unittest.cc:1079:13: warning: unused function 'MyFatal' [-Wunused-function]
static void MyFatal() {
            ^
src/logging_unittest.cc:1082:13: warning: unused function 'MyCheck' [-Wunused-function]
static void MyCheck(bool a, bool b) {
            ^
6 warnings generated.
mv -f src/.deps/logging_unittest-logging_unittest.Tpo src/.deps/logging_unittest-logging_unittest.Po
/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src     -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -DNDEBUG -g -O2 -MT src/libglog_la-logging.lo -MD -MP -MF src/.deps/libglog_la-logging.Tpo -c -o src/libglog_la-logging.lo `test -f 'src/logging.cc' || echo './'`src/logging.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-logging.lo -MD -MP -MF src/.deps/libglog_la-logging.Tpo -c src/logging.cc  -fno-common -DPIC -o src/.libs/libglog_la-logging.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-logging.lo -MD -MP -MF src/.deps/libglog_la-logging.Tpo -c src/logging.cc -o src/libglog_la-logging.o >/dev/null 2>&1
mv -f src/.deps/libglog_la-logging.Tpo src/.deps/libglog_la-logging.Plo
/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src     -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -DNDEBUG -g -O2 -MT src/libglog_la-raw_logging.lo -MD -MP -MF src/.deps/libglog_la-raw_logging.Tpo -c -o src/libglog_la-raw_logging.lo `test -f 'src/raw_logging.cc' || echo './'`src/raw_logging.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-raw_logging.lo -MD -MP -MF src/.deps/libglog_la-raw_logging.Tpo -c src/raw_logging.cc  -fno-common -DPIC -o src/.libs/libglog_la-raw_logging.o
src/raw_logging.cc:139:3: warning: 'syscall' is deprecated: first deprecated in macOS 10.12 -
      syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace
      use kdebug_signpost(). [-Wdeprecated-declarations]
  safe_write(STDERR_FILENO, buffer, strlen(buffer));
  ^
src/raw_logging.cc:63:34: note: expanded from macro 'safe_write'
# define safe_write(fd, s, len)  syscall(SYS_write, fd, s, len)
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:742:6: note: 
      'syscall' has been explicitly marked deprecated here
int      syscall(int, ...);
         ^
1 warning generated.
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-raw_logging.lo -MD -MP -MF src/.deps/libglog_la-raw_logging.Tpo -c src/raw_logging.cc -o src/libglog_la-raw_logging.o >/dev/null 2>&1
mv -f src/.deps/libglog_la-raw_logging.Tpo src/.deps/libglog_la-raw_logging.Plo
/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src     -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -DNDEBUG -g -O2 -MT src/libglog_la-vlog_is_on.lo -MD -MP -MF src/.deps/libglog_la-vlog_is_on.Tpo -c -o src/libglog_la-vlog_is_on.lo `test -f 'src/vlog_is_on.cc' || echo './'`src/vlog_is_on.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-vlog_is_on.lo -MD -MP -MF src/.deps/libglog_la-vlog_is_on.Tpo -c src/vlog_is_on.cc  -fno-common -DPIC -o src/.libs/libglog_la-vlog_is_on.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-vlog_is_on.lo -MD -MP -MF src/.deps/libglog_la-vlog_is_on.Tpo -c src/vlog_is_on.cc -o src/libglog_la-vlog_is_on.o >/dev/null 2>&1
mv -f src/.deps/libglog_la-vlog_is_on.Tpo src/.deps/libglog_la-vlog_is_on.Plo
/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src     -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -DNDEBUG -g -O2 -MT src/libglog_la-utilities.lo -MD -MP -MF src/.deps/libglog_la-utilities.Tpo -c -o src/libglog_la-utilities.lo `test -f 'src/utilities.cc' || echo './'`src/utilities.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-utilities.lo -MD -MP -MF src/.deps/libglog_la-utilities.Tpo -c src/utilities.cc  -fno-common -DPIC -o src/.libs/libglog_la-utilities.o
src/utilities.cc:262:17: warning: 'syscall' is deprecated: first deprecated in macOS 10.12 -
      syscall(2) is unsupported; please switch to a supported interface. For SYS_kdebug_trace
      use kdebug_signpost(). [-Wdeprecated-declarations]
    pid_t tid = syscall(__NR_gettid);
                ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:742:6: note: 
      'syscall' has been explicitly marked deprecated here
int      syscall(int, ...);
         ^
1 warning generated.
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-utilities.lo -MD -MP -MF src/.deps/libglog_la-utilities.Tpo -c src/utilities.cc -o src/libglog_la-utilities.o >/dev/null 2>&1
mv -f src/.deps/libglog_la-utilities.Tpo src/.deps/libglog_la-utilities.Plo
/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src     -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -DNDEBUG -g -O2 -MT src/libglog_la-demangle.lo -MD -MP -MF src/.deps/libglog_la-demangle.Tpo -c -o src/libglog_la-demangle.lo `test -f 'src/demangle.cc' || echo './'`src/demangle.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-demangle.lo -MD -MP -MF src/.deps/libglog_la-demangle.Tpo -c src/demangle.cc  -fno-common -DPIC -o src/.libs/libglog_la-demangle.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-demangle.lo -MD -MP -MF src/.deps/libglog_la-demangle.Tpo -c src/demangle.cc -o src/libglog_la-demangle.o >/dev/null 2>&1
mv -f src/.deps/libglog_la-demangle.Tpo src/.deps/libglog_la-demangle.Plo
/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src     -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -DNDEBUG -g -O2 -MT src/libglog_la-symbolize.lo -MD -MP -MF src/.deps/libglog_la-symbolize.Tpo -c -o src/libglog_la-symbolize.lo `test -f 'src/symbolize.cc' || echo './'`src/symbolize.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-symbolize.lo -MD -MP -MF src/.deps/libglog_la-symbolize.Tpo -c src/symbolize.cc  -fno-common -DPIC -o src/.libs/libglog_la-symbolize.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-symbolize.lo -MD -MP -MF src/.deps/libglog_la-symbolize.Tpo -c src/symbolize.cc -o src/libglog_la-symbolize.o >/dev/null 2>&1
mv -f src/.deps/libglog_la-symbolize.Tpo src/.deps/libglog_la-symbolize.Plo
/bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I./src  -I./src     -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -DNDEBUG -g -O2 -MT src/libglog_la-signalhandler.lo -MD -MP -MF src/.deps/libglog_la-signalhandler.Tpo -c -o src/libglog_la-signalhandler.lo `test -f 'src/signalhandler.cc' || echo './'`src/signalhandler.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-signalhandler.lo -MD -MP -MF src/.deps/libglog_la-signalhandler.Tpo -c src/signalhandler.cc  -fno-common -DPIC -o src/.libs/libglog_la-signalhandler.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./src -I./src -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -DNDEBUG -g -O2 -MT src/libglog_la-signalhandler.lo -MD -MP -MF src/.deps/libglog_la-signalhandler.Tpo -c src/signalhandler.cc -o src/libglog_la-signalhandler.o >/dev/null 2>&1
mv -f src/.deps/libglog_la-signalhandler.Tpo src/.deps/libglog_la-signalhandler.Plo
/bin/sh ./libtool  --tag=CXX   --mode=link g++    -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -DNDEBUG -g -O2    -o libglog.la -rpath /usr/local/lib  src/libglog_la-logging.lo src/libglog_la-raw_logging.lo src/libglog_la-vlog_is_on.lo src/libglog_la-utilities.lo src/libglog_la-demangle.lo src/libglog_la-symbolize.lo src/libglog_la-signalhandler.lo     -lpthread 
libtool: link: g++ -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libglog.0.dylib  src/.libs/libglog_la-logging.o src/.libs/libglog_la-raw_logging.o src/.libs/libglog_la-vlog_is_on.o src/.libs/libglog_la-utilities.o src/.libs/libglog_la-demangle.o src/.libs/libglog_la-symbolize.o src/.libs/libglog_la-signalhandler.o   -lpthread  -g -O2   -install_name  /usr/local/lib/libglog.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-single_module
libtool: link: (cd ".libs" && rm -f "libglog.dylib" && ln -s "libglog.0.dylib" "libglog.dylib")
libtool: link: ar cru .libs/libglog.a  src/libglog_la-logging.o src/libglog_la-raw_logging.o src/libglog_la-vlog_is_on.o src/libglog_la-utilities.o src/libglog_la-demangle.o src/libglog_la-symbolize.o src/libglog_la-signalhandler.o
libtool: link: ranlib .libs/libglog.a
libtool: link: ( cd ".libs" && rm -f "libglog.la" && ln -s "../libglog.la" "libglog.la" )
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o logging_unittest  src/logging_unittest-logging_unittest.o  libglog.la       -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/logging_unittest src/logging_unittest-logging_unittest.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/demangle_unittest-demangle_unittest.o -MD -MP -MF src/.deps/demangle_unittest-demangle_unittest.Tpo -c -o src/demangle_unittest-demangle_unittest.o `test -f 'src/demangle_unittest.cc' || echo './'`src/demangle_unittest.cc
In file included from src/demangle_unittest.cc:41:
./src/googletest.h:589:7: warning: 'operator new' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new(size_t size) {
      ^
                                throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:186:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_...
                                                                 ^
In file included from src/demangle_unittest.cc:41:
./src/googletest.h:596:7: warning: 'operator new[]' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new[](size_t size) {
      ^
                                  throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:194:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::siz...
                                                                 ^
In file included from src/demangle_unittest.cc:41:
./src/googletest.h:600:6: warning: 'operator delete' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete(void* p) {
     ^
                              throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:188:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
                                   ^
In file included from src/demangle_unittest.cc:41:
./src/googletest.h:604:6: warning: 'operator delete[]' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete[](void* p) {
     ^
                                throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:196:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p) _NOEXCEPT;
                                   ^
4 warnings generated.
mv -f src/.deps/demangle_unittest-demangle_unittest.Tpo src/.deps/demangle_unittest-demangle_unittest.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o demangle_unittest  src/demangle_unittest-demangle_unittest.o  libglog.la       -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/demangle_unittest src/demangle_unittest-demangle_unittest.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/stacktrace_unittest-stacktrace_unittest.o -MD -MP -MF src/.deps/stacktrace_unittest-stacktrace_unittest.Tpo -c -o src/stacktrace_unittest-stacktrace_unittest.o `test -f 'src/stacktrace_unittest.cc' || echo './'`src/stacktrace_unittest.cc
mv -f src/.deps/stacktrace_unittest-stacktrace_unittest.Tpo src/.deps/stacktrace_unittest-stacktrace_unittest.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o stacktrace_unittest  src/stacktrace_unittest-stacktrace_unittest.o  libglog.la    -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/stacktrace_unittest src/stacktrace_unittest-stacktrace_unittest.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/symbolize_unittest-symbolize_unittest.o -MD -MP -MF src/.deps/symbolize_unittest-symbolize_unittest.Tpo -c -o src/symbolize_unittest-symbolize_unittest.o `test -f 'src/symbolize_unittest.cc' || echo './'`src/symbolize_unittest.cc
In file included from src/symbolize_unittest.cc:41:
./src/googletest.h:589:7: warning: 'operator new' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new(size_t size) {
      ^
                                throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:186:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_...
                                                                 ^
In file included from src/symbolize_unittest.cc:41:
./src/googletest.h:596:7: warning: 'operator new[]' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new[](size_t size) {
      ^
                                  throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:194:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::siz...
                                                                 ^
In file included from src/symbolize_unittest.cc:41:
./src/googletest.h:600:6: warning: 'operator delete' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete(void* p) {
     ^
                              throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:188:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
                                   ^
In file included from src/symbolize_unittest.cc:41:
./src/googletest.h:604:6: warning: 'operator delete[]' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete[](void* p) {
     ^
                                throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:196:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p) _NOEXCEPT;
                                   ^
src/symbolize_unittest.cc:57:20: warning: unused function 'TrySymbolize' [-Wunused-function]
static const char *TrySymbolize(void *pc) {
                   ^
5 warnings generated.
mv -f src/.deps/symbolize_unittest-symbolize_unittest.Tpo src/.deps/symbolize_unittest-symbolize_unittest.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o symbolize_unittest  src/symbolize_unittest-symbolize_unittest.o  libglog.la       -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/symbolize_unittest src/symbolize_unittest-symbolize_unittest.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -fPIE -g -O2 -MT src/symbolize_pie_unittest-symbolize_unittest.o -MD -MP -MF src/.deps/symbolize_pie_unittest-symbolize_unittest.Tpo -c -o src/symbolize_pie_unittest-symbolize_unittest.o `test -f 'src/symbolize_unittest.cc' || echo './'`src/symbolize_unittest.cc
In file included from src/symbolize_unittest.cc:41:
./src/googletest.h:589:7: warning: 'operator new' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new(size_t size) {
      ^
                                throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:186:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_...
                                                                 ^
In file included from src/symbolize_unittest.cc:41:
./src/googletest.h:596:7: warning: 'operator new[]' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new[](size_t size) {
      ^
                                  throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:194:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::siz...
                                                                 ^
In file included from src/symbolize_unittest.cc:41:
./src/googletest.h:600:6: warning: 'operator delete' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete(void* p) {
     ^
                              throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:188:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
                                   ^
In file included from src/symbolize_unittest.cc:41:
./src/googletest.h:604:6: warning: 'operator delete[]' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete[](void* p) {
     ^
                                throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:196:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p) _NOEXCEPT;
                                   ^
src/symbolize_unittest.cc:57:20: warning: unused function 'TrySymbolize' [-Wunused-function]
static const char *TrySymbolize(void *pc) {
                   ^
5 warnings generated.
mv -f src/.deps/symbolize_pie_unittest-symbolize_unittest.Tpo src/.deps/symbolize_pie_unittest-symbolize_unittest.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -fPIE -g -O2 -D_THREAD_SAFE  -pie  -o symbolize_pie_unittest  src/symbolize_pie_unittest-symbolize_unittest.o  libglog.la       -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -fPIE -g -O2 -D_THREAD_SAFE -pie -o .libs/symbolize_pie_unittest src/symbolize_pie_unittest-symbolize_unittest.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/stl_logging_unittest-stl_logging_unittest.o -MD -MP -MF src/.deps/stl_logging_unittest-stl_logging_unittest.Tpo -c -o src/stl_logging_unittest-stl_logging_unittest.o `test -f 'src/stl_logging_unittest.cc' || echo './'`src/stl_logging_unittest.cc
In file included from src/stl_logging_unittest.cc:63:
./src/googletest.h:589:7: warning: 'operator new' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new(size_t size) {
      ^
                                throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:186:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_...
                                                                 ^
In file included from src/stl_logging_unittest.cc:63:
./src/googletest.h:596:7: warning: 'operator new[]' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new[](size_t size) {
      ^
                                  throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:194:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::siz...
                                                                 ^
In file included from src/stl_logging_unittest.cc:63:
./src/googletest.h:600:6: warning: 'operator delete' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete(void* p) {
     ^
                              throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:188:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
                                   ^
In file included from src/stl_logging_unittest.cc:63:
./src/googletest.h:604:6: warning: 'operator delete[]' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete[](void* p) {
     ^
                                throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:196:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p) _NOEXCEPT;
                                   ^
4 warnings generated.
mv -f src/.deps/stl_logging_unittest-stl_logging_unittest.Tpo src/.deps/stl_logging_unittest-stl_logging_unittest.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o stl_logging_unittest  src/stl_logging_unittest-stl_logging_unittest.o  libglog.la       -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/stl_logging_unittest src/stl_logging_unittest-stl_logging_unittest.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/utilities_unittest-utilities_unittest.o -MD -MP -MF src/.deps/utilities_unittest-utilities_unittest.Tpo -c -o src/utilities_unittest-utilities_unittest.o `test -f 'src/utilities_unittest.cc' || echo './'`src/utilities_unittest.cc
In file included from src/utilities_unittest.cc:32:
./src/googletest.h:589:7: warning: 'operator new' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new(size_t size) {
      ^
                                throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:186:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_...
                                                                 ^
In file included from src/utilities_unittest.cc:32:
./src/googletest.h:596:7: warning: 'operator new[]' is missing exception specification
      'throw(std::bad_alloc)' [-Wmissing-exception-spec]
void* operator new[](size_t size) {
      ^
                                  throw(std::bad_alloc)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:194:66: note: 
      previous declaration is here
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::siz...
                                                                 ^
In file included from src/utilities_unittest.cc:32:
./src/googletest.h:600:6: warning: 'operator delete' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete(void* p) {
     ^
                              throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:188:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
                                   ^
In file included from src/utilities_unittest.cc:32:
./src/googletest.h:604:6: warning: 'operator delete[]' is missing exception specification
      'throw()' [-Wmissing-exception-spec]
void operator delete[](void* p) {
     ^
                                throw()
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:196:36: note: 
      previous declaration is here
_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p) _NOEXCEPT;
                                   ^
4 warnings generated.
mv -f src/.deps/utilities_unittest-utilities_unittest.Tpo src/.deps/utilities_unittest-utilities_unittest.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o utilities_unittest  src/utilities_unittest-utilities_unittest.o  libglog.la       -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/utilities_unittest src/utilities_unittest-utilities_unittest.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/logging_striptest0-logging_striptest_main.o -MD -MP -MF src/.deps/logging_striptest0-logging_striptest_main.Tpo -c -o src/logging_striptest0-logging_striptest_main.o `test -f 'src/logging_striptest_main.cc' || echo './'`src/logging_striptest_main.cc
mv -f src/.deps/logging_striptest0-logging_striptest_main.Tpo src/.deps/logging_striptest0-logging_striptest_main.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o logging_striptest0  src/logging_striptest0-logging_striptest_main.o  libglog.la    -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/logging_striptest0 src/logging_striptest0-logging_striptest_main.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/logging_striptest2-logging_striptest2.o -MD -MP -MF src/.deps/logging_striptest2-logging_striptest2.Tpo -c -o src/logging_striptest2-logging_striptest2.o `test -f 'src/logging_striptest2.cc' || echo './'`src/logging_striptest2.cc
mv -f src/.deps/logging_striptest2-logging_striptest2.Tpo src/.deps/logging_striptest2-logging_striptest2.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o logging_striptest2  src/logging_striptest2-logging_striptest2.o  libglog.la    -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/logging_striptest2 src/logging_striptest2-logging_striptest2.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/logging_striptest10-logging_striptest10.o -MD -MP -MF src/.deps/logging_striptest10-logging_striptest10.Tpo -c -o src/logging_striptest10-logging_striptest10.o `test -f 'src/logging_striptest10.cc' || echo './'`src/logging_striptest10.cc
mv -f src/.deps/logging_striptest10-logging_striptest10.Tpo src/.deps/logging_striptest10-logging_striptest10.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o logging_striptest10  src/logging_striptest10-logging_striptest10.o  libglog.la    -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/logging_striptest10 src/logging_striptest10-logging_striptest10.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
g++ -DHAVE_CONFIG_H -I. -I./src  -I./src  -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -MT src/signalhandler_unittest-signalhandler_unittest.o -MD -MP -MF src/.deps/signalhandler_unittest-signalhandler_unittest.Tpo -c -o src/signalhandler_unittest-signalhandler_unittest.o `test -f 'src/signalhandler_unittest.cc' || echo './'`src/signalhandler_unittest.cc
mv -f src/.deps/signalhandler_unittest-signalhandler_unittest.Tpo src/.deps/signalhandler_unittest-signalhandler_unittest.Po
/bin/sh ./libtool  --tag=CXX   --mode=link g++ -D_THREAD_SAFE      -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare  -DNO_FRAME_POINTER  -g -O2 -D_THREAD_SAFE   -o signalhandler_unittest  src/signalhandler_unittest-signalhandler_unittest.o  libglog.la       -lpthread 
libtool: link: g++ -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -DNO_FRAME_POINTER -g -O2 -D_THREAD_SAFE -o .libs/signalhandler_unittest src/signalhandler_unittest-signalhandler_unittest.o -Wl,-bind_at_load  ./.libs/libglog.dylib -lpthread
MacdeMac-mini:glog-0.4.0 macmini$ 

在.lib目录下生成动态库

MacdeMac-mini:.libs macmini$ pwd

/Users/macmini/tools/glog-0.4.0/.libs

make install安装

MacdeMac-mini:glog-0.4.0 macmini$ make install
 ./install-sh -c -d '/usr/local/lib'
 /bin/sh ./libtool   --mode=install /usr/bin/install -c   libglog.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libglog.0.dylib /usr/local/lib/libglog.0.dylib
libtool: install: (cd /usr/local/lib && { ln -s -f libglog.0.dylib libglog.dylib || { rm -f libglog.dylib && ln -s libglog.0.dylib libglog.dylib; }; })
libtool: install: /usr/bin/install -c .libs/libglog.lai /usr/local/lib/libglog.la
libtool: install: /usr/bin/install -c .libs/libglog.a /usr/local/lib/libglog.a
libtool: install: chmod 644 /usr/local/lib/libglog.a
libtool: install: ranlib /usr/local/lib/libglog.a
 ./install-sh -c -d '/usr/local/share/doc/glog-0.4.0'
 /usr/bin/install -c -m 644 AUTHORS COPYING ChangeLog INSTALL README.md README.windows doc/designstyle.css doc/glog.html '/usr/local/share/doc/glog-0.4.0'
 ./install-sh -c -d '/usr/local/include/glog'
 /usr/bin/install -c -m 644 src/glog/log_severity.h '/usr/local/include/glog'
 ./install-sh -c -d '/usr/local/include/glog'
 /usr/bin/install -c -m 644 src/glog/logging.h src/glog/raw_logging.h src/glog/vlog_is_on.h src/glog/stl_logging.h '/usr/local/include/glog'
 ./install-sh -c -d '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libglog.pc '/usr/local/lib/pkgconfig'
MacdeMac-mini:glog-0.4.0 macmini$ 

用QT写代码测试:

pro文件中配置中添加

INCLUDEPATH += /usr/local/include

LIBS += /usr/local/lib/libglog.a

#include "mainwindow.h"

#include <QApplication>


#include "glog/logging.h"


int main(int argc, char *argv[])
{
    // Start google log system:
    FLAGS_log_dir = "/Users/macmini/Library/Logs";
    google::SetLogDestination(google::GLOG_INFO, "/Users/macmini/Library/Logs/qt_glog_test");

    google::InitGoogleLogging("");
    google::SetStderrLogging(google::GLOG_INFO);
    google::SetLogFilenameExtension("log_");
    google::SetLogSymlink(google::GLOG_INFO, "okay");
    FLAGS_colorlogtostderr = true;                      // Set log color
    FLAGS_logbufsecs = 0;                               // Set log output speed(s)
    FLAGS_max_log_size = 1024;                          // Set max log file size
    FLAGS_stop_logging_if_full_disk = true;             // If disk is full
    char str[20] = "hello qt log!";
    LOG(INFO) << str;
    LOG(INFO) << "info test" << "hello qt log!";        //输出一个Info日志
    LOG(WARNING) << "warning qt glog test";             //输出一个Warning日志
    LOG(ERROR) << "error qt glog test";                 //输出一个Error日志


    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    int ret = a.exec();

    google::ShutdownGoogleLogging();

    return ret;
}

qt_glog_testlog_20201213-120202.25568文件中的内容为

Log file created at: 2020/12/13 12:02:02

Running on machine: MacdeMac-mini.local

Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg

I0805 12:02:02.923524 148766144 main.cpp:24] hello qt log!

I0805 12:02:02.953042 148766144 main.cpp:25] info testhello qt log!

W0805 12:02:02.953068 148766144 main.cpp:26] warning qt glog test

E0805 12:02:02.953248 148766144 main.cpp:27] error qt glog test

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值