首先声明一下编译环境.
FreeBSD 10 x64 , intel I3, 虚拟机.
CentOS 6.5 x64 , 志强CPU, 物理机.
昨天在测试PostgreSQL在FreeBSD中的安装时, 因为编译选项的原因, 每次可能会遇到编译不通过的地方, 例如检查一些依赖的头文件, 只要安装这些包就可以解决, 对于非默认位置的头文件, 需要添加CPPFLAGS.
本文要对比的是PostgreSQL在freebsd和linux中, 同样的configure选项下, 输出的不同, 例如freebsd下可能用的是clang编译器, linux用的是gcc. freebsd下可能没有crypt.h(可能是未安装或CPPFLAGS未设置)等等.
编译选项 :
freebsd :
输出 :
centos :
输出 :
相比linux的不同之处, freebsd输出的warning或check 结果为no, 的处理.
./configure CPPFLAGS='-I/usr/local/include' --prefix=/opt/pgsql9.3.4 --with-pgport=1921 --with-perl --with-tcl --with-python --with-openssl --with-pam --with-ldap --with-libxml --with-libxslt --enable-thread-safety --enable-debug --enable-cassert
输出 :
root@my-domain:~/postgresql-9.3.4 # ./configure CPPFLAGS='-I/usr/local/include' --prefix=/opt/pgsql9.3.4 --with-pgport=1921 --with-perl --with-tcl --with-python --with-openssl --with-pam --with-ldap --with-libxml --with-libxslt --enable-thread-safety --enable-debug --enable-cassert
checking build system type... x86_64-unknown-freebsd10.0
checking host system type... x86_64-unknown-freebsd10.0
checking which template to use... freebsd
checking whether to build with 64-bit integer date/time support... yes
checking whether NLS is wanted... no
checking for default port number... 1921
checking for block size... 8kB
checking for segment size... 1GB
checking for WAL block size... 8kB
checking for WAL segment size... 16MB
checking for gcc... no
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc supports -Wdeclaration-after-statement... yes
checking whether cc supports -Wendif-labels... yes
checking whether cc supports -Wmissing-format-attribute... yes
checking whether cc supports -Wformat-security... yes
checking whether cc supports -fno-strict-aliasing... yes
checking whether cc supports -fwrapv... yes
checking whether cc supports -fexcess-precision=standard... no
checking whether cc supports -funroll-loops... yes
checking whether cc supports -ftree-vectorize... yes
checking whether the C compiler still works... yes
checking how to run the C preprocessor... cc -E
checking allow thread-safe client libraries... yes
checking whether to build with Tcl... yes
checking whether to build Perl modules... yes
checking whether to build Python modules... yes
checking whether to build with GSSAPI support... no
checking whether to build with Kerberos 5 support... no
checking whether to build with PAM support... yes
checking whether to build with LDAP support... yes
checking whether to build with Bonjour support... no
checking whether to build with OpenSSL support... yes
checking whether to build with SELinux support... no
checking for xml2-config... xml2-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for ranlib... ranlib
checking for strip... strip
checking whether it is possible to strip libraries... yes
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for tar... /usr/bin/tar
checking whether ln -s works... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for bison... no
configure: WARNING:
*** Without Bison you will not be able to build PostgreSQL from Git nor
*** change any of the parser definition files. You can obtain Bison from
*** a GNU mirror site. (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this, because the Bison
*** output is pre-generated.)
checking for flex... /usr/bin/flex
configure: using flex 2.5.37
checking for perl... /usr/local/bin/perl
configure: using perl 5.20.0
checking for Perl archlibexp... /usr/local/lib/perl5/5.20/mach
checking for Perl privlibexp... /usr/local/lib/perl5/5.20
checking for Perl useshrplib... true
checking for flags to link embedded Perl... -pthread -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/local/lib/perl5/5.20/mach/CORE -lperl -lm -lcrypt -lutil
checking for python... /usr/local/bin/python
checking for Python distutils module... yes
checking Python configuration directory... /usr/local/lib/python2.7/config
checking Python include directories... -I/usr/local/include/python2.7
checking how to link an embedded Python application... -L/usr/local/lib/python2.7/config -lpython2.7 -lintl -lutil -lm
checking whether Python is compiled with thread support... yes
checking for main in -lm... yes
checking for library containing setproctitle... none required
checking for library containing dlopen... none required
checking for library containing socket... none required
checking for library containing shl_load... no
checking for library containing getopt_long... none required
checking for library containing crypt... -lcrypt
checking for library containing fdatasync... no
checking for library containing gethostbyname_r... none required
checking for library containing shmget... none required
checking for library containing readline... -lreadline
checking for inflate in -lz... yes
checking for CRYPTO_new_ex_data in -lcrypto... yes
checking for SSL_library_init in -lssl... yes
checking for pam_start in -lpam... yes
checking for xmlSaveToBuffer in -lxml2... yes
checking for xsltCleanupGlobals in -lxslt... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking crypt.h usability... no
checking crypt.h presence... no
checking for crypt.h... no
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking fp_class.h usability... no
checking fp_class.h presence... no
checking for fp_class.h... no
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/sockio.h usability... yes
checking sys/sockio.h presence... yes
checking for sys/sockio.h... yes
checking sys/tas.h usability... no
checking sys/tas.h presence... no
checking for sys/tas.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking ucred.h usability... no
checking ucred.h presence... no
checking for ucred.h... no
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for net/if.h... yes
checking for sys/ucred.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking libxslt/xslt.h usability... yes
checking libxslt/xslt.h presence... yes
checking for libxslt/xslt.h... yes
checking ldap.h usability... yes
checking ldap.h presence... yes
checking for ldap.h... yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for quiet inline (no complaint if unreferenced)... yes
checking for preprocessor stringizing operator... yes
checking for flexible array members... yes
checking for signed types... yes
checking for working volatile... yes
checking for __func__... yes
checking for _Static_assert... yes
checking for __builtin_types_compatible_p... yes
checking for __builtin_constant_p... yes
checking for __builtin_unreachable... yes
checking for __VA_ARGS__... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for tzname... yes
checking for union semun... yes
checking for struct sockaddr_un... yes
checking for struct sockaddr_storage... yes
checking for struct sockaddr_storage.ss_family... yes
checking for struct sockaddr_storage.__ss_family... no
checking for struct sockaddr_storage.ss_len... yes
checking for struct sockaddr_storage.__ss_len... no
checking for struct sockaddr.sa_len... yes
checking for struct addrinfo... yes
checking for intptr_t... yes
checking for uintptr_t... yes
checking for long long int... yes
checking for locale_t... yes
checking for struct cmsgcred... yes
checking for struct option... yes
checking for z_streamp... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of off_t... 8
checking for int timezone... no
checking types of arguments for accept()... int, int, struct sockaddr *, socklen_t *
checking whether gettimeofday takes only one argument... no
checking for cbrt... yes
checking for dlopen... yes
checking for fdatasync... no
checking for getifaddrs... yes
checking for getpeerucred... no
checking for getrlimit... yes
checking for mbstowcs_l... yes
checking for memmove... yes
checking for poll... yes
checking for pstat... no
checking for readlink... yes
checking for setproctitle... yes
checking for setsid... yes
checking for sigprocmask... yes
checking for symlink... yes
checking for sync_file_range... no
checking for towlower... yes
checking for utime... yes
checking for utimes... yes
checking for wcstombs... yes
checking for wcstombs_l... yes
checking for fseeko... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for posix_fadvise... yes
checking whether posix_fadvise is declared... yes
checking whether fdatasync is declared... no
checking whether strlcat is declared... yes
checking whether strlcpy is declared... yes
checking whether F_FULLFSYNC is declared... no
checking for struct sockaddr_in6... yes
checking for PS_STRINGS... no
checking for snprintf... yes
checking for vsnprintf... yes
checking whether snprintf is declared... yes
checking whether vsnprintf is declared... yes
checking for isinf... yes
checking for crypt... yes
checking for fls... yes
checking for getopt... yes
checking for getrusage... yes
checking for inet_aton... yes
checking for random... yes
checking for rint... yes
checking for srandom... yes
checking for strerror... yes
checking for strlcat... yes
checking for strlcpy... yes
checking for unsetenv... yes
checking for getpeereid... yes
checking for getaddrinfo... yes
checking for getopt_long... yes
checking for sigsetjmp... yes
checking whether sys_siglist is declared... yes
checking for syslog... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for opterr... yes
checking for optreset... yes
checking for strtoll... yes
checking for strtoull... yes
checking for builtin locking functions... yes
checking for rl_completion_append_character... yes
checking for rl_completion_matches... yes
checking for rl_filename_completion_function... yes
checking for append_history... yes
checking for history_truncate_file... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... yes
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for the pthreads library -lpthreadGC2... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strerror_r... yes
checking for getpwuid_r... yes
checking for gethostbyname_r... yes
checking whether getpwuid_r takes a fifth argument... yes
checking whether strerror_r returns int... yes
checking for ldap_bind in -lldap... yes
checking for ldap_simple_bind in -lldap_r... yes
checking test program... ok
checking whether long int is 64 bits... yes
checking size of void *... 8
checking size of size_t... 8
checking size of long... 8
checking whether to build with float4 passed by value... yes
checking whether to build with float8 passed by value... yes
checking alignment of short... 2
checking alignment of int... 4
checking alignment of long... 8
checking alignment of double... 8
checking for int8... no
checking for uint8... no
checking for int64... no
checking for uint64... no
checking for sig_atomic_t... yes
checking for POSIX signal interface... yes
checking for working memcmp... yes
checking for tclsh... no
checking for tcl... no
checking for tclsh8.5... /usr/local/bin/tclsh8.5
checking for tclConfig.sh... /usr/local/lib/tcl8.5/tclConfig.sh
checking tcl.h usability... yes
checking tcl.h presence... yes
checking for tcl.h... yes
checking for perl.h... yes
checking for libperl... yes
checking Python.h usability... yes
checking Python.h presence... yes
checking for Python.h... yes
checking for onsgmls... no
checking for nsgmls... no
checking for openjade... no
checking for jade... no
checking for DocBook V4.2... no
checking for DocBook stylesheets... no
checking for collateindex.pl... no
checking for xsltproc... xsltproc
checking for osx... no
checking for sgml2xml... no
checking for sx... no
checking thread safety of required library functions... yes
checking whether cc supports -Wl,--as-needed... yes
configure: using compiler=FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
configure: using CFLAGS=-O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g
configure: using CPPFLAGS=-I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include
configure: using LDFLAGS= -L/usr/local/lib -L/usr/lib -Wl,--as-needed
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: creating src/include/pg_config_ext.h
config.status: creating src/interfaces/ecpg/include/ecpg_config.h
config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking src/backend/port/dynloader/freebsd.c to src/backend/port/dynloader.c
config.status: linking src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking src/backend/port/unix_latch.c to src/backend/port/pg_latch.c
config.status: linking src/backend/port/dynloader/freebsd.h to src/include/dynloader.h
config.status: linking src/include/port/freebsd.h to src/include/pg_config_os.h
config.status: linking src/makefiles/Makefile.freebsd to src/Makefile.port
centos :
./configure --prefix=/opt/pgsql9.3.4 --with-pgport=1921 --with-perl --with-tcl --with-python --with-openssl --with-pam --with-ldap --with-libxml --with-libxslt --enable-thread-safety --enable-debug --enable-cassert
输出 :
[root@db-172-16-3-150 postgresql-9.3.4]# ./configure --prefix=/opt/pgsql9.3.4 --with-pgport=1921 --with-perl --with-tcl --with-python --with-openssl --with-pam --with-ldap --with-libxml --with-libxslt --enable-thread-safety --enable-debug --enable-cassert
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking which template to use... linux
checking whether to build with 64-bit integer date/time support... yes
checking whether NLS is wanted... no
checking for default port number... 1921
checking for block size... 8kB
checking for segment size... 1GB
checking for WAL block size... 8kB
checking for WAL segment size... 16MB
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc supports -Wdeclaration-after-statement... yes
checking whether gcc supports -Wendif-labels... yes
checking whether gcc supports -Wmissing-format-attribute... yes
checking whether gcc supports -Wformat-security... yes
checking whether gcc supports -fno-strict-aliasing... yes
checking whether gcc supports -fwrapv... yes
checking whether gcc supports -fexcess-precision=standard... no
checking whether gcc supports -funroll-loops... yes
checking whether gcc supports -ftree-vectorize... yes
checking whether the C compiler still works... yes
checking how to run the C preprocessor... gcc -E
checking allow thread-safe client libraries... yes
checking whether to build with Tcl... yes
checking whether to build Perl modules... yes
checking whether to build Python modules... yes
checking whether to build with GSSAPI support... no
checking whether to build with Kerberos 5 support... no
checking whether to build with PAM support... yes
checking whether to build with LDAP support... yes
checking whether to build with Bonjour support... no
checking whether to build with OpenSSL support... yes
checking whether to build with SELinux support... no
checking for xml2-config... xml2-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for ranlib... ranlib
checking for strip... strip
checking whether it is possible to strip libraries... yes
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for tar... /bin/tar
checking whether ln -s works... yes
checking for gawk... gawk
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for bison... /usr/bin/bison
configure: using bison (GNU Bison) 2.4.1
checking for flex... /usr/bin/flex
configure: using flex 2.5.35
checking for perl... /usr/bin/perl
configure: using perl 5.10.1
checking for Perl archlibexp... /usr/lib64/perl5
checking for Perl privlibexp... /usr/share/perl5
checking for Perl useshrplib... true
checking for flags to link embedded Perl... -fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
checking for python... /opt/python2.7.6/bin/python
checking for Python distutils module... yes
checking Python configuration directory... /opt/python2.7.6/lib/python2.7/config
checking Python include directories... -I/opt/python2.7.6/include/python2.7
checking how to link an embedded Python application... -L/opt/python2.7.6/lib -lpython2.7 -lpthread -ldl -lutil -lm
checking whether Python is compiled with thread support... yes
checking for main in -lm... yes
checking for library containing setproctitle... no
checking for library containing dlopen... -ldl
checking for library containing socket... none required
checking for library containing shl_load... no
checking for library containing getopt_long... none required
checking for library containing crypt... -lcrypt
checking for library containing fdatasync... none required
checking for library containing gethostbyname_r... none required
checking for library containing shmget... none required
checking for library containing readline... -lreadline
checking for inflate in -lz... yes
checking for CRYPTO_new_ex_data in -lcrypto... yes
checking for SSL_library_init in -lssl... yes
checking for pam_start in -lpam... yes
checking for xmlSaveToBuffer in -lxml2... yes
checking for xsltCleanupGlobals in -lxslt... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking fp_class.h usability... no
checking fp_class.h presence... no
checking for fp_class.h... no
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking sys/tas.h usability... no
checking sys/tas.h presence... no
checking for sys/tas.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking ucred.h usability... no
checking ucred.h presence... no
checking for ucred.h... no
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for net/if.h... yes
checking for sys/ucred.h... no
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking libxslt/xslt.h usability... yes
checking libxslt/xslt.h presence... yes
checking for libxslt/xslt.h... yes
checking ldap.h usability... yes
checking ldap.h presence... yes
checking for ldap.h... yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for quiet inline (no complaint if unreferenced)... yes
checking for preprocessor stringizing operator... yes
checking for flexible array members... yes
checking for signed types... yes
checking for working volatile... yes
checking for __func__... yes
checking for _Static_assert... no
checking for __builtin_types_compatible_p... yes
checking for __builtin_constant_p... yes
checking for __builtin_unreachable... yes
checking for __VA_ARGS__... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for tzname... yes
checking for union semun... no
checking for struct sockaddr_un... yes
checking for struct sockaddr_storage... yes
checking for struct sockaddr_storage.ss_family... yes
checking for struct sockaddr_storage.__ss_family... no
checking for struct sockaddr_storage.ss_len... no
checking for struct sockaddr_storage.__ss_len... no
checking for struct sockaddr.sa_len... no
checking for struct addrinfo... yes
checking for intptr_t... yes
checking for uintptr_t... yes
checking for long long int... yes
checking for locale_t... yes
checking for struct cmsgcred... no
checking for struct option... yes
checking for z_streamp... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of off_t... 8
checking for int timezone... yes
checking types of arguments for accept()... int, int, struct sockaddr *, socklen_t *
checking whether gettimeofday takes only one argument... no
checking for cbrt... yes
checking for dlopen... yes
checking for fdatasync... yes
checking for getifaddrs... yes
checking for getpeerucred... no
checking for getrlimit... yes
checking for mbstowcs_l... no
checking for memmove... yes
checking for poll... yes
checking for pstat... no
checking for readlink... yes
checking for setproctitle... no
checking for setsid... yes
checking for sigprocmask... yes
checking for symlink... yes
checking for sync_file_range... yes
checking for towlower... yes
checking for utime... yes
checking for utimes... yes
checking for wcstombs... yes
checking for wcstombs_l... no
checking for fseeko... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for posix_fadvise... yes
checking whether posix_fadvise is declared... yes
checking whether fdatasync is declared... yes
checking whether strlcat is declared... no
checking whether strlcpy is declared... no
checking whether F_FULLFSYNC is declared... no
checking for struct sockaddr_in6... yes
checking for PS_STRINGS... no
checking for snprintf... yes
checking for vsnprintf... yes
checking whether snprintf is declared... yes
checking whether vsnprintf is declared... yes
checking for isinf... yes
checking for crypt... yes
checking for fls... no
checking for getopt... yes
checking for getrusage... yes
checking for inet_aton... yes
checking for random... yes
checking for rint... yes
checking for srandom... yes
checking for strerror... yes
checking for strlcat... no
checking for strlcpy... no
checking for unsetenv... yes
checking for getpeereid... no
checking for getaddrinfo... yes
checking for getopt_long... yes
checking for sigsetjmp... yes
checking whether sys_siglist is declared... yes
checking for syslog... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for opterr... yes
checking for optreset... no
checking for strtoll... yes
checking for strtoull... yes
checking for builtin locking functions... yes
checking for rl_completion_append_character... yes
checking for rl_completion_matches... yes
checking for rl_filename_completion_function... yes
checking for append_history... yes
checking for history_truncate_file... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... yes
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for the pthreads library -lpthreadGC2... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strerror_r... yes
checking for getpwuid_r... yes
checking for gethostbyname_r... yes
checking whether getpwuid_r takes a fifth argument... yes
checking whether strerror_r returns int... no
checking for ldap_bind in -lldap... yes
checking for ldap_simple_bind in -lldap_r... yes
checking test program... ok
checking whether long int is 64 bits... yes
checking size of void *... 8
checking size of size_t... 8
checking size of long... 8
checking whether to build with float4 passed by value... yes
checking whether to build with float8 passed by value... yes
checking alignment of short... 2
checking alignment of int... 4
checking alignment of long... 8
checking alignment of double... 8
checking for int8... no
checking for uint8... no
checking for int64... no
checking for uint64... no
checking for sig_atomic_t... yes
checking for POSIX signal interface... yes
checking for working memcmp... yes
checking for tclsh... /usr/bin/tclsh
checking for tclConfig.sh... /usr/lib64/tcl8.5/tclConfig.sh
checking tcl.h usability... yes
checking tcl.h presence... yes
checking for tcl.h... yes
checking for perl.h... yes
checking for libperl... yes
checking Python.h usability... yes
checking Python.h presence... yes
checking for Python.h... yes
checking for onsgmls... onsgmls
checking for openjade... openjade
checking for DocBook V4.2... yes
checking for DocBook stylesheets... /usr/share/sgml/docbook/dsssl-stylesheets
checking for collateindex.pl... /usr/bin/collateindex.pl
checking for xsltproc... xsltproc
checking for osx... osx
checking thread safety of required library functions... yes
checking whether gcc supports -Wl,--as-needed... yes
configure: using compiler=gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
configure: using CFLAGS=-O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g
configure: using CPPFLAGS= -D_GNU_SOURCE -I/usr/include/libxml2
configure: using LDFLAGS= -Wl,--as-needed
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: creating src/include/pg_config_ext.h
config.status: creating src/interfaces/ecpg/include/ecpg_config.h
config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking src/backend/port/dynloader/linux.c to src/backend/port/dynloader.c
config.status: linking src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking src/backend/port/unix_latch.c to src/backend/port/pg_latch.c
config.status: linking src/backend/port/dynloader/linux.h to src/include/dynloader.h
config.status: linking src/include/port/linux.h to src/include/pg_config_os.h
config.status: linking src/makefiles/Makefile.linux to src/Makefile.port
相比linux的不同之处, freebsd输出的warning或check 结果为no, 的处理.
1. 编译器
2. bison
3. crypt.h, 暂时放弃处理
4. gawk
5. 在linux中没有的, freebsd有的检测.
6. FreeBSD 不支持的其他选项
7. docbook等
8. tcl
最后, 重新执行configure, 大部分的check已经yes. 和linux相比只剩第六步的no.
安装
查看pg_config输出.
[参考]
checking for gcc... no
checking for cc... cc
freebsd里面没有gcc编译器, 只有cc.
如果要安装的话, 先查找一下linux下的gcc包.
[root@db-172-16-3-150 postgresql-9.3.4]# which gcc
/usr/bin/gcc
[root@db-172-16-3-150 postgresql-9.3.4]# rpm -qf /usr/bin/gcc
gcc-4.4.7-4.el6.x86_64
然后到freebsd里面安装
root@my-domain:~/postgresql-9.3.4 # pkg search gcc
gcc-4.7.3_1
# pkg install gcc-4.7.3_1
安装后可以检测到gcc, 但是最后还是选择了clang编译器.
checking for gcc... yes
configure: using compiler=FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
如果要使用gcc作为编译器, 需要设置CC变量.
./configure CC='/usr/local/bin/gcc47' CPPFLAGS='-I/usr/local/include'
configure: using compiler=gcc47 (FreeBSD Ports Collection) 4.7.3
但是clang和gcc编译出来的代码运行效率我没有测试过, 大家有兴趣可以测试一下.
2. bison
checking for bison... no
configure: WARNING:
*** Without Bison you will not be able to build PostgreSQL from Git nor
*** change any of the parser definition files. You can obtain Bison from
*** a GNU mirror site. (If you are using the official distribution of
*** PostgreSQL then you do not need to worry about this, because the Bison
*** output is pre-generated.)
查找linux对应的包名.
[root@db-172-16-3-150 postgresql-9.3.4]# which bison
/usr/bin/bison
[root@db-172-16-3-150 postgresql-9.3.4]# rpm -qf /usr/bin/bison
bison-2.4.1-5.el6.x86_64
在freebsd安装bison即可.
pkg install bison
3. crypt.h, 暂时放弃处理
checking crypt.h usability... no
checking crypt.h presence... no
checking for crypt.h... no
查找linux对应的包
[root@db-172-16-3-150 postgresql-9.3.4]# find / -name crypt.h
/usr/include/crypt.h
[root@db-172-16-3-150 postgresql-9.3.4]# rpm -qf /usr/include/crypt.h
glibc-headers-2.12-1.132.el6.x86_64
在freebsd ports中找不到对应的包
http://www.freebsd.org/cgi/ports.cgi?query=glibc-headers&stype=all
暂时放弃
4. gawk
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
这个和C编译器一样, 有替代的就可以了, nawk就是替代品.
如果一定要使用gawk的话, 可以按照它.
[root@db-172-16-3-150 postgresql-9.3.4]# which gawk
/bin/gawk
[root@db-172-16-3-150 postgresql-9.3.4]# rpm -qf /bin/gawk
gawk-3.1.7-10.el6.x86_64
root@my-domain:~ # pkg search gawk
gawk-4.1.1
root@my-domain:~ # pkg install gawk-4.1.1
5. 在linux中没有的, freebsd有的检测.
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking sys/sockio.h usability... yes
checking sys/sockio.h presence... yes
checking for sys/sockio.h... yes
checking for sys/ucred.h... yes
checking for _Static_assert... yes
checking for union semun... yes
checking for struct sockaddr_storage.ss_len... yes
checking for struct sockaddr.sa_len... yes
checking for struct cmsgcred... yes
checking for mbstowcs_l... yes
checking for setproctitle... yes
checking for wcstombs_l... yes
checking whether strlcat is declared... yes
checking whether strlcpy is declared... yes
checking for fls... yes
checking for strlcat... yes
checking for strlcpy... yes
checking for getpeereid... yes
checking for optreset... yes
checking whether strerror_r returns int... yes
6. FreeBSD 不支持的其他选项
checking for int timezone... no
checking for fdatasync... no
checking for sync_file_range... no
checking whether fdatasync is declared... no
checking whether pthreads work without any flags... no
7. docbook等
checking for onsgmls... no
checking for nsgmls... no
checking for openjade... no
checking for jade... no
checking for DocBook V4.2... no
checking for DocBook stylesheets... no
checking for collateindex.pl... no
checking for osx... no
checking for sgml2xml... no
checking for sx... no
可以通过按照包解决.
root@my-domain:~ # pkg install openjade
root@my-domain:~ # pkg install docbook-sgml-4.5_1
root@my-domain:~ # pkg install dsssl-docbook-modular-1.79_1,1
8. tcl
freebsd 通过按照tclsh来解决tcl检测问题
checking for tclsh... no
checking for tcl... no
checking for tclsh8.5... /usr/local/bin/tclsh8.5
checking for tclConfig.sh... /usr/local/lib/tcl8.5/tclConfig.sh
对应linux
checking for tclsh... /usr/bin/tclsh
checking for tclConfig.sh... /usr/lib64/tcl8.5/tclConfig.sh
[root@db-172-16-3-150 postgresql-9.3.4]# which tclsh
/usr/bin/tclsh
[root@db-172-16-3-150 postgresql-9.3.4]# rpm -qf /usr/bin/tclsh
tcl-8.5.7-6.el6.x86_64
最后, 重新执行configure, 大部分的check已经yes. 和linux相比只剩第六步的no.
root@my-domain:~/postgresql-9.3.4 # ./configure CC='/usr/local/bin/gcc47' CPPFLAGS='-I/usr/local/include' --prefix=/opt/pgsql9.3.4 --with-pgport=1921 --with-perl --with-tcl --with-python --with-openssl --with-pam --with-ldap --with-libxml --with-libxslt --enable-thread-safety --enable-debug --enable-cassert
checking build system type... x86_64-unknown-freebsd10.0
checking host system type... x86_64-unknown-freebsd10.0
checking which template to use... freebsd
checking whether to build with 64-bit integer date/time support... yes
checking whether NLS is wanted... no
checking for default port number... 1921
checking for block size... 8kB
checking for segment size... 1GB
checking for WAL block size... 8kB
checking for WAL segment size... 16MB
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/bin/gcc47 accepts -g... yes
checking for /usr/local/bin/gcc47 option to accept ISO C89... none needed
checking whether /usr/local/bin/gcc47 supports -Wdeclaration-after-statement... yes
checking whether /usr/local/bin/gcc47 supports -Wendif-labels... yes
checking whether /usr/local/bin/gcc47 supports -Wmissing-format-attribute... yes
checking whether /usr/local/bin/gcc47 supports -Wformat-security... yes
checking whether /usr/local/bin/gcc47 supports -fno-strict-aliasing... yes
checking whether /usr/local/bin/gcc47 supports -fwrapv... yes
checking whether /usr/local/bin/gcc47 supports -fexcess-precision=standard... yes
checking whether /usr/local/bin/gcc47 supports -funroll-loops... yes
checking whether /usr/local/bin/gcc47 supports -ftree-vectorize... yes
checking whether the C compiler still works... yes
checking how to run the C preprocessor... /usr/local/bin/gcc47 -E
checking allow thread-safe client libraries... yes
checking whether to build with Tcl... yes
checking whether to build Perl modules... yes
checking whether to build Python modules... yes
checking whether to build with GSSAPI support... no
checking whether to build with Kerberos 5 support... no
checking whether to build with PAM support... yes
checking whether to build with LDAP support... yes
checking whether to build with Bonjour support... no
checking whether to build with OpenSSL support... yes
checking whether to build with SELinux support... no
checking for xml2-config... xml2-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by GCC... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for ranlib... ranlib
checking for strip... strip
checking whether it is possible to strip libraries... yes
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for tar... /usr/bin/tar
checking whether ln -s works... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for bison... /usr/local/bin/bison
configure: using bison (GNU Bison) 2.7.12-4996
checking for flex... /usr/bin/flex
configure: using flex 2.5.37
checking for perl... /usr/bin/perl
configure: using perl 5.16.3
checking for Perl archlibexp... /usr/local/lib/perl5/5.16/mach
checking for Perl privlibexp... /usr/local/lib/perl5/5.16
checking for Perl useshrplib... true
checking for flags to link embedded Perl... -pthread -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/local/lib/perl5/5.16/mach/CORE -lperl -lm -lcrypt -lutil
checking for python... /usr/local/bin/python
checking for Python distutils module... yes
checking Python configuration directory... /usr/local/lib/python2.7/config
checking Python include directories... -I/usr/local/include/python2.7
checking how to link an embedded Python application... -L/usr/local/lib/python2.7/config -lpython2.7 -lintl -lutil -lm
checking whether Python is compiled with thread support... yes
checking for main in -lm... yes
checking for library containing setproctitle... none required
checking for library containing dlopen... none required
checking for library containing socket... none required
checking for library containing shl_load... no
checking for library containing getopt_long... none required
checking for library containing crypt... -lcrypt
checking for library containing fdatasync... no
checking for library containing gethostbyname_r... none required
checking for library containing shmget... none required
checking for library containing readline... -lreadline
checking for inflate in -lz... yes
checking for CRYPTO_new_ex_data in -lcrypto... yes
checking for SSL_library_init in -lssl... yes
checking for pam_start in -lpam... yes
checking for xmlSaveToBuffer in -lxml2... yes
checking for xsltCleanupGlobals in -lxslt... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking crypt.h usability... no
checking crypt.h presence... no
checking for crypt.h... no
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking fp_class.h usability... no
checking fp_class.h presence... no
checking for fp_class.h... no
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sem.h usability... yes
checking sys/sem.h presence... yes
checking for sys/sem.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/sockio.h usability... yes
checking sys/sockio.h presence... yes
checking for sys/sockio.h... yes
checking sys/tas.h usability... no
checking sys/tas.h presence... no
checking for sys/tas.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking ucred.h usability... no
checking ucred.h presence... no
checking for ucred.h... no
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for net/if.h... yes
checking for sys/ucred.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking libxslt/xslt.h usability... yes
checking libxslt/xslt.h presence... yes
checking for libxslt/xslt.h... yes
checking ldap.h usability... yes
checking ldap.h presence... yes
checking for ldap.h... yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for quiet inline (no complaint if unreferenced)... yes
checking for preprocessor stringizing operator... yes
checking for flexible array members... yes
checking for signed types... yes
checking for working volatile... yes
checking for __func__... yes
checking for _Static_assert... yes
checking for __builtin_types_compatible_p... yes
checking for __builtin_constant_p... yes
checking for __builtin_unreachable... yes
checking for __VA_ARGS__... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for tzname... yes
checking for union semun... yes
checking for struct sockaddr_un... yes
checking for struct sockaddr_storage... yes
checking for struct sockaddr_storage.ss_family... yes
checking for struct sockaddr_storage.__ss_family... no
checking for struct sockaddr_storage.ss_len... yes
checking for struct sockaddr_storage.__ss_len... no
checking for struct sockaddr.sa_len... yes
checking for struct addrinfo... yes
checking for intptr_t... yes
checking for uintptr_t... yes
checking for long long int... yes
checking for locale_t... yes
checking for struct cmsgcred... yes
checking for struct option... yes
checking for z_streamp... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of off_t... 8
checking for int timezone... no
checking types of arguments for accept()... int, int, struct sockaddr *, socklen_t *
checking whether gettimeofday takes only one argument... no
checking for cbrt... yes
checking for dlopen... yes
checking for fdatasync... no
checking for getifaddrs... yes
checking for getpeerucred... no
checking for getrlimit... yes
checking for mbstowcs_l... yes
checking for memmove... yes
checking for poll... yes
checking for pstat... no
checking for readlink... yes
checking for setproctitle... yes
checking for setsid... yes
checking for sigprocmask... yes
checking for symlink... yes
checking for sync_file_range... no
checking for towlower... yes
checking for utime... yes
checking for utimes... yes
checking for wcstombs... yes
checking for wcstombs_l... yes
checking for fseeko... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for posix_fadvise... yes
checking whether posix_fadvise is declared... yes
checking whether fdatasync is declared... no
checking whether strlcat is declared... yes
checking whether strlcpy is declared... yes
checking whether F_FULLFSYNC is declared... no
checking for struct sockaddr_in6... yes
checking for PS_STRINGS... no
checking for snprintf... yes
checking for vsnprintf... yes
checking whether snprintf is declared... yes
checking whether vsnprintf is declared... yes
checking for isinf... yes
checking for crypt... yes
checking for fls... yes
checking for getopt... yes
checking for getrusage... yes
checking for inet_aton... yes
checking for random... yes
checking for rint... yes
checking for srandom... yes
checking for strerror... yes
checking for strlcat... yes
checking for strlcpy... yes
checking for unsetenv... yes
checking for getpeereid... yes
checking for getaddrinfo... yes
checking for getopt_long... yes
checking for sigsetjmp... yes
checking whether sys_siglist is declared... yes
checking for syslog... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for opterr... yes
checking for optreset... yes
checking for strtoll... yes
checking for strtoull... yes
checking for builtin locking functions... yes
checking for rl_completion_append_character... yes
checking for rl_completion_matches... yes
checking for rl_filename_completion_function... yes
checking for append_history... yes
checking for history_truncate_file... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... yes
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for the pthreads library -lpthreadGC2... no
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for strerror_r... yes
checking for getpwuid_r... yes
checking for gethostbyname_r... yes
checking whether getpwuid_r takes a fifth argument... yes
checking whether strerror_r returns int... yes
checking for ldap_bind in -lldap... yes
checking for ldap_simple_bind in -lldap_r... yes
checking test program... ok
checking whether long int is 64 bits... yes
checking size of void *... 8
checking size of size_t... 8
checking size of long... 8
checking whether to build with float4 passed by value... yes
checking whether to build with float8 passed by value... yes
checking alignment of short... 2
checking alignment of int... 4
checking alignment of long... 8
checking alignment of double... 8
checking for int8... no
checking for uint8... no
checking for int64... no
checking for uint64... no
checking for sig_atomic_t... yes
checking for POSIX signal interface... yes
checking for working memcmp... yes
checking for tclsh... no
checking for tcl... no
checking for tclsh8.5... /usr/local/bin/tclsh8.5
checking for tclConfig.sh... /usr/local/lib/tcl8.5/tclConfig.sh
checking tcl.h usability... yes
checking tcl.h presence... yes
checking for tcl.h... yes
checking for perl.h... yes
checking for libperl... yes
checking Python.h usability... yes
checking Python.h presence... yes
checking for Python.h... yes
checking for onsgmls... onsgmls
checking for openjade... openjade
checking for DocBook V4.2... yes
checking for DocBook stylesheets... /usr/local/share/sgml/docbook/dsssl/modular
checking for xsltproc... xsltproc
checking for osx... osx
checking thread safety of required library functions... yes
checking whether /usr/local/bin/gcc47 supports -Wl,--as-needed... yes
configure: using compiler=gcc47 (FreeBSD Ports Collection) 4.7.3
configure: using CFLAGS=-O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g
configure: using CPPFLAGS=-I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include
configure: using LDFLAGS= -L/usr/local/lib -L/usr/lib -Wl,--as-needed
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: src/include/pg_config.h is unchanged
config.status: creating src/include/pg_config_ext.h
config.status: src/include/pg_config_ext.h is unchanged
config.status: creating src/interfaces/ecpg/include/ecpg_config.h
config.status: src/interfaces/ecpg/include/ecpg_config.h is unchanged
config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking src/backend/port/dynloader/freebsd.c to src/backend/port/dynloader.c
config.status: linking src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking src/backend/port/unix_latch.c to src/backend/port/pg_latch.c
config.status: linking src/backend/port/dynloader/freebsd.h to src/include/dynloader.h
config.status: linking src/include/port/freebsd.h to src/include/pg_config_os.h
config.status: linking src/makefiles/Makefile.freebsd to src/Makefile.port
安装
root@my-domain:~/postgresql-9.3.4 # gmake world
root@my-domain:~/postgresql-9.3.4 # gmake install-world
查看pg_config输出.
root@my-domain:~/postgresql-9.3.4 # su - postgres
postgres@my-domain:~ % psql -V
psql (PostgreSQL) 9.3.4
postgres@my-domain:~ % which psql
/opt/pgsql/bin/psql
postgres@my-domain:~ % psql -V
psql (PostgreSQL) 9.3.4
postgres@my-domain:~ % pg_config
BINDIR = /opt/pgsql9.3.4/bin
DOCDIR = /opt/pgsql9.3.4/share/doc
HTMLDIR = /opt/pgsql9.3.4/share/doc
INCLUDEDIR = /opt/pgsql9.3.4/include
PKGINCLUDEDIR = /opt/pgsql9.3.4/include
INCLUDEDIR-SERVER = /opt/pgsql9.3.4/include/server
LIBDIR = /opt/pgsql9.3.4/lib
PKGLIBDIR = /opt/pgsql9.3.4/lib
LOCALEDIR = /opt/pgsql9.3.4/share/locale
MANDIR = /opt/pgsql9.3.4/share/man
SHAREDIR = /opt/pgsql9.3.4/share
SYSCONFDIR = /opt/pgsql9.3.4/etc
PGXS = /opt/pgsql9.3.4/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = 'CC=/usr/local/bin/gcc47' 'CPPFLAGS=-I/usr/local/include' '--prefix=/opt/pgsql9.3.4' '--with-pgport=1921' '--with-perl' '--with-tcl' '--with-python' '--with-openssl' '--with-pam' '--with-ldap' '--with-libxml' '--with-libxslt' '--enable-thread-safety' '--enable-debug' '--enable-cassert'
CC = /usr/local/bin/gcc47
CPPFLAGS = -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/include
CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g
CFLAGS_SL = -fPIC -DPIC
LDFLAGS = -L../../../src/common -L/usr/local/lib -L/usr/lib -Wl,--as-needed -Wl,-R'/opt/pgsql9.3.4/lib'
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgport -lpgcommon -lxslt -lxml2 -lpam -lssl -lcrypto -lz -lreadline -lcrypt -lm
VERSION = PostgreSQL 9.3.4
[参考]