Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG-1246: Do not duplicate makefile object targets #374

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

dutow
Copy link
Collaborator

@dutow dutow commented Dec 9, 2024

Issue: currently pg_tde with make wants to build the same object files twice. Once during the pg_waldump build with Makefile.tools, and once duriong the pg_tde build with Makefile.

As the make rulesystem sees that the object files are already built after the first time, it doesn't rebuild them, resulting in all kinds of issues, either incorrect pg_tde.so or a build failure.

Fix: rename the "frontend" built objects to .frontend instead of .o, and duplicate the build rule for them. This way the object files have a different name, and both will be built.

Note: the -DFRONTEND flag is not present in Makefile.tools, as it is currently added by pg_waldump. The postgres side still requires more refactoring so it feels like less of a hack, and during that, this file can be improved further.

Issue: currently pg_tde with make wants to build the same object
files twice. Once during the pg_waldump build with Makefile.tools,
and once duriong the pg_tde build with Makefile.

As the make rulesystem sees that the object files are already built
after the first time, it doesn't rebuild them, resulting in all
kinds of issues, either incorrect pg_tde.so or a build failure.

Fix: rename the "frontend" built objects to <name>.frontend instead of
<name>.o, and duplicate the build rule for them. This way the object
files have a different name, and both will be built.

Note: the `-DFRONTEND` flag is not present in Makefile.tools, as it
is currently added by pg_waldump. The postgres side still requires
more refactoring so it feels like less of a hack, and during that,
this file can be improved further.
@dutow dutow requested a review from dAdAbird as a code owner December 9, 2024 21:55
@dutow dutow merged commit f0f3e11 into percona:main Dec 10, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants