After compiling Audacity with MinGW, a strange message appeared on the console after the executable was launched:
# ./Audacity.exe
Usage: C:\msys64\home\Carlo\a\bin\Audacity.exe [OPTION]... INPUT...
Validate RDF data
-h Display this help and exit
-l Print errors on a single line.
-v Display version information and exit
Validate RDF data. This is a simple validator which checks
that all used properties are actually defined. It does not do
any fancy file retrieval, the files passed on the command line
are the only data that is read. In other words, you must pass
the definition of all vocabularies used on the command line.
The problem happens because the file lv2/sord/src/sord_validate.c contains a main() function that was called by crt startup code instead of the one in the main sources of Audacity. The solution is to not include this unneeded file.
If you try to build local LAME with CMake for i686, you get many error messages like this one:
C:/cygwin64/home/Carlo/audacity/lib-src/libmp3lame/vector/xmm_quantize_sub.c: In function 'init_xrpow_core_sse':
C:/cygwin64/home/Carlo/audacity/lib-src/libmp3lame/vector/xmm_quantize_sub.c:72:18: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
The solution is to add the option provided by SSE_FLAGS.
So, I replicated in this PR the same fix made for local soundtouch library.
Cliff noticed that the CMake git ident was not being updated when
pulling new changes. This was because it was getting captured at
configuration time and, even if you pull more changes, the CMake
configuration may not be redone automatically if the build files
weren't also changed.
So, this adds a new target to get the information at build time
instead.
When doing the final link of Audacity executable on Cygwin, many errors like this one were printed on the console:
ld: ../lib/audacity/libportmidi.a(portmidi.c.o):portmidi.c:(.text+0x3f): undefined reference to `pm_alloc'
This happened because some files were missing since Cygwin name was not included together with other unix platforms.
* [CMAKE] Portaudio: add unix paths for Cygwin
When building on Cygwin, I got this error:
/home/carlo/audacity/lib-src/portaudio-v19/src/hostapi/oss/pa_unix_oss.c:90:10: fatal error: pa_unix_util.h: No such file or directory
90 | #include "pa_unix_util.h"
this happened because some additional search path was not included.
* [CMAKE] Portaudio: add missing Unix files in Cygwin
When doing the final link of Audacity executable on Cygwin, many errors like this one were printed on the console.
/usr/lib/gcc/x86_64-pc-cygwin/9.2.0/../../../../x86_64-pc-cygwin/bin/ld: CMakeFiles/Audacity.dir/AudioIO.cpp.o:AudioIO.cpp:(.text+0x17a): undefined reference to `PaUtil_GetTime'
This happened because some files were missing since Cygwin name was not included together with other unix platforms.
And added a python version that will be used on all platforms
when a suitable msgfmt isn't installed. (As long as python
is installed.)
Extracted all the Audacity specific functions from main cmake
list and moved them to their own module.
Rearrange the main cmake module a bit and misc. cleanup.
This corrects linking of the wxWidgets libraries when there's multiple
copies and the desired one is later in the search path. This can affect
any non-Windows system that doesn't have it's wxWidgets in "standard"
libraries (like our wxWidgets builds on the Mac).
The wrong wxWidgets libraries can be picked up by the linker if other
"-L" arguments appear before the wxWidgets specific on. This can happen
if you have something like Homebrew installed and CMake finds one of the
libraries (like libogg) installed. It will put a "-L/usr/local/lib" in
the linker arguments before the "-L/usr/local/x86_64" wxWidgets flag,
and if there happens to be wxWidgets libs in /usr/local/lib, the linker
will pull the wxWidgets libs from /usr/local/lib...not what was wanted.
Forgot to actually exclude mod-null and mod-nyq-bench from the
build.
Fixed a few typos.
And removed "zip" from the package install on Ubuntu since it's
not needed anymore.
Restore the wxDEBUG_LEVEL defines for the module builds. It is
currently required (see explanation in CMakeLists.txt)
Add explanantion of why wxWidgets_USE_REL_AND_DBG=NO is needed
for the Github Windows build.
Further restrict the disabling dynamic loading for Windows and Mac
of the Lame and FFmpeg libs. Some corrections need to be made in
ExportMP3.cpp (and probably some for FFmpeg as well).
And don't build mod-nyq-bench or mod-null by default until they
can be fixed. (They fail to build.)
Visual Studio NuGet package handling was redone to correct a
chicken and egg situation. (See the nuget_package() function
in audacity/CMakeLists.txt.
Due to the change in NuGet handling, was finally able to make
the Audacity target dependent on several other targets. This
ensures the destination directory is populated correctly.
Library handling for system packages reworked to ensure the
correct libraries are used and to "workaround" an issue where
the libraries weren't being included in the link command...no
idea why. New way is better anyway.
Don't allow a system library for SBSMS since it seems we have
a unique (Audacity-only???) version.
Don't define wxDEBUG_LEVEL. It's not needed and causes duplicate
symbol warnings.
A couple of small changes to config files to remove libmad and
libsndfile warnings.
Do not include serdi.c and sordi.c in the LV2 build.
Fix handling of static Lame and linked FFmpeg libs.
Use cmake file() instead of gcc/awk to extract version information
from Audacity.h for the Mac Info.plist.
Use "cmake -E tar" to zip artifacts in github action.
Mostly from suggestions, but there's a couple of other minor
fixes and additions:
Cmake not decides with SDK to use on Windows
All Audacity cmake options are not prefixed with "audacity_", but this
is configurable in audacity/CMakeLists.txt
Several other options have been marked advanced so they don't clutter
the CMake GUI
On Windows, multiple processors will now be used reducing build time
considerably
Quieted a couple of package messages that the user doesn't need to see
No longer tried to create aliases on Windows
No longer used precompiled headers if ccache is available
On Windows, only copies the needed wxWidgets and VC runtime libraries
to the bin directory
I'm sure there will be further minor updates, but this
should be the last major update and it should be ready
for testing.
Audacity specific cmake options (cmake -Doption=<yes|no>) include:
// Disable dynamic loading of ffmpeg libraries
disable_dynamic_ffmpeg:BOOL=OFF
// Disable dynamic loading of JACK libraries
disable_dynamic_jack:BOOL=ON
// Enable ffmpeg library
enable_ffmpeg:BOOL=ON
// Enable flac library
enable_flac:BOOL=ON
// Enable id3tag library
enable_id3tag:BOOL=ON
// Enable LADSPA plug-in support
enable_ladspa:BOOL=ON
// Enable lv2 library
enable_lv2:BOOL=ON
// Enable mad library
enable_mad:BOOL=ON
// Enable midi library
enable_midi:BOOL=ON
// Enable nyquist library
enable_nyquist:BOOL=ON
// Enable ogg library
enable_ogg:BOOL=ON
// Enable portmixer library
enable_portmixer:BOOL=ON
// Enable portsmf library
enable_portsmf:BOOL=ON
// Enable sbsms library
enable_sbsms:BOOL=ON
// Enable soundtouch library
enable_soundtouch:BOOL=ON
// Enable twolame library
enable_twolame:BOOL=ON
// Enable vamp library
enable_vamp:BOOL=ON
// Enable vorbis library
enable_vorbis:BOOL=ON
// Enable VST2 plug-in support
enable_vst:BOOL=ON
// Use system libraries if available
prefer_system_libs:BOOL=ON
// Enable the portaudio ALSA interface if available
use_pa_alsa:BOOL=ON
// Enable the portaudio CoreAudio interface if available
use_pa_coreaudio:BOOL=ON
// Enable the portaudio DirectSound interface if available
use_pa_ds:BOOL=ON
// Use the JACK audio interface if available
use_pa_jack:BOOL=ON
// Use the OSS audio interface if available
use_pa_oss:BOOL=ON
// Enable the portaudio WASAPI interface if available
use_pa_wasapi:BOOL=ON
// Enable the portaudio WMME interface if available
use_pa_wmme:BOOL=ON
// Use ffmpeg system library if available
use_system_ffmpeg:BOOL=ON
// Use flac system library if available
use_system_flac:BOOL=ON
// Use id3tag system library if available
use_system_id3tag:BOOL=ON
// Use lame system library if available
use_system_lame:BOOL=ON
// Use lv2 system library if available
use_system_lv2:BOOL=ON
// Use mad system library if available
use_system_mad:BOOL=ON
// Use midi system library if available
use_system_midi:BOOL=ON
// Use ogg system library if available
use_system_ogg:BOOL=ON
// Use portsmf system library if available
use_system_portsmf:BOOL=ON
// Use sbsms system library if available
use_system_sbsms:BOOL=ON
// Use sndfile system library if available
use_system_sndfile:BOOL=ON
// Use soundtouch system library if available
use_system_soundtouch:BOOL=ON
// Use soxr system library if available
use_system_soxr:BOOL=ON
// Use twolame system library if available
use_system_twolame:BOOL=ON
// Use vamp system library if available
use_system_vamp:BOOL=ON
// Use vorbis system library if available
use_system_vorbis:BOOL=ON
// Use wxwidgets system library if available
use_system_wxwidgets:BOOL=ON
The default is to use the system one if found. If the
WXWIN environment variable is set and points to a valid
wxWidgets tree, that will be used. Otherwise, it will
search the platform specific locations.
You can use a local library instead with:
cmake -Duse_system_wxwigets=no ...
In this case it will look for the WXWIN environment variable
and use that or it will download the Audacity specific wxWidgets
source. In both cases, wxWidgets will be built as part of the
Audacity project.
It's still has some work, but it successfully builds on
all 3 main platforms. Some of the outstanding items
include:
Install target testing (mostly important for Linux)
CMakeList clean up and comments
Debug and Release build verification
Audit of compile/link options
Need a Mac signed and notarized build
(and probably more)
The same story as libexpat's one--native CMakeLists.txt does its job better
than the proxy. Also it seems to be able to otionally build with ASIO support
on Windows. And it successfully builds on linux, freebsd and osx.
It appeared to be usable on Windows but still wasn't flexible. I've
updated it with commands based on the autotools configs and now
filedialog can be built on linux, macos and freebsd using cmake.
cmake-proxies/expat/CMakeLists.txt seems to make more problems than it
solves. But the native one appears doing its job well on multiple
platforms. Tested on Windows, OSX, Linux and FreeBSD.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Author: Vitaliy Kirsanov <krokoziabla@yandex-team.ru>
# Date: Thu Mar 14 19:03:29 2019 +0300
#
# On branch tmp
# Your branch is up to date with 'my/tmp'.
#
# Changes to be committed:
# modified: cmake-proxies/CMakeLists.txt
# deleted: cmake-proxies/expat/CMakeLists.txt
# modified: lib-src/expat/CMakeLists.txt
#
# Changes not staged for commit:
# modified: lib-src/expat/CMakeLists.txt
#
Previously lib-src that we controlled had their cmake files with them. This is clearer.
Also added place holders for help and locale.
Also enabled libvorbis and soundtouch and disabled portburn.