After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 424121 - anjuta Cygwin fixes
anjuta Cygwin fixes
Status: VERIFIED FIXED
Product: anjuta
Classification: Applications
Component: libanjuta
2.1.3
Other All
: Normal normal
: ---
Assigned To: Naba Kumar
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-29 14:01 UTC by Yaakov Selkowitz
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
anjuta-2.1.2 Cygwin patch (59.91 KB, patch)
2007-05-04 23:11 UTC, Yaakov Selkowitz
none Details | Review
Updated patch (61.53 KB, patch)
2007-05-05 10:14 UTC, Alexey Rusakov
committed Details | Review

Description Yaakov Selkowitz 2007-03-29 14:01:07 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.
Comment 1 Johannes Schmid 2007-03-29 14:22:38 UTC
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.
Comment 2 Yaakov Selkowitz 2007-03-29 15:12:19 UTC
OK, patch to follow.
Comment 3 Yaakov Selkowitz 2007-04-24 13:16:50 UTC
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.
Comment 4 Yaakov Selkowitz 2007-05-04 23:11:48 UTC
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.
Comment 5 Alexey Rusakov 2007-05-05 09:52:13 UTC
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.
Comment 6 Alexey Rusakov 2007-05-05 10:14:18 UTC
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.
Comment 7 Naba Kumar 2007-05-05 11:47:44 UTC
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.
Comment 8 Naba Kumar 2007-06-23 22:46:57 UTC
Corrected version
Comment 9 Naba Kumar 2007-06-27 10:58:18 UTC
Closing all old bugs. Apologies for the spam.