GNOME Bugzilla – Bug 314414
[PATCH] -no-undefined not declared in gtksourceview
Last modified: 2005-09-06 09:02:10 UTC
Version details: 1.2.1, HEAD Distribution/Version: Cygwin In Cygwin and MinGW, all symbols must be resolved at link time; in addition, libtool requires a -no-undefined flag in LDFLAGS for all shared libraries. Most of the GNOME platform libs already include this. I'm attaching a patch which fixes this for gtksourceview.
Created attachment 51277 [details] [review] -no-undefined patch
I'm far from a toolchain expert, but are you sure that adding that flag unconditionally is a good idea? I checked gtk+ and I see that it adds the flag only on win32: if PLATFORM_WIN32 no_undefined = -no-undefined endif ... # common options for the various packages. libtool_opts = \ -version-info $(LT_VERSION_INFO) \ -export-dynamic $(no_undefined) $(LIBTOOL_EXPORT_OPTIONS) \ -rpath $(libdir) $(libgtk_target_ldflags) If the flag is win32 specific, I'm not sure we should add it by itself: we would love to have a full win32 port build system integrated in gtksourceview, but we need : - an entire patch, not just bits and pieces - someone willing to keep it working (since we currently do not have the possibility to work on win32 ourselves)
It does no harm on linux or other platforms either; for example, see gtk-engines, libglade, libgnome, libIDL, ORBit2, and many others, where -no-undefined is included unconditionally. FYI, the Cygwin ports of GNOME are X11 based, so I can't really help you with a Win32 port.
A couple of links: - Portability of -no-undefined (http://lists.gnu.org/archive/html/libtool/2004-10/msg00157.html) - [Swig-dev] Question: libtool and -no-undefined (http://mailman.cs.uchicago.edu/pipermail/swig-dev/2003-November/012187.html) The attached patchs seems good. It is too late to commit it for the upcoming 1.4.0 release (code freeze starts today), but I think we should tentatively commit it for 1.4.1.
2005-09-06 Paolo Borelli <pborelli@katamail.com> * gtksourceview/Makefile.am: add LDFLAGS = -no-undefined, for benefit of people compiling on win32. Suggested by yselkowitz@users.sourceforge.net, bug #314414. committed, thanks YS.