Skip site navigation (1) Skip section navigation (2)

[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 (view raw or flat)
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: patch.txt
Description: text/plain (2.3 KB)

Responses

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group