I am curious what the goal/purpose for compiling Ardour natively in Windows is. I have used the pre-compiled binaries from this site on Windows for years without any issues. Is there a performance advantage you are trying to obtain or is this purely an academic exercise?
Surely academic exercise.
I have another question. Ardour compilation is recommended against specific versions of libraries, plus one-two libraries have been a little customized. It is said that Ardour can be compiled without those customizations, but it wonât look as beautiful.
Now, I thought that this does not apply to Linux, but only to Windows, because there are so many Linux distros and it is unlikely that they have the exact version of libs that Ardour recommends.
This brings me to question why would it be so important on Windows. At the end, it either compiles or not. I tend to think that it should compile everywhere.
It applies to Linux too, and is the reason why we do not provide support for distro-built versions but instead provide our own all-inclusive ready-to-run Linux binary.
The patches we use when creating our own build-stack for the releases are all available. Few of them are absolutely critical, all of them are of some importance.
Ironically, probably the most significant one is actually for macOS - a patch to GTK+ that changes how mouse scroll handling is done. Upstream would not accept it because it alters the semantics of scroll events and the data structures used.
Any news on this? Does Ardour start using the âDummyâ backend?
As for the other errors:
-
ardourcp.dll
is a library used by control protocols, itâs expected to not have a protocol-descriptor. - other ctrl surface seems to load. The only ones that fail are
ardour_contourdesign.dll
andardour_push2.dll
those two use libusb. maybe a missing symbol, or linker issue regarding libusb? - You could try to configure Ardour with
--libjack=weak
that may help withjack_audiobackend.dll
in case the issue is due to missing libjack symbols.
I moved one step forward (I configured including --keepflags --libjack=weak). It still gives the missing descriptor error in ardourcp.dll, but it seems to load the audio backends now, and proceed.
As I am hand-picking each dll, to see which one is really required, and I see the errors of missing libraries when I launch ardour, I was at a point where the exe was giving no error, but maybe some other required dll was still missing. After I added the libusb dll, it seems that the backends could be loaded.
The error I get now, supposedly, is also due to something missing. I saw that clearlooks underwent changes⌠maybe you can point me out.
F:\a\usr\src\ardour6\bin>Ardour6.0.pre0.3103 (built using 6.0-pre0-3103-gb942eecc9c and GCC version 9.2.0)
Ardour: [INFO]: QPC timer microseconds per tick: 0.1
Ardour: [INFO]: MMCSS Initialized
Ardour: [INFO]: Your system is configured to limit Ardour to 2048 open files
Ardour: [INFO]: Loading system configuration file F:\a\usr\src\ardour6\share\ardour6\system_config
Ardour: [INFO]: CPU vendor: AuthenticAMD
Ardour: [INFO]: AVX-capable processor
Ardour: [INFO]: CPU brand: AMD Ryzen 9 3950X 16-Core Processor
Ardour: [INFO]: No H/W specific optimizations in use
Ardour: [ERROR]: ControlProtocolManager: module âF:\a\usr\src\ardour6\lib\ardour6\surfaces\ardourcp.dllâ has no descriptor function.
Ardour: [ERROR]: âprotocol_descriptorâ: The specified procedure could not be found.
Ardour: [INFO]: Loading default ui configuration file F:\a\usr\src\ardour6\share\ardour6\default_ui_config
Ardour: [INFO]: Loading user ui configuration file C:\Users\phantom\AppData\Local\Ardour6\ui_config
Ardour: [INFO]: Loading color file F:\a\usr\src\ardour6\share\ardour6\themes\dark-ardour.colors
Ardour: [INFO]: Loading ui configuration file F:\a\usr\src\ardour6\share\ardour6\clearlooks.rc
(ardour-6.0.pre0.3103.exe:2528): Gtk-WARNING **: 05:46:00.137: Unable to locate theme engine in module_path: âclearlooksâ,
(ardour-6.0.pre0.3103.exe:2528): Gtk-WARNING **: 05:46:00.153: Unable to locate theme engine in module_path: âclearlooksâ,
Ardour: [INFO]: Loading bindings from F:\a\usr\src\ardour6\share\ardour6\ardour.keys
Loading ui configuration file F:\a\usr\src\ardour6\share\ardour6\clearlooks.rc
(ardour-6.0.pre0.3103.exe:2528): Gtk-WARNING **: 05:46:00.168: Unable to locate theme engine in module_path: âclearlooksâ,
(ardour-6.0.pre0.3103.exe:2528): Gtk-WARNING **: 05:46:00.168: Unable to locate theme engine in module_path: âclearlooksâ,
terminate called after throwing an instance of âfailed_constructorâ
what(): failed constructor
Ardour now ends with that error, no other message whatsover.
I guess I figured out a new bit.
I installed mingw-w64-x86_64-gtk-engines.
Then, I copied the pertinent dlls in my $ARDOUR_PKG/lib/gtk-2.0/engines/
Now, Gtk does not complain about not being able to locate the theme engine. I only get the failed constructor error. Probably still something missing⌠and no clue what it might be.
F:\a\usr\src\ardour6\bin>Ardour6.0.pre0.3103 (built using 6.0-pre0-3103-gb942eecc9c and GCC version 9.2.0)
Ardour: [INFO]: QPC timer microseconds per tick: 0.1
Ardour: [INFO]: MMCSS Initialized
Ardour: [INFO]: Your system is configured to limit Ardour to 2048 open files
Ardour: [INFO]: Loading system configuration file F:\a\usr\src\ardour6\share\ardour6\system_config
Ardour: [INFO]: CPU vendor: AuthenticAMD
Ardour: [INFO]: AVX-capable processor
Ardour: [INFO]: CPU brand: AMD Ryzen 9 3950X 16-Core Processor
Ardour: [INFO]: No H/W specific optimizations in use
Ardour: [ERROR]: ControlProtocolManager: module âF:\a\usr\src\ardour6\lib\ardour6\surfaces\ardourcp.dllâ has no descriptor function.
Ardour: [ERROR]: âprotocol_descriptorâ: The specified procedure could not be found.
Ardour: [INFO]: Loading default ui configuration file F:\a\usr\src\ardour6\share\ardour6\default_ui_config
Ardour: [INFO]: Loading user ui configuration file C:\Users\phantom\AppData\Local\Ardour6\ui_config
Ardour: [INFO]: Loading color file F:\a\usr\src\ardour6\share\ardour6\themes\dark-ardour.colors
Ardour: [INFO]: Loading ui configuration file F:\a\usr\src\ardour6\share\ardour6\clearlooks.rc
Ardour: [INFO]: Loading bindings from F:\a\usr\src\ardour6\share\ardour6\ardour.keys
Loading ui configuration file F:\a\usr\src\ardour6\share\ardour6\clearlooks.rc
terminate called after throwing an instance of âfailed_constructorâ
what(): failed constructor
If I launch ardour through the mingw shell, I get some more informative messages (cannot construct splash screen image):
$ ./ardour-6.0.pre0.3103.exe
ARDOUR_DATA_PATH not set in environment
Cannot find ArdourSans TrueType font
Cannot register ArdourSans TrueType font with windows gdi.
bind txt domain [gtk2_ardour6] to F:\a\usr\src\ardour6\share\ardour6\locale
Ardour6.0.pre0.3103 (built using 6.0-pre0-3103-gb942eecc9c and GCC version 9.2.0)
Ardour: [INFO]: QPC timer microseconds per tick: 0.1
Ardour: [INFO]: MMCSS Initialized
Ardour: [INFO]: Your system is configured to limit Ardour to 2048 open files
ARDOUR_CONFIG_PATH not set in environment
Ardour: [INFO]: Loading system configuration file F:\a\usr\src\ardour6\share\ardour6\system_config
Ardour: [INFO]: CPU vendor: AuthenticAMD
Ardour: [INFO]: AVX-capable processor
Ardour: [INFO]: CPU brand: AMD Ryzen 9 3950X 16-Core Processor
Ardour: [INFO]: No H/W specific optimizations in use
Ardour: [ERROR]: ControlProtocolManager: module âF:\a\usr\src\ardour6\lib\ardour6\surfaces\ardourcp.dllâ has no descriptor function.
Ardour: [ERROR]: âprotocol_descriptorâ: The specified procedure could not be found.
setting default config
default current master (back) is MIDI Clock
Ardour: [INFO]: Loading default ui configuration file F:\a\usr\src\ardour6\share\ardour6\default_ui_config
Ardour: [INFO]: Loading user ui configuration file C:\Users\phantom\AppData\Local\Ardour6\ui_config
Color shuttle bg not found
Color play head not found
Ardour: [INFO]: Loading color file F:\a\usr\src\ardour6\share\ardour6\themes\dark-ardour.colors
Ardour: [INFO]: Loading ui configuration file F:\a\usr\src\ardour6\share\ardour6\clearlooks.rc
Ardour: [INFO]: Loading bindings from F:\a\usr\src\ardour6\share\ardour6\ardour.keys
Loading ui configuration file F:\a\usr\src\ardour6\share\ardour6\clearlooks.rc
Cannot construct splash screen image
terminate called after throwing an instance of âfailed_constructorâ
what(): failed constructor
It seems an issue with gtk and clearlooks.
Iâm not 100% sure of the Windows situation, but on Linux and macOS, it isnât possible to run the executable as-is.
On Linux, it gets wrapped by a shell script that sets a bunch of variables in the environment.
On macOS, it gets converted into an app (aka âbundleâ) and when it discovers this to be the case, it sets up a bunch of variables in the environment.
There is a script in the source tree called âardevâ that we use to do in-tree runs (thus avoiding the need to package the result into a ârunnableâ form.
Note that this is similar to how Firefox works too (invoked by a shell)
With
ldd ardour-*.exe | grep ânot foundâ
I saw that I have no missing dependencies now. So, it seems all set correctly. At this point, it must be just a packaging issue.
Checking splash.cc, I see that ardour_data_search_path() is called, which is in filesystem_path.cc. There, it searches for the ARDOUR_DATA_PATH environment variable. Probably I am missing that.
I have packaged everything with the correct paths (at least I guess). I was investigating Paulâs suggestions, checking the ardev files. There is one for windows too. From what I see, they are meant to allow the ardour executable run inside the development folder.
Instead, I am packaging everything, with my packaging script. It puts every file in a directory tree that is same like for the ardour 5 windows distro. I only change the folder called ardour5 into ardour6. Thus, I would expect share/ardour6/resources to be found (it contains the splash images). Apparently, itâs not so.
Do you know how I can find where ardour searches its internal paths? Or how they should be?
By the way, even if I export ARDOUR_DATA_PATH explicitly, it doesnât work:
export ARDOUR_DATA_PATH=/usr/src/ardour6/share/ardour6/
It gives the same error. Thus, I suspect there is something more to the path.
Sorry to post so many times. I got it running with the ardev-win script. I attach a screenshot.
Now, I still need to understand what is wrong in the path when I pack it. Any clue appreciated.
aquilarubra wrote:
" Now, I still need to understand what is wrong in the path when I pack it. Any clue appreciated."
Sorry to come late to the discussion (I only signed up today!!)
Your âgtk2_ardourâ folder contains some .cc source files which all start with âbundle_envâ. You only need 1 of them but there are different versions for Linux, Mac and Windows (also⌠on Windows there are different versions for mingw or MSVC). Iâd guess that youâre probably compiling the wrong version.
Or⌠if youâre correctly using the mingw version, maybe itâs out of date now (AFAIK thereâs no-one else who currently builds with mingw so it probably hasnât been updated for a while). As an asideâŚ
Ardour: [ERROR]: ControlProtocolManager: module âF:\a\usr\src\ardour6\lib\ardour6\surfaces\ardourcp.dllâ has no descriptor function.
Ardour: [ERROR]: âprotocol_descriptorâ: The specified procedure could not be found.
A mingw build might be different for some reason - but in my build, that file is called âardour_cp.dllâ (containing an underscore). And it isnât in my âsurfacesâ folder either. The other devs will correct me if Iâm wrong about this but on your system, Iâve a feeling it should be in âF:\a\usr\src\ardour6\binâ
Hi John, interesting points.
I found that bundle_env_mingw.cc is called properly.
I double checked, but in my system I get ardourcp.dll and not ardour_cp.dll. Anyway, despite the error, now the backends are loaded successfully and it doesnât matter.
My mingw installation is update to the latest packages (mingw is 9.2.0). The few custom libraries that are not in the msys2 repository I compiled myself, and they are all in their last available version.
With my latest setup, I can now compile ardour 5.12 and 6 in release and debug mode successfully. The issue is at run time.
If I run ./ardev-win, it will load and I can work (however, there are the same seg faults that I experienced with ardour 6 when I reload a project due to wrong memory access; I will go back to this when I fix the build process).
When I pack everything in a different folder, then I have the issue when loading images. Ardour v6 wonât load the splash screen (a png file) and crash.
Ardour 5.12 also crashes because of a png file. It is a bit more explicit:
Caught PixbufError: Couldnât recognize the image file format for file âF:\a\usr\src\ardour5\share\ardour5\icons\zoom_in_cursor.pngâ
Exception code=0xc0000005 flags=0x0 at 0x000000006A14283B. Access violation - attempting to read data at address 0x0000000000000000
Segmentation fault
I checked pixbuf, but it is compiled against libpng⌠so it looks a bit weird. I suspect it is the same problem in both cases.
Some of your issues sound like a possible mismatch between DLLâs and header files. Am I right in thinking youâve used pre-built support libraries? (cairo / pango / gtk+ etc)
If you havenât built those modules yourself you need to be certain that youâre using the correct header files which correspond to whichever version of the DLL youâve chosen. You mustnât use arbitrary headers from some earlier (or later) version.
You are right, I used pre-built packages. As they are in pacman format, headers are bundled with the compiled objects. Thus, there is no way there is a mismatch.
My msys2 installation is also completely fresh. Therefore, it is impossible that there are previous installations.
Hi aquilarubra - I just checked âbundle_env_msvc.ccâ and itâs setting all the following environment variables:-
ARDOUR_DLL_PATH
ARDOUR_DATA_PATH
ARDOUR_CONFIG_PATH
ARDOUR_INSTANT_XML_PATH
LADSPA_PATH
SUIL_MODULE_DIR
VAMP_PATH
ARDOUR_CONTROL_SURFACE_PATH
GTK_LOCALEDIR
GTK_PATH
$HOME
However⌠âbundle_env_mingw.ccâ only sets these ones:-
GTK_LOCALEDIR
VAMP_PATH
SUIL_MODULE_DIR
ARDOUR_SELF
So my guess would be that âardev-winâ must add the missing ones to your system PATH (and thatâs why it runs okay if you use ardev-win).
When not running from the source-tree, no environment variable need to be set for the windows binary.
All paths are set relative to the main binary, see windows_package_directory_path()
Thatâs what I figured out. If you have the correct tree structure, ardour finds everything. But what is this tree structure?
pretty much unix-like: lib
for architecture dependent file, share
for arch independent files, LV2, LADSPA etc per FHS in subdirs.
waf install
puts everything in the right place. Thatâs how windows packages are built: just install it to a DESTDIR
, then create an installer from that.