x42 / fat1.lv2

Fons Adriaensen's AT1 -- Autotune LV2 plugin
http://x42-plugins.com/x42/x42-autotune
GNU General Public License v2.0
72 stars 16 forks source link

cross compiling for windows issue #8

Open GeorgeNs opened 5 years ago

GeorgeNs commented 5 years ago

Hi,and sorry of i bug you again about cross on linux. I tried to cross compile the fat1 expecting to be easy without so many issues-configurations and i could build it succesfully using the mingw32 static.posix version of mxe enviroment. I tested it on windows (10) with ardour and the gui opens.. everything works. However,something strange happens if i close the gui window and go to make a recording,ardour crashes. That happens only if i close the plugin's gui window . If i keep it open there is no crash. I am wondering what can be the issue since i didn't get any warning during building,can be the pthread win32 libs or something from the robtk package windows ui directories(?)

Thanks

x42 commented 5 years ago

Without a backtrace, I can only guess.. probably some static d'tor in glib. or, perhaps a symbol conflict between ardour's DLL (pango, cairo, glib,..) and the plugin's if the plugin does not hide symbols of libs it uses and the lib is unloaded.

I spent quite a long time to make robtk and this plugin work reliably cross-platform and test the binary provided at https://x42-plugins.com/x42/x42-eq to work and it's not very likely that is is an issue with the plugin's or robtk/pugl code.

GeorgeNs commented 5 years ago

You are right,i tried the binaries from your site and there is no issue. fat1 looks has similar structure but in a much simpler form.However, i can't find why crashes ardour,is there any similar command on windows like ldd?i have to search..maybe dumpbin from vs?

By the way, i gave a try with the shared version of mingw and i tested,i don't get the same problem,ardour won't crash once i close window and go to record.However,maybe i will get other issues later that i can't see now...

about glib reconfiguration: in glib i found only: $as_echo "#define _GLIB_EXTERN attribute((visibility(\"default\"))) __declspec(dllexport) extern" >>confdefs.h

I deleted __declspec(dllexport) then should i undefine DLL_EXPORT inside quotes or do unset DLL_EXPORT after that line? Thanks

x42 commented 5 years ago

is there any similar command on windows like ldd?

http://www.dependencywalker.com/

x42 commented 5 years ago

I deleted __declspec(dllexport) then should i undefine DLL_EXPORT

Yep, that sounds about right, same as recently discussed with x-compiling setBfree. As for the details, I'd have to look.

GeorgeNs commented 5 years ago

I tried to recompile it changing that line so: $as_echo "#define _GLIB_EXTERN attribute((visibility("default"))) #undefine DLL_EXPORT extern" >>confdefs.h

Then i get many errors.Here are the first of them:

define GLIB_AVAILABLE_IN_ALL _GLIB_EXTERN

                                             ^

../../glib/gvariant.h:368:1: note: in expansion of macro 'GLIB_AVAILABLE_IN_ALL' GLIB_AVAILABLE_IN_ALL ^

:0:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant ../../config.h:755:71: note: in expansion of macro 'DLL_EXPORT' #define _GLIB_EXTERN __attribute__((visibility("default"))) #undefine DLL_EXPORT extern ^ ../../glib/gversionmacros.h:255:49: note: in expansion of macro '_GLIB_EXTERN' #define GLIB_AVAILABLE_IN_ALL _GLIB_EXTERN ^ ../../glib/gvariant.h:368:1: note: in expansion of macro 'GLIB_AVAILABLE_IN_ALL' GLIB_AVAILABLE_IN_ALL ^ In file included from g-gnulib.h:19:0, from asnprintf.c:21: ../../config.h:755:61: error: stray '#' in program #define _GLIB_EXTERN __attribute__((visibility("default"))) #undefine DLL_EXPORT extern ^ ../../glib/gversionmacros.h:255:49: note: in expansion of macro '_GLIB_EXTERN' #define GLIB_AVAILABLE_IN_ALL _GLIB_EXTERN ^ ../../glib/gvariant.h:370:1: note: in expansion of macro 'GLIB_AVAILABLE_IN_ALL' GLIB_AVAILABLE_IN_ALL
GeorgeNs commented 5 years ago

Thank you very much,dep walker is great tool,i will have to learn it! Here is my dwi results. fat1.zip