Issue with Corss-Compiling for Windows

Hi Folks,

as a long term and “once in a while” User of Ardour under Linux, im currently in “some need” to use Ardour for Windows - sorry, i cannot afford a pre-build binary, as much as i would be able to do so - and i´m in the process of compiling it via MinGW using Ubuntu 24.04. I´ve compiled so far a lot of stuff for Linux, but i´m not into Cross-Compling at all.

Aside from the Problem that “waf configure” complains that PortAudio isn´t available for Linux, running

./waf configure --dist-target=mingw64  --with-backends=jack,portaudio,dummy --no-dr-mingw

leads into the fact that i´m afterwards confronted with a bunch of so.o files, Linux Shell scripts, but no Windows executables can be found.

Using --dist-target=“mingw” instead of “mingw32” or “mingw64” runs after 4/5 configure steps straight into a missing file (sorry, can´t remember which one ´cause i´m currently on Windows, something with “w” at the beginning).

A bunch of .o files without any Windows-executable (althrough the binarys for Linux were created and running) usually means for me that there is no linker afterwards invoked, but i cannot find in any instructions, regarding the cross-compilation of Ardour, any hint which commands should be invoked afterwards, because they all tell the usual waf-sequences.

The executable files that have been build provide a working Linux-Version - but, as said, no windows executable.

So something must be definitely my fault, but what? Using mingw32/64?

Best regards
Stef

Ok, next try.

./waf configure --dist-target=**mingw** --ptformat --with-backends=jack,dummy --optimize --cxx17

Setting top to                           : /home/bla/Ardour-8.10.0 
Setting out to                           : /home/bla/Ardour-8.10.0/build 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for 'g++' (C++ compiler)        : /usr/bin/g++ 
Checking for program 'windres'           : not found 
Could not find the program ['windres']
(complete log in /home/bla/Ardour-8.10.0/build/config.log)

While:

 ./waf configure --dist-target=**mingw64** --ptformat --with-backends=jack,dummy --optimize --cxx17
Setting top to                           : /home/bla/Ardour-8.10.0 
Setting out to                           : /home/bla/Ardour-8.10.0/build 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for 'g++' (C++ compiler)        : /usr/bin/g++ 

Global Configuration 
 * Install prefix                                    : /usr/local 
 * Debuggable build                                  : False 
 * Build documentation                               : False 

Ardour Configuration 
 * Will build against private GTK dependency stack   : no 
 * Will rely on libintl built into libc              : yes 
 * Will build against private Ardour dependency stack : no 
