macos exported symbols list not used for loadable modules

Started by Peter Eisentraut11 months ago3 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

On macOS, when building with the make system, the exported symbols list
(SHLIB_EXPORTS) is ignored. I don't think that is intentional. It was
probably just forgotten, since that combination has never actually been
used until now (for libpq-oauth).

(Alternatively: Am I missing something? Is this combination not useful?
Was it not supported in older versions at some point? I couldn't
think of anything.)

The meson build system handles this correctly.

I suggest that we fix this. I attach patch 0001 with a minimal fix,
patch 0002 is a bit more refactoring to make the code match the layout
for other platforms.

Attachments:

0001-Use-exported-symbols-list-on-macOS-for-loadable-modu.patchtext/plain; charset=UTF-8; name=0001-Use-exported-symbols-list-on-macOS-for-loadable-modu.patchDownload+1-2
0002-Refactor-export-symbols-list-handling-on-macOS-a-bit.patchtext/plain; charset=UTF-8; name=0002-Refactor-export-symbols-list-handling-on-macOS-a-bit.patchDownload+3-4
#2Jacob Champion
jacob.champion@enterprisedb.com
In reply to: Peter Eisentraut (#1)
Re: macos exported symbols list not used for loadable modules

On Tue, Jun 3, 2025 at 12:48 AM Peter Eisentraut <peter@eisentraut.org> wrote:

On macOS, when building with the make system, the exported symbols list
(SHLIB_EXPORTS) is ignored. I don't think that is intentional. It was
probably just forgotten, since that combination has never actually been
used until now (for libpq-oauth).

Oops, thank you for noticing that.

(Alternatively: Am I missing something? Is this combination not useful?
Was it not supported in older versions at some point? I couldn't
think of anything.)

The meson build system handles this correctly.

I suggest that we fix this. I attach patch 0001 with a minimal fix,
patch 0002 is a bit more refactoring to make the code match the layout
for other platforms.

LGTM, and works on my machine. Unfortunately I don't have any insight
into the history.

Thanks!
--Jacob

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Jacob Champion (#2)
Re: macos exported symbols list not used for loadable modules

On 05.06.25 19:28, Jacob Champion wrote:

On Tue, Jun 3, 2025 at 12:48 AM Peter Eisentraut <peter@eisentraut.org> wrote:

On macOS, when building with the make system, the exported symbols list
(SHLIB_EXPORTS) is ignored. I don't think that is intentional. It was
probably just forgotten, since that combination has never actually been
used until now (for libpq-oauth).

Oops, thank you for noticing that.

(Alternatively: Am I missing something? Is this combination not useful?
Was it not supported in older versions at some point? I couldn't
think of anything.)

The meson build system handles this correctly.

I suggest that we fix this. I attach patch 0001 with a minimal fix,
patch 0002 is a bit more refactoring to make the code match the layout
for other platforms.

LGTM, and works on my machine. Unfortunately I don't have any insight
into the history.

Ok, fix committed.