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 314414 - [PATCH] -no-undefined not declared in gtksourceview
[PATCH] -no-undefined not declared in gtksourceview
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
git master
Other other
: High normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-24 18:47 UTC by Yaakov Selkowitz
Modified: 2005-09-06 09:02 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
-no-undefined patch (743 bytes, patch)
2005-08-24 18:48 UTC, Yaakov Selkowitz
none Details | Review

Description Yaakov Selkowitz 2005-08-24 18:47:18 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.
Comment 1 Yaakov Selkowitz 2005-08-24 18:48:06 UTC
Created attachment 51277 [details] [review]
-no-undefined patch
Comment 2 Paolo Borelli 2005-08-25 16:42:51 UTC
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)
Comment 3 Yaakov Selkowitz 2005-08-25 19:56:49 UTC
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.
Comment 4 Paolo Maggi 2005-08-29 18:17:45 UTC
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.
Comment 5 Paolo Borelli 2005-09-06 09:02:10 UTC
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.