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

Restore Windows compatibility in Makefile #76

Merged
merged 3 commits into from
Dec 12, 2022
Merged

Restore Windows compatibility in Makefile #76

merged 3 commits into from
Dec 12, 2022

Conversation

crunchyjoea
Copy link
Contributor

Removal of the if conditional in Makefile between 3.0.0 and 4.0.0 breaks Windows Build Compatibility

On Windows, PostgreSQL Build is performed without USE_PGXS.

If PGXS is already defined before the make, Windows fails to generate win32ver.rc which is needed by win32ver.o, and causes the make target to fail.

@keithf4 keithf4 self-requested a review November 21, 2022 17:04
Copy link
Collaborator

@keithf4 keithf4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in email thread, would prefer that PGXS be the default and a flag required to not build that way.

If that's the only thing that's required for building on Windows that should be fine. If anything more needs to be done specifically for Windows, would prefer the suggestion from @pgguru to make a distinct Windows section by detecting the OS.

@crunchyjoea
Copy link
Contributor Author

I've adjusted the logic to make PGXS the default case, and I tried to make the flag specific enough that others wouldn't use it by accident but if you feel it should be renamed let me know!

Makefile Outdated
@@ -8,9 +8,16 @@ REGRESS = set_user

LDFLAGS_SL += $(filter -lm, $(LIBS))

ifdef WINDOWS_DISUSE_PGXS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the non-pgxs build method still seems to be a thing some people are using, and that's all this is really providing an option for, I think it's probably good to just have this be the mode option for now. If things need to be more specialized for Windows, we can make those additions if/when that happens.

Suggested change
ifdef WINDOWS_DISUSE_PGXS
ifdef NO_PGXS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great to me!

@keithf4 keithf4 merged commit 0194125 into pgaudit:master Dec 12, 2022
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