Обсуждение: postgresql 9.0.4 source compilation issue on OSX
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.
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.cmake[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.cmake -C ../../../contrib/spi refint.somake[3]: pg_config: Command not foundmake[3]: *** No rule to make target `refint.so'. Stop.make[2]: *** [../../../contrib/spi/refint.so] Error 2make[2]: *** Waiting for unfinished jobs....make[1]: *** [install] Error 2make: *** [install] Error 2==> Exit Status: 2==> EnvironmentHOMEBREW_VERSION: 0.8HEAD: 3c7142478ab167c79e0d30a5d1a580ce6bce596fHOMEBREW_PREFIX: /usr/localHOMEBREW_CELLAR: /usr/local/CellarHOMEBREW_REPOSITORY: /usr/localHOMEBREW_LIBRARY_PATH: /usr/local/Library/HomebrewHardware: dual-core 64-bit penrynOS X: 10.6.7Kernel Architecture: x86_64Ruby: 1.8.7-174/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/rubyXcode: 3.2.6GCC-4.0: build 5494GCC-4.2: build 5666LLVM: build 2335MacPorts or Fink? falseX11 installed? true==> Build FlagsCC: /usr/bin/cc => /usr/bin/gcc-4.2CXX: /usr/bin/c++ => /usr/bin/c++-4.2LD: /usr/bin/cc => /usr/bin/gcc-4.2CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2 -I/usr/local/Cellar/ossp-uuid/1.6.2/includeCXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2CPPFLAGS: -I/usr/local/Cellar/readline/6.2.1/includeLDFLAGS: -L/usr/local/Cellar/readline/6.2.1/lib -L/usr/local/Cellar/ossp-uuid/1.6.2/libMAKEFLAGS: -j2PKG_CONFIG_PATH: /usr/local/Cellar/readline/6.2.1/lib/pkgconfig
On Thu, Jun 9, 2011 at 2:59 AM, Bhavin Kamani <bhavinkamani@gmail.com> 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
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 <robertmhaas@gmail.com> wrote:
On Thu, Jun 9, 2011 at 2:59 AM, Bhavin Kamani <bhavinkamani@gmail.com> wrote:I'm not exactly sure what's going on here, but contrib modules can be
> 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.
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