[FIX] Fix for pgxs on darwin and other platforms... - Mailing list pgsql-patches

From Sean Chittenden
Subject [FIX] Fix for pgxs on darwin and other platforms...
Date
Msg-id 1647166E-4FCD-11D9-8785-000A95C705DC@chittenden.org
Whole thread Raw
Responses Re: [FIX] Fix for pgxs on darwin and other platforms...  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



--
Sean Chittenden

Attachment

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers-win32] Patch to add version numbers to
Next
From: Tom Lane
Date:
Subject: Re: [FIX] Fix for pgxs on darwin and other platforms...