【问题标题】:Changing pg_config更改 pg_config
【发布时间】:2012-04-26 03:04:02
【问题描述】:

我面临与I'm trying to install psycopg2 onto Mac OS 10.6.3; it claims it can't find "stdarg.h" but I can see it's there; what should I do? 非常相似的问题(除了我使用的是 OS X 10.7 和 PostgreSQL v 9.0.5),我正在考虑更改我的 psql config c-compiler。

当我在终端输入 pg_config 时,我得到:

BINDIR = /usr/bin
DOCDIR = /usr/share/doc/postgresql
HTMLDIR = /Library/WebServer/Documents/postgresql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/man
SHAREDIR = /usr/share/postgresql
SYSCONFDIR = /private/etc/postgresql
PGXS = /usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--prefix=/usr' '--sbindir=/usr/libexec' '--sysconfdir=/private/etc' '--localstatedir=/var/pgsql' '--htmldir=/Library/WebServer/Documents/postgresql' '--enable-thread-safety' '--enable-dtrace' '--with-tcl' '--with-perl' '--with-python' '--with-gssapi' '--with-krb5' '--with-pam' '--with-ldap' '--with-bonjour' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS_EX=-mdynamic-no-pic'
CC = gcc
CPPFLAGS = -I/usr/include/libxml2
CFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL = 
LDFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wl,-dead_strip_dylibs
LDFLAGS_EX = -mdynamic-no-pic
LDFLAGS_SL = 
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm 
VERSION = PostgreSQL 9.0.5

我想知道如何更改 pg_config(以便我可以设置 CC = gcc-4.2)或类似的东西。

【问题讨论】:

    标签: postgresql


    【解决方案1】:

    pg_config 只是一个提供信息的实用程序,它不是您可以编辑属性的典型意义上的“配置”。如果您想更改 pg_config 提供的值,则需要在 util 之外手动执行此操作(在您的情况下,您需要安装新的 C 编译器)。

    【讨论】:

    • 确认这一点,在这些注释中,您会发现 --configure 参数不是配置给定 pg_config 的一种方式,但只能在构建时使用:--configure: Print the options that were given to the configure script when PostgreSQL was configured for building. This can be used to reproduce the identical configuration, or to find out with what options a binary package was built. (Note however that binary packages often contain vendor-specific custom patches.)
    猜你喜欢
    • 1970-01-01
    • 2014-01-31
    • 1970-01-01
    • 2023-03-11
    • 2011-05-16
    • 2018-12-07
    • 2015-07-20
    • 1970-01-01
    相关资源
    最近更新 更多