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 493983 - Build issues on Windows
Build issues on Windows
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Windows
: Normal blocker
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 503877 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-11-06 01:54 UTC by Ole André Vadla Ravnås
Modified: 2007-12-16 16:46 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Fix for building gstdebugutils.c with MSVC. (695 bytes, patch)
2007-11-06 01:55 UTC, Ole André Vadla Ravnås
committed Details | Review
Quick 'n dirty script to compare a def file to the actual symbols exported by a shared library. (651 bytes, text/plain)
2007-11-06 01:57 UTC, Ole André Vadla Ravnås
  Details
Fix for the missing symbols in libgstreamer.def. (18.80 KB, patch)
2007-11-06 01:58 UTC, Ole André Vadla Ravnås
committed Details | Review
Fix for the missing symbols in libgstbase.def. (2.03 KB, patch)
2007-11-06 01:59 UTC, Ole André Vadla Ravnås
committed Details | Review
Fix for the missing symbols in libgstcontroller.def. (1.91 KB, patch)
2007-11-06 01:59 UTC, Ole André Vadla Ravnås
committed Details | Review
Fix for the missing symbols in libgstdataprotocol.def. (581 bytes, patch)
2007-11-06 02:00 UTC, Ole André Vadla Ravnås
committed Details | Review
Fix for the missing symbols in libgstnet.def. (429 bytes, patch)
2007-11-06 02:01 UTC, Ole André Vadla Ravnås
committed Details | Review

Description Ole André Vadla Ravnås 2007-11-06 01:54:25 UTC
Please describe the problem:
1) gstdebugutils.c doesn't build with MSVC, please see the attached patch.
2) Lots of symbols are missing in the .def files. The attached script, "compare-def-to-so.sh" can be used as shown in "how to reproduce" to produce patches to easily fix these issues automatically. Patches generated from this are also attached.

Steps to reproduce:
./compare-def-to-so.sh ./gstreamer-20071106/win32/common/libgstreamer.def ../build/lib/libgstreamer-0.10.so.0.13.0 > libgstreamer-def.diff
./compare-def-to-so.sh ./gstreamer-20071106/win32/common/libgstbase.def ../build/lib/libgstbase-0.10.so.0.13.0 > libgstbase-def.diff
./compare-def-to-so.sh ./gstreamer-20071106/win32/common/libgstcontroller.def ../build/lib/libgstcontroller-0.10.so.0.13.0 > libgstcontroller-def.diff
./compare-def-to-so.sh ./gstreamer-20071106/win32/common/libgstdataprotocol.def ../build/lib/libgstdataprotocol-0.10.so.0.13.0 > libgstdataprotocol-def.diff
./compare-def-to-so.sh ./gstreamer-20071106/win32/common/libgstnet.def ../build/lib/libgstnet-0.10.so.0.13.0 > libgstnet-def.diff

Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Ole André Vadla Ravnås 2007-11-06 01:55:49 UTC
Created attachment 98598 [details] [review]
Fix for building gstdebugutils.c with MSVC.

Please see header of patch for details.
Comment 2 Ole André Vadla Ravnås 2007-11-06 01:57:52 UTC
Created attachment 98601 [details]
Quick 'n dirty script to compare a def file to the actual symbols exported by a shared library.
Comment 3 Ole André Vadla Ravnås 2007-11-06 01:58:40 UTC
Created attachment 98603 [details] [review]
Fix for the missing symbols in libgstreamer.def.
Comment 4 Ole André Vadla Ravnås 2007-11-06 01:59:09 UTC
Created attachment 98605 [details] [review]
Fix for the missing symbols in libgstbase.def.
Comment 5 Ole André Vadla Ravnås 2007-11-06 01:59:42 UTC
Created attachment 98606 [details] [review]
Fix for the missing symbols in libgstcontroller.def.
Comment 6 Ole André Vadla Ravnås 2007-11-06 02:00:13 UTC
Created attachment 98607 [details] [review]
Fix for the missing symbols in libgstdataprotocol.def.
Comment 7 Ole André Vadla Ravnås 2007-11-06 02:01:01 UTC
Created attachment 98608 [details] [review]
Fix for the missing symbols in libgstnet.def.
Comment 8 Ole André Vadla Ravnås 2007-11-06 02:37:11 UTC
Sorry about the rush of patches. They're very trivial, but obviously quite essential for building GStreamer on Windows. :)

I'm sure there are a few superfluous symbols getting exported, as is the case with the *NIX build with autotools.  For the script mentioned above it's very trivial to add filtering as desirable, right now there's just one pattern being blacklisted.
Comment 9 Tim-Philipp Müller 2007-11-06 15:18:01 UTC
Thanks, all committed:

2007-11-06  Tim-Philipp Müller  <tim at centricular dot net>

	* gst/gst.c: (_gst_disable_segtrap):
	  Make  _gst_disable_segtrap static, it's only used in gstplugin.c and
	  we can use gst_segtrap_is_enabled() there now that we have that API.
	  Move _gst_debug_dump_dot_dir into gstdebugutils.c, there's no reason
	  to do the getenv here (and export the variable).

	* gst/gstdebugutils.c: (debug_dump_element),
	  (_gst_debug_bin_to_dot_file), (_gst_debug_bin_to_dot_file_with_ts):
	  Don't use VLAs which is a C99ism and throws off MSVC (#493983).

	* gst/gstinfo.c: (_priv_gst_info_start_time), (_gst_debug_init),
	  (gst_debug_log_default):
	  Rename _gst_info_start_time to priv_gst_info_start_time so it
	  doesn't get exported (was never in any header).

	* gst/gstplugin.c: (_gst_plugin_fault_handler_setup),
	  (gst_plugin_loading_mutex):
	  Make static mutex gst_plugin_loading_mutex really static (was never
	  in any header), and use gst_segtrap_is_enabled() instead of
	  _gst_disable_segtrap.

	* gst/gsttrace.c: (_gst_trace_default):
	  Make local _gst_trace_default static (was never in any header).

2007-11-06  Tim-Philipp Müller  <tim at centricular dot net>

	Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>

	* win32/common/libgstbase.def:
	* win32/common/libgstcontroller.def:
	* win32/common/libgstdataprotocol.def:
	* win32/common/libgstnet.def:
	* win32/common/libgstreamer.def:
	  Add more missing symbols, remove some duplicates, and sort
	  as the 'sort' command sorts it (partially fixes #493983).


I've removed some symbols (which I've made static now) and these which are private:

libgstreamer.def:
	_gst_buffer_initialize
	_gst_event_initialize
	_gst_format_initialize
	_gst_message_initialize
	_gst_plugin_initialize
	_gst_query_initialize
	_gst_tag_initialize
	_gst_value_initialize
	_gst_debug_init

	_gst_parse_launch

	__gst_in_valgrind

	__gst_element_details_clear
	__gst_element_details_copy
	__gst_element_details_set   <-------- FIXME: make static

	__gst_element_factory_add_interface           [in headers, but used only internally by the registry]
	__gst_element_factory_add_static_pad_template [in headers, but used only internally by the registry]

	gst_proxy_pad_do_query_type
	gst_proxy_pad_get_type
	gst_type_find_debug

libgstcontroller.def:
	__gst_controller_key
	gst_controller_debug
Comment 10 Tim-Philipp Müller 2007-12-16 16:46:47 UTC
*** Bug 503877 has been marked as a duplicate of this bug. ***