gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing -g -bundle pgmemcache.o -L/usr/local/pgsql/lib -L/sw/lib -L/usr/local/lib -lmemcache -bundle_loader /usr/local/pgsql/lib/pgxs/src/makefiles/../../src/backend/postgres -o libpgmemcache.0.0.so
ld: can't open: /usr/local/pgsql/lib/pgxs/src/makefiles/../../src/backend/postgres (No such file or directory, errno = 2)
gnumake: *** [libpgmemcache.0.0.so] Error 1
Exit 2
Post patch:
gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing -g -bundle pgmemcache.o -L/usr/local/pgsql/lib -L/sw/lib -L/usr/local/lib -lmemcache -bundle_loader /usr/local/pgsql/bin/postgres -o libpgmemcache.0.0.so
rm -f libpgmemcache.0.so
ln -s libpgmemcache.0.0.so libpgmemcache.0.so
rm -f libpgmemcache.so
ln -s libpgmemcache.0.0.so libpgmemcache.so
Which is correct. Can someone please get this into the 8.X release that way pgxs is usable for folks on the darwin platform? It doesn't look like this is broken on other major OSes, but some of the oddball platforms (BeOS, cygwin, and win32) don't seem to be correct either. I've included a fixes for them in this patch, but can't promise they'll work. At the very least what I'm supplying is more correct than what they're using now. :-/ It looks like pgxs on the platforms in question has an assumption that pgxs gets called from within the PostgreSQL src tree, which isn't correct after the fact. Thanks. The darwin patch is included below. Thanks in advance. -sc
Index: Makefile.beos
===================================================================
RCS file: /projects/cvsroot/pgsql/src/makefiles/Makefile.beos,v
retrieving revision 1.6
diff -u -r1.6 Makefile.beos
--- Makefile.beos 29 Aug 2001 19:14:40 -0000 1.6
+++ Makefile.beos 17 Dec 2004 01:32:31 -0000
@@ -9,7 +9,7 @@
CFLAGS_SL = -fpic -DPIC
%.so: %.o
- ln -fs $(top_srcdir)/src/backend/postgres _APP_
+ ln -fs $(DESTDIR)$(bindir)/postgres _APP_
$(CC) -nostart -Xlinker -soname=$@ -o $@ _APP_ $<
sqlmansect = 7
Index: Makefile.cygwin
===================================================================
RCS file: /projects/cvsroot/pgsql/src/makefiles/Makefile.cygwin,v
retrieving revision 1.5
diff -u -r1.5 Makefile.cygwin
--- Makefile.cygwin 27 Oct 2004 19:14:07 -0000 1.5
+++ Makefile.cygwin 17 Dec 2004 01:32:31 -0000
@@ -1,7 +1,7 @@
# $PostgreSQL: pgsql/src/makefiles/Makefile.cygwin,v 1.5 2004/10/27 19:14:07
momjian Exp $
DLLTOOL= dlltool
DLLWRAP= dllwrap
-BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
+BE_DLLLIBS= -L$(DESTDIR)$(bindir) -lpostgres
DLLINIT = $(top_builddir)/src/utils/dllinit.o
# linking with -lm or -lc causes program to crash
Index: Makefile.darwin
===================================================================
RCS file: /projects/cvsroot/pgsql/src/makefiles/Makefile.darwin,v
retrieving revision 1.7
diff -u -r1.7 Makefile.darwin
--- Makefile.darwin 27 Oct 2003 07:42:34 -0000 1.7
+++ Makefile.darwin 17 Dec 2004 01:32:31 -0000
@@ -3,7 +3,7 @@
DLSUFFIX = .so
CFLAGS_SL =
-BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres
+BE_DLLLIBS= -bundle_loader $(DESTDIR)$(bindir)/postgres
# Rule for building shared libs (currently used only for regression test
# shlib ... should go away, since this is not really enough knowledge)
Index: Makefile.win32
===================================================================
RCS file: /projects/cvsroot/pgsql/src/makefiles/Makefile.win32,v
retrieving revision 1.6
diff -u -r1.6 Makefile.win32
--- Makefile.win32 17 Nov 2004 17:16:17 -0000 1.6
+++ Makefile.win32 17 Dec 2004 01:32:31 -0000
@@ -5,7 +5,7 @@
DLLTOOL= dlltool
DLLWRAP= dllwrap
-BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
+BE_DLLLIBS= -L$(DESTDIR)$(bindir) -lpostgres
DLLINIT = $(top_builddir)/src/utils/dllinit.o
AROPT = crs
-- Sean Chittenden
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend
