Bug 96754 - webrtc-audio-processing: Add MinGW build support
Summary: webrtc-audio-processing: Add MinGW build support
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-30 18:39 UTC by Nicolas Dufresne
Modified: 2018-07-30 10:22 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Don't include execinfo.h for windows (1.34 KB, patch)
2016-06-30 18:45 UTC, Nicolas Dufresne
Details | Splinter Review
Don't use MSVC specific exception handler for MINGW (1.04 KB, patch)
2016-06-30 18:45 UTC, Nicolas Dufresne
Details | Splinter Review
Add missing throw in destructor override (938 bytes, patch)
2016-06-30 18:45 UTC, Nicolas Dufresne
Details | Splinter Review
lrint is available with mingw (1.17 KB, patch)
2016-06-30 18:45 UTC, Nicolas Dufresne
Details | Splinter Review
Fix case sensitivity issue with MinGW cross-build (1.25 KB, patch)
2016-06-30 18:45 UTC, Nicolas Dufresne
Details | Splinter Review
Add missing windows specific headers (6.05 KB, patch)
2016-06-30 19:05 UTC, Nicolas Dufresne
Details | Splinter Review
Add missing windows specific headers (4.50 KB, patch)
2016-06-30 19:09 UTC, Nicolas Dufresne
Details | Splinter Review
Fix build on win64 (1.08 KB, patch)
2016-06-30 19:26 UTC, Nicolas Dufresne
Details | Splinter Review
Disable backtrace on android (1.36 KB, patch)
2016-06-30 20:44 UTC, Nicolas Dufresne
Details | Splinter Review
Don't blindly link to pthread (1.15 KB, patch)
2016-06-30 20:50 UTC, Nicolas Dufresne
Details | Splinter Review
Add required define for Windows (893 bytes, patch)
2016-07-05 20:34 UTC, Nicolas Dufresne
Details | Splinter Review
Properly select the right system wrappers (2.46 KB, patch)
2016-07-05 20:34 UTC, Nicolas Dufresne
Details | Splinter Review
Fix case sensitivity in windows include (1.29 KB, patch)
2016-07-05 20:34 UTC, Nicolas Dufresne
Details | Splinter Review
Define MSVC _WIN32 so we can build on mingw (705 bytes, patch)
2016-07-05 20:34 UTC, Nicolas Dufresne
Details | Splinter Review
Add missing windows conditions variable (23.85 KB, patch)
2016-07-05 20:34 UTC, Nicolas Dufresne
Details | Splinter Review
Link against winmm on Windows (853 bytes, patch)
2016-07-05 20:34 UTC, Nicolas Dufresne
Details | Splinter Review
Add required define for Windows (948 bytes, patch)
2016-07-05 21:29 UTC, Nicolas Dufresne
Details | Splinter Review
Properly select the right system wrappers (2.46 KB, patch)
2016-07-05 21:30 UTC, Nicolas Dufresne
Details | Splinter Review
Properly select the right system wrappers (2.46 KB, patch)
2016-07-05 21:33 UTC, Nicolas Dufresne
Details | Splinter Review
Define MSVC _WIN32 so we can build on mingw (706 bytes, patch)
2016-07-05 21:37 UTC, Nicolas Dufresne
Details | Splinter Review

Description Nicolas Dufresne 2016-06-30 18:39:14 UTC
As of now, the webrtc-audio-processing library cannot be build on Windows. As most of our build system is gcc specific, I'll start with adding MinGW support, even though the code is clearly made for MSVC. Patches coming.
Comment 1 Nicolas Dufresne 2016-06-30 18:45:43 UTC
Created attachment 124808 [details] [review]
Don't include execinfo.h for windows

And that even if we have GLIBC. This fixes a build issue in mingw.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Comment 2 Nicolas Dufresne 2016-06-30 18:45:45 UTC
Created attachment 124809 [details] [review]
Don't use MSVC specific exception handler for MINGW

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Comment 3 Nicolas Dufresne 2016-06-30 18:45:47 UTC
Created attachment 124810 [details] [review]
Add missing throw in destructor override

