[FIX] Fix for pgxs on darwin and other platforms...

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: [FIX] Fix for pgxs on darwin and other platforms...
Date: 2004-12-17 01:43:44
Message-ID: 1647166E-4FCD-11D9-8785-000A95C705DC@chittenden.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

pgxs on darwin is currently broken. The behavior before was to use
-bundle_loader with a bogus directory that didn't exist. It should be
using $(DESTDIR)$(bindir) instead of something based off of $(topdir),
which appears to not be set correctly either (but that's a different
problem).

> 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

Attachment Content-Type Size
patch.txt text/plain 2.3 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-12-17 01:44:52 Re: [PATCHES] Patch to add version numbers to
Previous Message Tom Lane 2004-12-17 01:20:43 Re: [PATCHES] Patch to add version numbers to libpq.rc