Checking for function 'dlopen' in dlfcn.h            : yes 
Checking for boost library >= 1.68                   : yes 
Checking for program 'pkg-config'                    : /usr/bin/pkg-config 
Checking for 'alsa'                                  : yes 
Checking for 'libpulse'                              : yes 
Checking for 'glib-2.0' >= 2.28                      : yes 
Checking for 'gthread-2.0' >= 2.2                    : yes 
Checking for 'glibmm-2.4' >= 2.32.0                  : yes 
Checking for 'sndfile' >= 1.0.18                     : yes 
Checking for 'giomm-2.4' >= 2.2                      : yes 
Checking for 'libcurl' >= 7.0.0                      : yes 
Checking for 'libarchive' >= 3.0.0                   : yes 
Checking for 'liblo' >= 0.26                         : yes 
Checking for 'taglib' >= 1.9                         : yes 
Checking for 'vamp-sdk' >= 2.1                       : yes 
Checking for 'vamp-hostsdk' >= 2.1                   : yes 
Checking for 'rubberband'                            : yes 
Checking for 'libusb-1.0' >= 1.0.16                  : yes 
Checking for rubberband >= 3.0.0                     : yes 
Checking for sndfile RF64=>RIFF support              : Found 
Checking for int128 support                          : lots of bits found. 
Checking for 'futex' syscall support                 : yes 
Checking for clang                                   : no 
Checking for compiler flags ['-std=c++17']           : yes 
Checking for 'fftw3f'                                : yes 
Checking for 'libudev'                               : yes 
Checking for 'aubio' >= 0.3.2                        : yes 
Checking for 'aubio' >= 0.4.0                        : yes 
Checking for 'gobject-2.0'                           : yes 
Checking for 'gio-2.0' >= 2.2                        : yes 
Checking for 'libpng'                                : yes 
Checking for 'pango' >= 1.20                         : yes 
Checking for 'cairo' >= 1.12                         : yes 
Checking for 'pangocairo'                            : yes 
Checking for 'gio-unix-2.0'                          : yes 
Checking for 'xrandr' >= 1.2.99                      : yes 
Checking for 'xrandr' >= 1.5.0                       : yes 
Checking for header X11/extensions/Xinerama.h        : yes 
Checking for 'gmodule-2.0'                           : yes 
Checking for 'x11'                                   : yes 
Checking for 'xext'                                  : yes 
Checking for 'sigc++-2.0' >= 2.0                     : yes 
Checking for 'cairomm-1.0' >= 1.8.4                  : yes 
Checking for 'pangomm-1.4' >= 1.4                    : yes 
Checking for 'lv2' >= 1.16.0                         : yes 
Checking for 'libxml-2.0'                            : yes 
Checking for header execinfo.h                       : yes 
Checking for header unistd.h                         : yes 
Checking for function 'posix_memalign' in stdlib.h   : yes 
Checking for function 'getmntent' in mntent.h        : yes 
Checking for function 'localtime_r' in time.h        : yes 
Checking for 'cppunit' >= 1.12.0                     : yes 
Checking for header cwiid.h                          : yes 
Checking for header bluetooth/bluetooth.h            : yes 
Checking for 'cwiid' >= 0.6.00                       : yes 
Checking for 'libwebsockets' >= 2.0.0                : yes 
Checking for 'jack' >= 0.121.0                       : yes 
Checking for JACK metadata API                       : ok 
Checking for jack_port_rename()                      : ok 
Checking for program 'gas, gcc'                      : /usr/bin/gcc 
Checking for program 'ar'                            : /usr/bin/ar 
Checking for 'lrdf' >= 0.4.0                         : yes 
Checking for 'samplerate' >= 0.1.0                   : yes 
Checking for 'lv2' >= 1.2.0                          : yes 
Checking for 'lv2' >= 1.10.0                         : yes 
Checking for 'lv2' >= 1.17.2                         : yes 
Checking for 'lv2' >= 1.18.6                         : yes 
Checking for 'serd-0' >= 0.14.0                      : yes 
Checking for 'sord-0' >= 0.8.0                       : yes 
Checking for 'sratom-0' >= 0.2.0                     : yes 
Checking for 'lilv-0' >= 0.24.2                      : yes 
Checking for 'ogg' >= 1.1.2                          : yes 
Checking for 'flac' >= 1.2.1                         : yes 
Checking for 'fftw3f' >= 3.3.5                       : yes 
Checking for header sys/vfs.h                        : yes 
Checking for header sys/statvfs.h                    : yes 
Checking for header unistd.h                         : yes 
Checking for 'ioprio_set' syscall support            : yes 
Checking for header boost/scoped_ptr.hpp             : yes 
Checking for header boost/ptr_container/ptr_list.hpp : yes 
Checking for 'samplerate' >= 0.1.7                   : yes 
Checking for header boost/format.hpp                 : yes 
Checking for 'lv2' >= 1.0.0                          : yes 
Checking for 'cairo' >= 1.12.0                       : yes 
Checking for 'gthread-2.0' >= 2.10.1                 : yes 
Checking for 'pangoft2' >= 1.36.8                    : yes 
Checking for 'fontconfig'                            : yes 
Checking for header stdio.h readline/readline.h      : yes 
 * build session-utils                               : yes 
