GNOME Bugzilla – Bug 424121
anjuta Cygwin fixes
Last modified: 2009-08-15 18:40:50 UTC
ianjuta_preferences_{un,}merge() in libanjuta/interfaces/ianjuta-preferences.c call ANJUTA_IS_PREFERENCES, which ends up in a call to anjuta_preferences_get_type (from libanjuta). But there are five different ianjuta_* calls in libanjuta/anjuta-plugin.c. This causes libanjuta and libanjuta-interfaces to be interdependent, which makes them difficult to build on Cygwin or MinGW and also causes problems linking on Linux with -Wl,--as-needed or -Wl,-z,deps (e.g. libgda bug 349548). There are a few options: 1) Rework the functions to remove these calls from libanjuta-interfaces; 2) Include a (static) stub in libanjuta-interfaces and call it instead of the libanjuta function; 3) Move the relevant code up to libanjuta; 4) Make libanjuta-interfaces a convenience (noinst) library, essentially merging it with libanjuta. Please advise.
The only useful option is 4) because libanjuta-interface only contains interfaces (no real code) like the name says and libanjuta has to use them. If it is possible to merge libanjuta-interfaces and libanjuta than we can do this but I am not sure how the linker could do this for us.
OK, patch to follow.
I now have anjuta-2.1.2 built and running on Cygwin. I need to clean up the patch first, which will include the aforementioned merge, before posting. The patch should help anyone working on a MinGW port as well.
Created attachment 87579 [details] [review] anjuta-2.1.2 Cygwin patch Here's a patch for anjuta-2.1.2. In addition, libegg/egg-recent-model.c needs to be updated, but as it's deprecated, perhaps switching to GtkRecentManager is better (bug 349279). * configure.in: Define GNOME_CANVAS and fix GRAPHVIZ and SVN cflags/libs. * libanjuta/anjuta-launcher.c: Cygwin does not have B460800 or ECHOPRT. * libanjuta/interfaces/Makefile.am: Make a convenience library instead of a real one, fixes interdependency with libanjuta. * plugins/gdb/gdbmi.c: G_MODULE_EXPORT for gdbmi-test linking on Cygwin. * libanjuta/Makefile.am: * libegg/Makefile.am: * plugins/build-basic-autotools/Makefile.am: * plugins/class-gen/Makefile.am: * plugins/class-inheritance/Makefile.am: * plugins/cvs-plugin/Makefile.am: * plugins/debug-manager/Makefile.am: * plugins/devhelp/Makefile.am: * plugins/document-manager/Makefile.am: * plugins/editor/Makefile.am: * plugins/file-loader/Makefile.am: * plugins/file-manager/Makefile.am: * plugins/file-wizard/Makefile.am: * plugins/gdb/Makefile.am: * plugins/glade/Makefile.am: * plugins/gtodo/Makefile.am: * plugins/language-support-cpp-java/Makefile.am: * plugins/macro/Makefile.am: * plugins/message-view/Makefile.am: * plugins/patch/Makefile.am: * plugins/profiler/Makefile.am: * plugins/project-import/Makefile.am: * plugins/project-manager/Makefile.am: * plugins/project-wizard/Makefile.am: * plugins/sample1/Makefile.am: * plugins/search/Makefile.am: * plugins/sourceview/Makefile.am: * plugins/subversion/Makefile.am: * plugins/symbol-browser/Makefile.am: * plugins/terminal/Makefile.am: * plugins/tools/Makefile.am: * tagmanager/Makefile.am: Properly define LDFLAGS and LIBADD.
This patch doesn't take into account that libanjuta/interfaces/Makefile.am is itself a generated file; AFAIK, it is created by libanjuta/interfaces/anjuta-idl-compiler.pl out of libanjuta/interfaces/Makefile.am.iface. So it is more correct to patch anjuta-idl-compiler.pl (line 1416) and Makefile.am.iface (line 10), rather than Makefile.am. The updated patch follows.
Created attachment 87597 [details] [review] Updated patch Updated changelog: * configure.in: Define GNOME_CANVAS and fix GRAPHVIZ and SVN cflags/libs. * libanjuta/anjuta-launcher.c: Cygwin does not have B460800 or ECHOPRT. * libanjuta/interfaces/Makefile.am.iface: Fixed a typo. * libanjuta/interfaces/anjuta-idl-compiler.pl: Make a convenience library instead of a real one, fixes interdependency with libanjuta. * plugins/gdb/gdbmi.c: G_MODULE_EXPORT for gdbmi-test linking on Cygwin. * libanjuta/Makefile.am: * libegg/Makefile.am: * plugins/build-basic-autotools/Makefile.am: * plugins/class-gen/Makefile.am: * plugins/class-inheritance/Makefile.am: * plugins/cvs-plugin/Makefile.am: * plugins/debug-manager/Makefile.am: * plugins/devhelp/Makefile.am: * plugins/document-manager/Makefile.am: * plugins/editor/Makefile.am: * plugins/file-loader/Makefile.am: * plugins/file-manager/Makefile.am: * plugins/file-wizard/Makefile.am: * plugins/gdb/Makefile.am: * plugins/glade/Makefile.am: * plugins/gtodo/Makefile.am: * plugins/language-support-cpp-java/Makefile.am: * plugins/macro/Makefile.am: * plugins/message-view/Makefile.am: * plugins/patch/Makefile.am: * plugins/profiler/Makefile.am: * plugins/project-import/Makefile.am: * plugins/project-manager/Makefile.am: * plugins/project-wizard/Makefile.am: * plugins/sample1/Makefile.am: * plugins/search/Makefile.am: * plugins/sourceview/Makefile.am: * plugins/subversion/Makefile.am: * plugins/symbol-browser/Makefile.am: * plugins/terminal/Makefile.am: * plugins/tools/Makefile.am: * tagmanager/Makefile.am: Properly define LDFLAGS and LIBADD.
Thanks for the patch. It has been applied in svn trunk. Only one minor change was done. Instead of setting LDFLAGS directly for all plugins and libraries, I created ANJUTA_LDFLAGS and ANJUTA_PLUGIN_LDFLAGS in configure.in and substituted them.
Corrected version
Closing all old bugs. Apologies for the spam.