View Issue Details
|ID||Category||Date Submitted||Last Update|
|0007691||bugs||2018-11-24 11:34||2020-04-19 20:18|
|Product Version||5.X git (version in description)|
|Fixed in Version|
|Summary||0007691: zita-convolver cross compilation issue|
|Description||While cross compiling for Windows, zita-convolver does not seem to recognize the Windows platform correctly and I have to run the following command to fix:|
sed -i '1s/^/#define PTW32_VERSION\n\n/' libs/zita-convolver/zita-convolver/zita-convolver.h
A better Windows detection should be implemented.
|Tags||No tags attached.|
The case at hand is not to detect windows, but to detect which semaphore implementation to use. On Windows using ptw32 is the easiest.
The alternative would be to use code from libs/pbd/semutils.cc. We cannot use libpbd here since the convolver needs to be statically linked into plugins. Also ideally the code would go upstream to libzita-convolver.
Cross-compiling for windows works just fine (using mingw, that's what nightly.ardour.org offfers). The current code also compiles with MSVC.
How does it fail in your case? What semaphore implementation do you use?
An issue here is that for a few years mingw-w64 and GCC itself ship with winpthreads as the pthread implementation AFAIR.
I'm not sure if it is possible to still use pthreads-win32 with GCC/mingw-w64 anymore (At least I'm not aware of anyone still doing so).
Perhaps an appropriately licensed and header only cross platform semaphore implementation could be used instead and proposed upstream. Perhaps something like:
Without the C++11 only part at the bottom.
||We do use pthreads-win32 with binaries from ardour.org as is john with MSVC.|
||@timbyr: is there a compiler define when mingw provides winpthread itself?|
||winpthreads does provide a semaphore.h header, so I guess you could add __WINPTHREADS_VERSION to ifdef and it might work.|
That sounds like a good solution. @aquilarubra could you try that?
change zita-convolver.h line 37
... || defined(PTW32_VERSION) || defined (__WINPTHREADS_VERSION)
||Yes, I am using winpthreads. I'll try and report.|
||I confirm it works with || defined (__WINPTHREADS_VERSION)|
||Fixed in 6.0-pre0-1306-g3fd8dad9d|
Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.
|2018-11-24 11:34||aquilarubra||New Issue|
|2018-11-24 12:48||x42||Note Added: 0020476|
|2018-11-24 23:26||timbyr||Note Added: 0020479|
|2018-11-24 23:27||timbyr||Note Edited: 0020479||View Revisions|
|2018-11-24 23:38||x42||Note Added: 0020480|
|2018-11-24 23:44||x42||Note Added: 0020481|
|2018-11-24 23:58||timbyr||Note Added: 0020482|
|2018-11-25 00:07||x42||Note Added: 0020483|
|2018-11-25 00:09||x42||Assigned To||=> x42|
|2018-11-25 00:09||x42||Status||new => feedback|
|2018-11-25 06:39||aquilarubra||Note Added: 0020484|
|2018-11-25 06:39||aquilarubra||Status||feedback => assigned|
|2018-11-25 07:19||aquilarubra||Note Added: 0020485|
|2018-11-25 17:51||x42||Note Added: 0020488|
|2018-11-25 17:51||x42||Status||assigned => resolved|
|2018-11-25 17:51||x42||Resolution||open => fixed|
|2020-04-19 20:18||system||Note Added: 0023786|
|2020-04-19 20:18||system||Status||resolved => closed|