|Anonymous | Login | Signup for a new account||2018-12-14 16:47 PST|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007691||ardour||bugs||public||2018-11-24 03:34||2018-11-25 09:51|
|Product Version||5.X git (version in description)|
|Target Version||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?
edited on: 2018-11-24 15:27
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|
|2018-11-24 03:34||aquilarubra||New Issue|
|2018-11-24 04:48||x42||Note Added: 0020476|
|2018-11-24 15:26||timbyr||Note Added: 0020479|
|2018-11-24 15:27||timbyr||Note Edited: 0020479||View Revisions|
|2018-11-24 15:38||x42||Note Added: 0020480|
|2018-11-24 15:44||x42||Note Added: 0020481|
|2018-11-24 15:58||timbyr||Note Added: 0020482|
|2018-11-24 16:07||x42||Note Added: 0020483|
|2018-11-24 16:09||x42||Assigned To||=> x42|
|2018-11-24 16:09||x42||Status||new => feedback|
|2018-11-24 22:39||aquilarubra||Note Added: 0020484|
|2018-11-24 22:39||aquilarubra||Status||feedback => assigned|
|2018-11-24 23:19||aquilarubra||Note Added: 0020485|
|2018-11-25 09:51||x42||Note Added: 0020488|
|2018-11-25 09:51||x42||Status||assigned => resolved|
|2018-11-25 09:51||x42||Resolution||open => fixed|
|Copyright © 2000 - 2018 MantisBT Team|