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

{libopenjp2,libxml2,sqlite3}: don't link with pthreads on Windows #1197

Merged
merged 3 commits into from
Sep 23, 2023

Conversation

bgilbert
Copy link
Contributor

libopenjp2 and sqlite3 were configured to use the Win32 threading primitives on Windows, but were being linked with -pthread anyway. Stop doing that. For libopenjp2, we were defining both MUTEX_win32 and MUTEX_pthread; stop doing that too.

libxml2 can use the Win32 primitives, but was taking a dependency on winpthreads instead. Switch to the Win32 primitives.

SQLite uses the Windows threading primitives directly, so linking with
-pthread is unnecessary.
libxml2 can use the Windows threading primitives directly.  Use those if
available, rather than taking a dependency on winpthreads.
OpenJPEG uses the Windows threading primitives directly, so linking with
-pthread is unnecessary.

Also stop defining both MUTEX_win32 and MUTEX_pthread on Windows.
@neheb
Copy link
Collaborator

neheb commented Sep 23, 2023

If I had to guess, more packages have this problem. Good enough here.

@neheb neheb merged commit b8d0aed into mesonbuild:master Sep 23, 2023
7 checks passed
@bgilbert bgilbert deleted the pthread branch September 23, 2023 07:11
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