Checking for 'dbus-1'                                : yes 
 * Build documentation                               : False 
 * Debuggable build                                  : False 
 * Export all symbols (backtrace)                    : False 
 * Install prefix                                    : /usr/local 
 * Strict compiler flags                             : [] 
 * Internal Shared Libraries                         : True 
 * Use YTK instead of GTK                            : True 
 * Use External Libraries                            : False 
 * Library exports hidden                            : True 
 * Free/Demo copy                                    : False 
 * ALSA DBus Reservation                             : True 
 * Architecture flags                                : None 
 * ARM NEON support                                  : False 
 * Aubio                                             : True 
 * AudioUnits                                        : False 
 * Build target                                      : mingw64 
 * Canvas Test UI                                    : False 
 * Beatbox test app                                  : False 
 * CoreAudio                                         : False 
 * CoreAudio 10.5 compat                             : False 
 * Debug RT allocations                              : False 
 * Debug Symbols                                     : False 
 * Denormal exceptions                               : False 
 * Dr. Mingw                                         : False 
 * FLAC                                              : True 
 * FPU optimization                                  : True 
 * FPU AVX512F support                               : False 
 * FPU AVX/FMA support                               : False 
 * Futex Semaphore                                   : True 
 * Freedesktop files                                 : False 
 * G_ENABLE_DEBUG                                    : False 
 * I/O Priorty Set                                   : True 
 * Libjack linking                                   : link 
 * Libjack metadata                                  : True 
 * Lua Binding Doc                                   : False 
 * Lua Commandline Tool                              : True 
 * LV2 UI embedding                                  : True 
 * LV2 support                                       : True 
 * LV2 extensions                                    : True 
 * LXVST support                                     : True 
 * Mac VST support                                   : False 
 * NI-Maschine                                       : False 
 * OGG                                               : True 
 * Phone home                                        : True 
 * Process thread timing                             : False 
 * Program name                                      : Ardour 
 * Samplerate                                        : True 
 * PT format                                         : True 
 * PTW32 Semaphore                                   : False 
 * Threaded WaveViews                                : True 
 * Translation                                       : True 
 * Unit tests                                        : False 
 * Use LLD linker                                    : False 
 * VST3 support                                      : True 
 * Windows VST support                               : False 
 * Wiimote support                                   : True 
 * Windows key                                       : Mod4><Super 
 * PortAudio Backend                                 : False 
 * CoreAudio/Midi Backend                            : False 
 * ALSA Backend                                      : False 
 * Dummy backend                                     : True 
 * JACK Backend                                      : True 
 * PulseAudio Backend                                : False 
 * Buildstack                                        : -system- 
 * Mac i386 Architecture                             : False 
 * Mac ppc Architecture                              : False 
 * Mac arm64 Architecture                            : False 
 * C compiler flags                                  : ['-I/home/bla/Ardour-8.10.0', '-DHAVE_RF64_RIFF', '-DCOMPILER_INT128_SUPPORT', '-DWAF_BUILD', '-DNDEBUG', '-fshow-column', '-O3', '-fomit-frame-pointer', '-ffast-math', '-fstrength-reduce', '-pipe', '-DARCH_X86', '-mmmx', '-DLXVST_32BIT', '-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align', '-Wno-unused-parameter', '-DBOOST_SYSTEM_NO_DEPRECATED', '-DBOOST_BIND_GLOBAL_PLACEHOLDERS', '-D_ISOC9X_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-DPROGRAM_NAME="Ardour"', '-DPROGRAM_VERSION="8"', '-Wstrict-prototypes', '-Wmissing-prototypes'] 
 * C++ compiler flags                                : ['-I/home/bla/Ardour-8.10.0', '-DHAVE_RF64_RIFF', '-DCOMPILER_INT128_SUPPORT', '-DWAF_BUILD', '-DNDEBUG', '-fshow-column', '-O3', '-fomit-frame-pointer', '-ffast-math', '-fstrength-reduce', '-pipe', '-DARCH_X86', '-mmmx', '-DLXVST_32BIT', '-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align', '-Wno-unused-parameter', '-DBOOST_SYSTEM_NO_DEPRECATED', '-DBOOST_BIND_GLOBAL_PLACEHOLDERS', '-D_ISOC9X_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-DPROGRAM_NAME="Ardour"', '-DPROGRAM_VERSION="8"', '-std=c++17', '-DBOOST_NO_AUTO_PTR', '-DBOOST_BIND_GLOBAL_PLACEHOLDERS', '-Woverloaded-virtual', '-Wno-unused-local-typedefs', '-Wno-deprecated-copy', '-D__STDC_LIMIT_MACROS', '-D__STDC_FORMAT_MACROS', '-DCANVAS_DEBUG', '-DBOOST_ERROR_CODE_HEADER_ONLY'] 
 * Linker flags                                      : []

The Issue with Portaudio:

 ./waf configure --dist-target=mingw64 --ptformat --with-backends=jack,**portaudio**,dummy --optimize --cxx17

PortAudio Backend is not for Linux

The issue with Jack:


../libs/backends/jack/jack_audiobackend.cc: In member function ‘virtual int ARDOUR::JACKAudioBackend::join_process_threads()’:
../libs/backends/jack/jack_audiobackend.cc:831:21: error: ‘jack_client_stop_thread’ was not declared in this scope; did you mean ‘jack_client_create_thread’?
  831 |                 if (jack_client_stop_thread (_priv_jack, thread) != 0)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~
      |                     jack_client_create_thread

../libs/backends/jack/jack_session.cc: In member function ‘void ARDOUR::JACKSession::session_event(jack_session_event_t*)’:
../libs/backends/jack/jack_session.cc:101:36: warning: ‘int jack_session_reply(jack_client_t*, jack_session_event_t*)’ is deprecated [-Wdeprecated-declarations]
  101 |                 jack_session_reply (jack_client, event);
      |                 ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from ../libs/backends/jack/weak_libjack.h:198,
                 from ../libs/backends/jack/jack_session.h:22,
                 from ../libs/backends/jack/jack_session.cc:34:
/usr/include/jack/session.h:204:5: note: declared here
  204 | int jack_session_reply (jack_client_t        *client,
      |     ^~~~~~~~~~~~~~~~~~
../libs/backends/jack/jack_session.cc:108:33: warning: ‘void jack_session_event_free(jack_session_event_t*)’ is deprecated [-Wdeprecated-declarations]
  108 |         jack_session_event_free (event);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/include/jack/session.h:217:6: note: declared here
  217 | void jack_session_event_free (jack_session_event_t *event) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
      |      ^~~~~~~~~~~~~~~~~~~~~~~


Build failed
 -> task in 'jack_audiobackend' failed with exit status 1 (run with -v to display more information)

There is no such dist/build-target. You just get a default Linux build as shown in your configure log:

Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for 'g++' (C++ compiler)        : /usr/bin/g+

cross compilation with mingw requires you to pass the compiler with env variables and configure with -dist-target=mingw (see tools/x-win/compile.sh in ardour’s src-tree).

Checking for 'gcc' (C compiler)          : x86_64-w64-mingw32-gcc 
Checking for 'g++' (C++ compiler)        : x86_64-w64-mingw32-g++ 
Checking for program 'windres'           : x86_64-w64-mingw32-windres 

PS. You also need to cross-compile all dependencies first.

Thank you so far Robin, i´ll try that later and will report back !

Stef

US$1 is too much? Or you cannot make a payment because we use PayPal as a processor?

Well, if you have $300 per month available to cover -everything- aside from rent, gas/electric bills, then yes, $1 can be a lot of money - i´m unfortunaly not one of the better situated people. If i could afford to pay for the latest version, i would even pay ten Grand for this extraordinary piece of software.

I know that you and Robin, as well as other (to me unknown) developers, put a lot of effort into your work and that you also cannot live only on air and love, but i can´t too.

No worries, I just wanted to check because a remarkable number of people don’t understand that you can choose your own price.

1 Like

I fully understand. I would love to support you in any way, but i can´t. I´m even not able to program in C++ (although i can understand the Syntax up to a certain point) in order to contribute something. It´s hard to sell especially OpenSource to the Public; something a lot of OSS-Developers have to fight with.

I would suggest that you set a fixed price for your software, perhaps something in between the given price range in order to sell more, say $19,99, Support/update costs extra . If people have the ability to choose the price, they rather tend to pay less (or unfortunaly nothing). I know 19,99 is far too less, but you should consider the amount of possible purchases.

We are never going to do a fixed price, because that ignores income disparities around the world.

5 Likes

I disagree.

I only can really refer to myself but I know many other in the Open Source world who seem to have a similar attitude: it’s about trying to get the best deal, but that’s not the same as getting the cheapest price. Sustainability is important.

The same thing sometimes happens in the commercial world with smart companies not choosing the cheapest option if that option isn’t sustainable: in the commercial world, if you put some eggs in the basket of a supplier whose business isn’t sustainable, and they go out of business, that can be an expensive problem!

In the Open Source world, a lot of the people I know are enlightened enough to know that projects like Ardour are only sustained by the donations they receive. Personally, when I get a new major version of Ardour I always pay at least the recommended amount ($45?) because I can afford to. I know I could pay $1 but (for me) that would be pretty disgusting behaviour given I pay far more than that on a daily basis for coffee.

If you cannot afford that (or don’t want to for any reason), then there’s the option of paying $1. That’s entirely legitimate.

Personally, I would never consider doing that because I can pay more and I know that, if I do, that sustains the development of Ardour for everyone, including those who can only afford to pay $1.

And I have faith that most people will feel the same. I do appreciate, however, that many people are still mentally trapped in the value proposition mindset of commercial products, and struggle with the more community-oriented approach that applications like Ardour take.

It’s not about “trying to sell” Open Source software. It’s about trying to finance the development effort and provide an income to the developers.

Cheers,

Keith

1 Like

I can understand both of you completely. Maybe I’m a little biased in this question because I programmed for years for a friend (in the field of electronics) who gave me great hopes of being able to do something with my knowledge, but I (better he, he would have been responsible for the proper realization and placing on the market) never managed to fully realize a project, simply because I had no financial means to do so, other than my knowledge; even the little money I had I invested in organizing components so that I could even work on it.

And that went on for almost 30 years - you can imagine how many projects were started during that time and never finished because of the situation. Plus the normal work that had to be done every day for a rather small income.

I never got anything in return for my initial work, though my “friend” wasn’t/is not badly off; but i was just young and naive. Today I’m smarter, but just as badly off.

Of course my primary intention was to earn some money from it, but primarily out of necessity and not to accumulate wealth. Even if that had been the case, I would have been able to pay a good price for that software or help out elsewhere, but you can’t spend money you don’t have.