Skip to content

build: define more typical HAVE_PTHREAD if pthreads library can be used - #6479

Merged
marisn merged 2 commits into
OSGeo:mainfrom
marisn:have_pthread
Oct 17, 2025
Merged

marisn merged 2 commits into
OSGeo:mainfrom
marisn:have_pthread

Conversation

@marisn

@marisn marisn commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

At the moment we usually just check for presence of pthread headers and then assume pthread library is also fine. This PR introduces more common HAVE_PTHREAD that generally should be used instead of HAVE_PTHREAD_H in most of our cases.

Actual change is only in configure.ac, the rest is just a side effect of running autoreconf

Comment thread include/grass/config.h.in
Comment thread include/grass/config.h.in Outdated
@marisn
marisn requested a review from echoix October 10, 2025 11:42
Comment thread include/grass/config.h.in Outdated
Comment thread configure.ac Outdated

@wenzeslaus wenzeslaus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe that's because I'm viewing this on my phone, but does the PR description capture what is in the changes? I can't match one to the other.

wenzeslaus
wenzeslaus previously approved these changes Oct 10, 2025

@wenzeslaus wenzeslaus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As far as the content goes, this is fine with me, except two three things:

  1. Description of the minGW and OpenGL changes should be included somewhere.
  2. Why this does not include CMake change? (Included in #6480)
  3. OpenGL needs fixes for macOS which now fails in /Users/runner/work/grass/grass/lib/ogsf

Since I already tested the follow-up PR #6480, I see that this is valuable and generally functional.

@wenzeslaus

Copy link
Copy Markdown
Member

Correction of my comment: The macOS build fails on the follow-up PR #6480 (I suppose because the OpenGL fixes are only here).

@marisn
marisn marked this pull request as draft October 13, 2025 06:58
@marisn

marisn commented Oct 13, 2025

Copy link
Copy Markdown
Contributor Author

Maybe that's because I'm viewing this on my phone, but does the PR description capture what is in the changes? I can't match one to the other.

Yes, because three lines of code revealed a problem in our build system. I'll create a separate PR with build system fixes to be merged first and then reference it here. Thus there will be a chain of PRs to be merged to get #6480 in.

CMake experts can comment more on this, but as I understood, modern CMake practice is to not pollute global space with local defines.

@marisn
marisn marked this pull request as ready for review October 17, 2025 06:21
@marisn
marisn requested review from echoix and wenzeslaus October 17, 2025 06:22
@marisn

marisn commented Oct 17, 2025

Copy link
Copy Markdown
Contributor Author

As most changes went away with #6509, this PR now is tight and tidy.

@echoix echoix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If changing the configure.ac, shouldn't the configure and config.h.in be regenerated? I was expecting changes in more than a file

@marisn

marisn commented Oct 17, 2025

Copy link
Copy Markdown
Contributor Author

If changing the configure.ac, shouldn't the configure and config.h.in be regenerated? I was expecting changes in more than a file

You are right. Here you go. I was too focused on getting other changes out of this PR :D

@wenzeslaus wenzeslaus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice and clean.

@marisn
marisn merged commit 85b38da into OSGeo:main Oct 17, 2025
27 checks passed
@marisn
marisn deleted the have_pthread branch October 17, 2025 14:54
@github-actions github-actions Bot added this to the 8.5.0 milestone Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants