[Git][pulseaudio/webrtc-audio-processing][master] 8 commits: meson: Fixes for MSVC build
Arun Raghavan (@arun)
gitlab at gitlab.freedesktop.org
Wed Jan 22 22:39:31 UTC 2025
Arun Raghavan pushed to branch master at PulseAudio / webrtc-audio-processing
Commits:
c555fb6e by Nirbheek Chauhan at 2025-01-09T16:35:01-05:00
meson: Fixes for MSVC build
winsock2.h must be included before windows.h or alternative
definitions of `struct sockaddr` are defined.
```
FAILED: webrtc/rtc_base/liblibbase.a.p/logging.cc.obj
"cl" "-Iwebrtc\rtc_base\liblibbase.a.p" "-Iwebrtc\rtc_base" "-I..\webrtc\rtc_base" "-Iwebrtc" "-I..\webrtc" "-Isubprojects\abseil-cpp-20230125.1" "-I..\subprojects\abseil-cpp-20230125.1" "/MD" "/nologo" "/showIncludes" "/utf-8" "/Zc:__cplusplus" "/W2" "/EHsc" "/std:c++17" "/permissive-" "/O2" "/Zi" "-DWEBRTC_LIBRARY_
IMPL" "-DWEBRTC_ENABLE_SYMBOL_EXPORT" "-DNDEBUG" "-DWEBRTC_WIN" "-D_WIN32" "-U__STRICT_ANSI__" "-D__STDC_FORMAT_MACROS=1" "-DNOMINMAX" "-DWEBRTC_ENABLE_AVX2" "/Fdwebrtc\rtc_base\liblibbase.a.p\logging.cc.pdb" /Fowebrtc/rtc_base/liblibbase.a.p/logging.cc.obj "/c" ../webrtc/rtc_base/logging.cc
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(103): warning C4005: 'AF_IPX': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(457): note: see previous definition of 'AF_IPX'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(147): warning C4005: 'AF_MAX': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(476): note: see previous definition of 'AF_MAX'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(187): warning C4005: 'SO_DONTLINGER': macro redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(399): note: see previous definition of 'SO_DONTLINGER'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(240): error C2011: 'sockaddr': 'struct' type redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(482): note: see declaration of 'sockaddr'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2143: syntax error: missing '}' before 'constant'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2059: syntax error: 'constant'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C2143: syntax error: missing ';' before '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...
```
- - - - -
1818e5eb by Arun Raghavan at 2025-01-09T16:36:34-05:00
patches: Track patch for Windows builds
- - - - -
222790ad by Arun Raghavan at 2025-01-10T12:01:31-05:00
meson: Update abseil-cpp wrap for missing headers
- - - - -
f8a6ea0a by Arun Raghavan at 2025-01-10T12:49:22-05:00
meson: Add absl_numeric as a dep
Another implicit cascading dependency.
- - - - -
a9f97c9f by Arun Raghavan at 2025-01-10T15:07:34-05:00
Some fixes for MinGW
* Rename Windows.h uses to windows.h
* Comment out structured exception handling usage
Makes MinGW happier. Mostly the same as previous work by
Nicolas Dufresne <nicolas.dufresne at collabora.com>, with the exception
that we now don't try to invoke RaiseException which would fail in MinGW
as it raises a Windows structured exception.
- - - - -
a24b45cc by Arun Raghavan at 2025-01-10T15:07:56-05:00
patches: Track some MinGW fixups
- - - - -
8f445c36 by Arun Raghavan at 2025-01-22T17:30:47-05:00
meson: Bump version to 2.1
- - - - -
846fe90a by Arun Raghavan at 2025-01-22T17:32:18-05:00
doc: Add release notes for v2.1
- - - - -
8 changed files:
- NEWS
- meson.build
- + patches/0001-Some-fixes-for-MinGW.patch
- + patches/0001-meson-Fixes-for-MSVC-build.patch
- subprojects/abseil-cpp.wrap
- webrtc/rtc_base/logging.cc
- webrtc/rtc_base/platform_thread_types.cc
- webrtc/rtc_base/system/file_wrapper.cc
Changes:
=====================================
NEWS
=====================================
@@ -1,3 +1,10 @@
+Release 2.1
+-----------
+
+Build-system fixups to install more headers, add a missing absl dependency, and
+forward port some missing patches to fix Windows builds.
+
+
Release 2.0
-----------
=====================================
meson.build
=====================================
@@ -1,5 +1,5 @@
project('webrtc-audio-processing', 'c', 'cpp',
- version : '2.0',
+ version : '2.1',
meson_version : '>= 0.63',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized',
@@ -52,6 +52,7 @@ absl_dep = [
dependency('absl_base', default_options: ['cpp_std=c++17'], version: '>=20240722'),
dependency('absl_flags'),
dependency('absl_strings'),
+ dependency('absl_numeric'),
dependency('absl_synchronization'),
dependency('absl_bad_optional_access'),
]
@@ -62,6 +63,7 @@ if absl_dep[0].type_name() == 'internal'
absl_subproj.get_variable('absl_base_headers'),
absl_subproj.get_variable('absl_flags_headers'),
absl_subproj.get_variable('absl_strings_headers'),
+ absl_subproj.get_variable('absl_numeric_headers'),
absl_subproj.get_variable('absl_synchronization_headers'),
absl_subproj.get_variable('absl_types_headers'),
]
=====================================
patches/0001-Some-fixes-for-MinGW.patch
=====================================
@@ -0,0 +1,51 @@
+From a9f97c9fdd490e35bd43d6463424eee5b44c4a7d Mon Sep 17 00:00:00 2001
+From: Arun Raghavan <arun at asymptotic.io>
+Date: Fri, 18 Jun 2021 18:40:32 -0400
+Subject: [PATCH] Some fixes for MinGW
+
+ * Rename Windows.h uses to windows.h
+ * Comment out structured exception handling usage
+
+Makes MinGW happier. Mostly the same as previous work by
+Nicolas Dufresne <nicolas.dufresne at collabora.com>, with the exception
+that we now don't try to invoke RaiseException which would fail in MinGW
+as it raises a Windows structured exception.
+---
+ webrtc/rtc_base/platform_thread_types.cc | 2 ++
+ webrtc/rtc_base/system/file_wrapper.cc | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/webrtc/rtc_base/platform_thread_types.cc b/webrtc/rtc_base/platform_thread_types.cc
+index e98e8ec..1a24881 100644
+--- a/webrtc/rtc_base/platform_thread_types.cc
++++ b/webrtc/rtc_base/platform_thread_types.cc
+@@ -118,11 +118,13 @@ void SetCurrentThreadName(const char* name) {
+
+ #pragma warning(push)
+ #pragma warning(disable : 6320 6322)
++#ifndef __MINGW32__
+ __try {
+ ::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(ULONG_PTR),
+ reinterpret_cast<ULONG_PTR*>(&threadname_info));
+ } __except (EXCEPTION_EXECUTE_HANDLER) { // NOLINT
+ }
++#endif
+ #pragma warning(pop)
+ #elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
+ prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT
+diff --git a/webrtc/rtc_base/system/file_wrapper.cc b/webrtc/rtc_base/system/file_wrapper.cc
+index 12c27a5..3203bc6 100644
+--- a/webrtc/rtc_base/system/file_wrapper.cc
++++ b/webrtc/rtc_base/system/file_wrapper.cc
+@@ -22,7 +22,7 @@
+ #include "rtc_base/numerics/safe_conversions.h"
+
+ #ifdef _WIN32
+-#include <Windows.h>
++#include <windows.h>
+ #else
+ #endif
+
+--
+2.47.1
+
=====================================
patches/0001-meson-Fixes-for-MSVC-build.patch
=====================================
@@ -0,0 +1,46 @@
+From c555fb6eaf0568c2205bbd197ebbcc0e85714c77 Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek at centricular.com>
+Date: Fri, 26 May 2023 02:20:56 +0530
+Subject: [PATCH] meson: Fixes for MSVC build
+
+winsock2.h must be included before windows.h or alternative
+definitions of `struct sockaddr` are defined.
+
+```
+FAILED: webrtc/rtc_base/liblibbase.a.p/logging.cc.obj
+"cl" "-Iwebrtc\rtc_base\liblibbase.a.p" "-Iwebrtc\rtc_base" "-I..\webrtc\rtc_base" "-Iwebrtc" "-I..\webrtc" "-Isubprojects\abseil-cpp-20230125.1" "-I..\subprojects\abseil-cpp-20230125.1" "/MD" "/nologo" "/showIncludes" "/utf-8" "/Zc:__cplusplus" "/W2" "/EHsc" "/std:c++17" "/permissive-" "/O2" "/Zi" "-DWEBRTC_LIBRARY_
+IMPL" "-DWEBRTC_ENABLE_SYMBOL_EXPORT" "-DNDEBUG" "-DWEBRTC_WIN" "-D_WIN32" "-U__STRICT_ANSI__" "-D__STDC_FORMAT_MACROS=1" "-DNOMINMAX" "-DWEBRTC_ENABLE_AVX2" "/Fdwebrtc\rtc_base\liblibbase.a.p\logging.cc.pdb" /Fowebrtc/rtc_base/liblibbase.a.p/logging.cc.obj "/c" ../webrtc/rtc_base/logging.cc
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(103): warning C4005: 'AF_IPX': macro redefinition
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(457): note: see previous definition of 'AF_IPX'
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(147): warning C4005: 'AF_MAX': macro redefinition
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(476): note: see previous definition of 'AF_MAX'
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(187): warning C4005: 'SO_DONTLINGER': macro redefinition
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(399): note: see previous definition of 'SO_DONTLINGER'
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(240): error C2011: 'sockaddr': 'struct' type redefinition
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um\winsock.h(482): note: see declaration of 'sockaddr'
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2143: syntax error: missing '}' before 'constant'
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(442): error C2059: syntax error: 'constant'
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C2143: syntax error: missing ';' before '}'
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
+C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared\ws2def.h(496): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
+...
+```
+---
+ webrtc/rtc_base/logging.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/webrtc/rtc_base/logging.cc b/webrtc/rtc_base/logging.cc
+index 61a3c66..825c686 100644
+--- a/webrtc/rtc_base/logging.cc
++++ b/webrtc/rtc_base/logging.cc
+@@ -15,6 +15,7 @@
+ #if RTC_LOG_ENABLED()
+
+ #if defined(WEBRTC_WIN)
++#include <winsock2.h>
+ #include <windows.h>
+ #if _MSC_VER < 1900
+ #define snprintf _snprintf
+--
+2.47.1
+
=====================================
subprojects/abseil-cpp.wrap
=====================================
@@ -3,11 +3,11 @@ directory = abseil-cpp-20240722.0
source_url = https://github.com/abseil/abseil-cpp/releases/download/20240722.0/abseil-cpp-20240722.0.tar.gz
source_filename = abseil-cpp-20240722.0.tar.gz
source_hash = f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3
-patch_filename = abseil-cpp_20240722.0-1_patch.zip
-patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20240722.0-1/get_patch
-patch_hash = 692bbbc39cacaba4dc4b0c8b2fbbe32736c9cde6377acfa0d52088797af14ded
-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/abseil-cpp_20240722.0-1/abseil-cpp-20240722.0.tar.gz
-wrapdb_version = 20240722.0-1
+patch_filename = abseil-cpp_20240722.0-3_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/abseil-cpp_20240722.0-3/get_patch
+patch_hash = 12dd8df1488a314c53e3751abd2750cf233b830651d168b6a9f15e7d0cf71f7b
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/abseil-cpp_20240722.0-3/abseil-cpp-20240722.0.tar.gz
+wrapdb_version = 20240722.0-3
[provide]
absl_base = absl_base_dep
=====================================
webrtc/rtc_base/logging.cc
=====================================
@@ -15,6 +15,7 @@
#if RTC_LOG_ENABLED()
#if defined(WEBRTC_WIN)
+#include <winsock2.h>
#include <windows.h>
#if _MSC_VER < 1900
#define snprintf _snprintf
=====================================
webrtc/rtc_base/platform_thread_types.cc
=====================================
@@ -118,11 +118,13 @@ void SetCurrentThreadName(const char* name) {
#pragma warning(push)
#pragma warning(disable : 6320 6322)
+#ifndef __MINGW32__
__try {
::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(ULONG_PTR),
reinterpret_cast<ULONG_PTR*>(&threadname_info));
} __except (EXCEPTION_EXECUTE_HANDLER) { // NOLINT
}
+#endif
#pragma warning(pop)
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT
=====================================
webrtc/rtc_base/system/file_wrapper.cc
=====================================
@@ -22,7 +22,7 @@
#include "rtc_base/numerics/safe_conversions.h"
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#else
#endif
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/compare/845e79a2a79966609a8009631bce7da71a8c9de7...846fe90a289f58b7c9303a635142aa2c7caa93e5
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/compare/845e79a2a79966609a8009631bce7da71a8c9de7...846fe90a289f58b7c9303a635142aa2c7caa93e5
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20250122/8b21604a/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list