FAQ
I am installing postgresql using homebrew on OSX. I am getting strange
compilation errors. Googling did not help me in getting any lead to the
resolution. When I compile it on a standalone basis (without using brew) I
still get the same error. Compiling 9.1beta1 source package also gave me the
same set of errors.

Any lead/help will be highly appreciated.

- Bhavin


Here's the brief gist of errors along with environment details and here's
the full error log <https://gist.github.com/1014987>.

make -C ../../../src/port all
/usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2
-I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -fwrapv -arch x86_64 -I../../../src/include
-I/usr/local/Cellar/readline/6.2.1/include -I/usr/include/libxml2
-I../../../src/port '-DHOST_TUPLE="x86_64-apple-darwin10.7.0"'
'-DMAKEPROG="make"' '-DSHELLPROG="/bin/sh"' '-DDLSUFFIX=".so"' -c -o
pg_regress.o pg_regress.c
make[3]: Nothing to be done for `all'.
/usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2
-I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -fwrapv -arch x86_64 -I../../../src/include
-I/usr/local/Cellar/readline/6.2.1/include -I/usr/include/libxml2 -c
-o pg_regress_main.o pg_regress_main.c
/usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2
-I/usr/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -fwrapv -arch x86_64 -I../../../src/include
-I/usr/local/Cellar/readline/6.2.1/include -I/usr/include/libxml2 -c
-o regress.o regress.c
make -C ../../../contrib/spi refint.so
make[3]: pg_config: Command not found
make[3]: *** No rule to make target `refint.so'. Stop.
make[2]: *** [../../../contrib/spi/refint.so] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [install] Error 2
make: *** [install] Error 2
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/postgresql.rb#L55
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: 3c7142478ab167c79e0d30a5d1a580ce6bce596f
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.6.7
Kernel Architecture: x86_64
Ruby: 1.8.7-174
/usr/bin/ruby =>
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.2.6
GCC-4.0: build 5494
GCC-4.2: build 5666
LLVM: build 2335
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2
-I/usr/local/Cellar/ossp-uuid/1.6.2/include
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2
CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/include
LDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib
-L/usr/local/Cellar/ossp-uuid/1.6.2/lib
MAKEFLAGS: -j2
PKG_CONFIG_PATH: /usr/local/Cellar/readline/6.2.1/lib/pkgconfig

Search Discussions

  • Robert Haas at Jun 9, 2011 at 1:49 pm

    On Thu, Jun 9, 2011 at 2:59 AM, Bhavin Kamani wrote:
    I am installing postgresql using homebrew on OSX. I am getting strange
    compilation errors. Googling did not help me in getting any lead to the
    resolution. When I compile it on a standalone basis (without using brew) I
    still get the same error. Compiling 9.1beta1 source package also gave me the
    same set of errors.
    Any lead/help will be highly appreciated.
    I'm not exactly sure what's going on here, but contrib modules can be
    built in two ways: with PGXS, or without PGXS. Typically, you compile
    without PGXS when you're building the server and it's contrib modules,
    and with PGXS if the server is already installed (and thus pg_config
    is present) and you just want to compile one more module. Here it
    looks like you're doing an in-tree compile but somehow PGXS is getting
    enabled anyway - not sure what's going on there.

    --
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company
  • Bhavin Kamani at Jun 13, 2011 at 4:25 pm
    Thanks Bob for your lead. I was finally able to solve my issue. I had
    earlier installed the binary version of postgresql. As I had to compile
    certain contrib/modules sometime back, I had chosen to set USE PGXS=1 in my
    .zshrc file. This was causing these errors. It was silly mistake from my
    end. Thanks a ton for your lead which helped me discover the root cause.

    - Bhavin
    On Thu, Jun 9, 2011 at 7:19 PM, Robert Haas wrote:
    On Thu, Jun 9, 2011 at 2:59 AM, Bhavin Kamani wrote:
    I am installing postgresql using homebrew on OSX. I am getting strange
    compilation errors. Googling did not help me in getting any lead to the
    resolution. When I compile it on a standalone basis (without using brew) I
    still get the same error. Compiling 9.1beta1 source package also gave me the
    same set of errors.
    Any lead/help will be highly appreciated.
    I'm not exactly sure what's going on here, but contrib modules can be
    built in two ways: with PGXS, or without PGXS. Typically, you compile
    without PGXS when you're building the server and it's contrib modules,
    and with PGXS if the server is already installed (and thus pg_config
    is present) and you just want to compile one more module. Here it
    looks like you're doing an in-tree compile but somehow PGXS is getting
    enabled anyway - not sure what's going on there.

    --
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedJun 9, '11 at 7:00a
activeJun 13, '11 at 4:25p
posts3
users2
websitepostgresql.org...
irc#postgresql

2 users in discussion

Bhavin Kamani: 2 posts Robert Haas: 1 post

People

Translate

site design / logo © 2021 Grokbase