This is being inforced by mingw.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Comment 4 Nicolas Dufresne 2016-06-30 18:45:50 UTC
Created attachment 124811 [details] [review]
lrint is available with mingw

This make use of lrint when building with mingw. The assembly code
for X86 is MSVC specific and would not build.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Comment 5 Nicolas Dufresne 2016-06-30 18:45:52 UTC
Created attachment 124812 [details] [review]
Fix case sensitivity issue with MinGW cross-build

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Comment 6 Nicolas Dufresne 2016-06-30 19:05:19 UTC
Created attachment 124813 [details] [review]
Add missing windows specific headers
Comment 7 Nicolas Dufresne 2016-06-30 19:09:14 UTC
Created attachment 124814 [details] [review]
Add missing windows specific headers
Comment 8 Nicolas Dufresne 2016-06-30 19:26:29 UTC
Created attachment 124815 [details] [review]
Fix build on win64

This trace function is mixing long int and long long int pointers.
Comment 9 Nicolas Dufresne 2016-06-30 20:44:41 UTC
Created attachment 124817 [details] [review]
Disable backtrace on android

The check get confused if one uses GNU STL rather then STL port.
Comment 10 Nicolas Dufresne 2016-06-30 20:50:00 UTC
Created attachment 124818 [details] [review]
Don't blindly link to pthread

This otherwise breaks the build on Android and Windows.
Comment 11 Nicolas Dufresne 2016-07-05 20:34:17 UTC
Created attachment 124914 [details] [review]
Add required define for Windows

This will also add it to the .pc file as WEBRTC_WIN leaks into the
public interface and undefined __STRICT_ANSI__ so M_PI is available.
Comment 12 Nicolas Dufresne 2016-07-05 20:34:20 UTC
Created attachment 124915 [details] [review]
Properly select the right system wrappers

This is needed for windows build to be usable.
Comment 13 Nicolas Dufresne 2016-07-05 20:34:22 UTC
Created attachment 124916 [details] [review]
Fix case sensitivity in windows include

While cross-compiling from linux, we need all include to be
lower case.
Comment 14 Nicolas Dufresne 2016-07-05 20:34:25 UTC
Created attachment 124917 [details] [review]
Define MSVC _WIN32 so we can build on mingw
Comment 15 Nicolas Dufresne 2016-07-05 20:34:28 UTC
Created attachment 124918 [details] [review]
Add missing windows conditions variable

Those are used by generic RW lock implementation.
Comment 16 Nicolas Dufresne 2016-07-05 20:34:30 UTC
Created attachment 124919 [details] [review]
Link against winmm on Windows
Comment 17 Nicolas Dufresne 2016-07-05 20:38:56 UTC
With that I'm now able to run on Windows with success. Note that an Android patch just slipped in the lot, please ignore, I'll create separate bug for Android and OSX/iOS.

An important aspect is that you need at least version 0x0600 of Windows API to build. Note sure if we should document, check, or simply define it.
Comment 18 Nicolas Dufresne 2016-07-05 21:29:46 UTC
Created attachment 124920 [details] [review]
Add required define for Windows

Added missing ,
Comment 19 Nicolas Dufresne 2016-07-05 21:30:19 UTC
Created attachment 124921 [details] [review]
Properly select the right system wrappers

Was in conflict after previous update.
Comment 20 Nicolas Dufresne 2016-07-05 21:33:58 UTC
Created attachment 124922 [details] [review]
Properly select the right system wrappers

Always better if I don't send the same one.
Comment 21 Nicolas Dufresne 2016-07-05 21:37:37 UTC
Created attachment 124923 [details] [review]
Define MSVC _WIN32 so we can build on mingw

Another one that was rebased
Comment 22 GitLab Migration User 2018-07-30 10:22:27 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/382.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.