Darrell Walisser
2016-09-01 19:34:23 UTC
After much effort, I have successfully produced a cross-compiled audacity
for Windows on Linux. If you recall, I decided to try this mainly to test
the OpenMP patch on Windows. Well I did, and it works!
There are binaries for download at https://goo.gl/Z6nZQR if you want to try
it out (both openmp and non-openmp). I'm not sure how to test it all but I
haven't seen anything wrong as yet.
The build will be fast and easy with the changes I have made, it will
basically be:
- install mxe (http://mxe.cc/)
- make the mxe packages for a few things that are currently broken
(libsndfile, portaudio)
- build wxWidgets or use the mxe package
- configure audacity and make
Besides OpenMP support on windows, this approach may have other benefits:
- faster compilation (about 5 minutes from "git clean -dfx" to audacity.exe)
- build or test automation since it all happens at linux command prompt
- also runs in wine so tools like memcheck/helgrind could be used to
instrument the windows build
There are a lot of changes, but before I start any pull request I need to
start a discussion on some issues.
1. There are many changes to confgure.ac, Makefile.am etc. I will of course
verify I did not break the build on Linux, but will need help on Mac.
Should I also provide the resulting configure/Makefile.in? Provided that
the autotools version is higher and autotools didn't spew warnings/errors
am I safe?
2. I am using stock wxWidgets from mxe, which means I had to disable the
high dpi fix in audacity. Is audacity/wxWidgets on github the version with
all patches applied? I could try compiling wxWidgets myself and see what
changes.
3. I'm using the static build of wxWidgets from mxe. How important is it to
have a shared wxWidgets library? If this is a top priority I guess I go
there next.
4. I couldn't compile with --std=c++11, I had to use --std=gnu++11 due to
this bug:
http://stackoverflow.com/questions/27285706/trouble-using-wxwidgets-3-0-2-library-under-mingw-64.
Which resulting in link errors. Maybe that could be patched in wxwidgets
5. I had to replace wxIsNan() with std::isnan everywhere, due to another
wxWidgets bug, which will not be fixed according to this pull request:
https://github.com/wxWidgets/wxWidgets/pull/283, this might not work on the
not-quite-there-yet c++11 compilers that we need to support (which are? OS
X...?)
6. I have broken the msvc build since I needed to split the common win32
code out from msvc code in portaudio. But it should be simple to correct,
if someone wants to help that would be nice so I don't have to get a Visual
Studio environment setup.
for Windows on Linux. If you recall, I decided to try this mainly to test
the OpenMP patch on Windows. Well I did, and it works!
There are binaries for download at https://goo.gl/Z6nZQR if you want to try
it out (both openmp and non-openmp). I'm not sure how to test it all but I
haven't seen anything wrong as yet.
The build will be fast and easy with the changes I have made, it will
basically be:
- install mxe (http://mxe.cc/)
- make the mxe packages for a few things that are currently broken
(libsndfile, portaudio)
- build wxWidgets or use the mxe package
- configure audacity and make
Besides OpenMP support on windows, this approach may have other benefits:
- faster compilation (about 5 minutes from "git clean -dfx" to audacity.exe)
- build or test automation since it all happens at linux command prompt
- also runs in wine so tools like memcheck/helgrind could be used to
instrument the windows build
There are a lot of changes, but before I start any pull request I need to
start a discussion on some issues.
1. There are many changes to confgure.ac, Makefile.am etc. I will of course
verify I did not break the build on Linux, but will need help on Mac.
Should I also provide the resulting configure/Makefile.in? Provided that
the autotools version is higher and autotools didn't spew warnings/errors
am I safe?
2. I am using stock wxWidgets from mxe, which means I had to disable the
high dpi fix in audacity. Is audacity/wxWidgets on github the version with
all patches applied? I could try compiling wxWidgets myself and see what
changes.
3. I'm using the static build of wxWidgets from mxe. How important is it to
have a shared wxWidgets library? If this is a top priority I guess I go
there next.
4. I couldn't compile with --std=c++11, I had to use --std=gnu++11 due to
this bug:
http://stackoverflow.com/questions/27285706/trouble-using-wxwidgets-3-0-2-library-under-mingw-64.
Which resulting in link errors. Maybe that could be patched in wxwidgets
5. I had to replace wxIsNan() with std::isnan everywhere, due to another
wxWidgets bug, which will not be fixed according to this pull request:
https://github.com/wxWidgets/wxWidgets/pull/283, this might not work on the
not-quite-there-yet c++11 compilers that we need to support (which are? OS
X...?)
6. I have broken the msvc build since I needed to split the common win32
code out from msvc code in portaudio. But it should be simple to correct,
if someone wants to help that would be nice so I don't have to get a Visual
Studio environment setup.