As the previous thread is locked for me only (good behaviour, Ardour tribe, insult and then prevent posting on relevant technical details), I am opening another thread, hopefully just technical.
Answering to x42 polite reply, I am aware that others compiled Ardour in mingw, but that was a few years ago and not even advised, as it used many custom libraries.
Just to make it clear, it costed me a lot of effort and time to get to the result I am now. I had a computer that needed 10 hours to compile Ardour, and I did that a hundred times to figure out every detail. If I post about a bug, it means that it is relevant, because all the other issues I solved already.
So, I had a working setup last year. I could compile and run Ardour 6. However, there were many issues. I could create a project, use Ardour, but when I was reopening the project, it was crashing. I wanted to check the situation this year, as gcc 9 was just released last year and there were too many variables that had to be accounted for.
This year, I decided to re-create the entire project from scratch and document it. The goal was to use just the default msys2 libraries. So, when you say that it is an issue with my libraries/environment, itâs not. The only library I compile myself that is already in the msys2 repository is portaudio, to include asio support. And thatâs why libraries such as bcrypt are necessary with the default msys2 packages. But thatâs no problem, I figured all that out.
I published the complete instructions here, for easy replication: https://musicsecrets.euniversity.pub/ardour.html
I guess you are using gcc v8 for cross-compiling, because in v9 many things changed. I could now reduce the library requirements (CFLAGS and CPPFLAGS) to the minimum and I know how to compile with gcc v9.2.0. Some flags such as -DBUILD_SSE_OPTIMIZATIONS that you are using cause undefined symbols with msys2 latest default setup. Strangely, I still have to solve undefined symbols for the debug version compilation, which seems to require a different approach, but I am not that interested in fixing that too.
With my current instructions, you can compile everything for the release version. I build PKGBUILD files for the few libraries that are not included in msys2 repositories. Everything is very default, for easy replication.
Now, the generated ardourcp.dll definitely lacks the descriptor function. I could verify it with
nm -g --defined-only ardourcp.dll
and itâs not there.
The ladspa solution had this test:
#ifdef _WIN32
__declspec(dllexport)
#else
attribute ((visibility (âdefaultâ)))
#endif
const LADSPA_Descriptor * ladspa_descriptor(unsigned long index)
Therefore, the instruction for _WIN32 is not the same for Linux, which involves visibility. I guess this is the issue, but I am getting a bit lost in Ardour code.
I guess contributions are also bug reporting, not necessarily coming with a ready fix to the code, and it took my time to figure everything out till this point. If the Ardour team is not interested, no problem and no issue if you donât respond. Maybe somebody else will be interested and respond.
I paste below the error:
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: [ERROR]: ControlProtocolManager: cannot load module âF:\a\usr\src\ardour6\lib\ardour6\surfaces\ardour_contourdesign.dllâ (âF:\a\usr\src\ardour6\lib\ardour6\surfaces\ardour_contourdesign.dllâ: The specified module could not be found.)
Ardour: [ERROR]: ControlProtocolManager: cannot load module âF:\a\usr\src\ardour6\lib\ardour6\surfaces\ardour_push2.dllâ (âF:\a\usr\src\ardour6\lib\ardour6\surfaces\ardour_push2.dllâ: The specified module could not be found.)
Ardour: [ERROR]: AudioEngine: cannot load module âF:\a\usr\src\ardour6\lib\ardour6\backends\jack_audiobackend.dllâ (âF:\a\usr\src\ardour6\lib\ardour6\backends\jack_audiobackend.dllâ: The specified module could not be found.)
Ardour: [ERROR]: AudioEngine: cannot load module âF:\a\usr\src\ardour6\lib\ardour6\backends\portaudio_callback_backend.dllâ (âF:\a\usr\src\ardour6\lib\ardour6\backends\portaudio_callback_backend.dllâ: The specified module could not be found.)