fat1.lv2 icon indicating copy to clipboard operation
fat1.lv2 copied to clipboard

cross compiling for windows issue

Open GeorgeNs opened this issue 6 years ago • 6 comments

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

GeorgeNs avatar Dec 29 '18 05:12 GeorgeNs

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.

x42 avatar Dec 30 '18 20:12 x42

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

GeorgeNs avatar Dec 31 '18 02:12 GeorgeNs

is there any similar command on windows like ldd?

http://www.dependencywalker.com/

x42 avatar Dec 31 '18 03:12 x42

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.

x42 avatar Dec 31 '18 03:12 x42

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 avatar Dec 31 '18 05:12 GeorgeNs

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

GeorgeNs avatar Dec 31 '18 06:12 GeorgeNs