Re: Re: PATCH: The linker complains about the '-bundle_loader "../../src/backend/postgres"' against PostgreSQL 8.4 on OSX

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Re: PATCH: The linker complains about the '-bundle_loader "../../src/backend/postgres"' against PostgreSQL 8.4 on OSX
Date: 2012-05-06 16:05:45
Message-ID: CA+OCxoyEVm5gnq7ibOSUm256a-veDKr1_NkCzbceomOpyi9cNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Thu, May 3, 2012 at 2:23 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> On 30.04.2012 15:14, Ashesh Vashi wrote:
>>
>> With PostgreSQL 8.4.11, I still face the same issue, resolved as part of
>> the following checked-in:
>>
>> http://git.postgresql.org/gitweb/?p=pldebugger.git;a=commitdiff;h=b9c756ef6cd4bdabea203905b2071d0e6b4e0d4d
>>
>> I tried to resolve the issue by removing the duplicate words for the
>> SHLIB_LINK variable in the Makefile for pldebugger.
>> I just changed it specifically for PostgreSQL 8.4 on OSX platform, because
>> PostgreSQL build script may get changed in future releases (i.e.
>> pldebugger
>> is compiling well with PostgreSQL 9.0+ on OSX because of such
>> modification.)
>>
>> Please find the attached patch for the same.
>> I know - it looks ugly, but I could not think of any other solution at the
>> moment.
>
>
> Hmm, we have to currently jump through a lot of hoops to make the Makefile
> do what we want. First of all, we're building two libraries from the same
> Makefile. The usual PGXS targets don't support that, so I had to hack it so
> that we use the MODULES variable to buld pldbgapi.so, and in addition to
> that, set NAME=plugin_debugger and include src/Makefile.shlib to build
> plugin_debugger.so.
>
> Things would be much simpler if we had a separate subdirectory for building
> plgdbgapi.so and plugin_debugger.so. However, it would be even simpler if we
> just built it all into a single library. At the moment, there's a runtime
> dependency between pldbgapi.so and plugin_debugger.so anyway, so that to use
> any of the functions in pldbgapi.so, you have to load plugin_debugger.so. If
> they were just one library, you could more easily do local debugging without
> having to add plugin_debugger.so to shared_preload_libraries. At the moment
> you get an error about a missing symbol if you try to do that, unless you
> manually LOAD plugin_debugger.so.
>
> Another unusual thing we do is that we install plugin_debugger.so to the
> <installdir>/lib/plugins directory, instead of just <installdir>/lib. We've
> had to add special install and uninstall rules for that.
>
> To make that more straightforward, I think we should just install
> plugin_debugger.so into lib like any other extension. I don't see any
> particular reason why it has to be installed to plugins-directory.
>
> Putting those two together, let's build just a single .so file, called
> plugin_debugger.so, which contains both the PL/pgSQL hooks and the
> client-facing pldbg_* functions used to do debugging. After that, the
> makefile will be much simpler, which means less trouble with OS-specific
> things like this. Not only now, but also in the future if the pgxs makefiles
> are changed - we make quite a few assumptions of the pgxs build system at
> the moment.

Sounds fine - but I'm not keen on making such changes in the back
branches. Can we fix the current problem, and re-architect for 9.2
please?

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2012-05-07 07:18:55 1.16 beta 1 ?
Previous Message Guillaume Lelarge 2012-05-05 20:51:32 pgAdmin III commit: Review of language object