GNOME Bugzilla – Bug 493983
Build issues on Windows
Last modified: 2007-12-16 16:46:47 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:
Created attachment 98598 [details] [review] Fix for building gstdebugutils.c with MSVC. Please see header of patch for details.
Created attachment 98601 [details] Quick 'n dirty script to compare a def file to the actual symbols exported by a shared library.
Created attachment 98603 [details] [review] Fix for the missing symbols in libgstreamer.def.
Created attachment 98605 [details] [review] Fix for the missing symbols in libgstbase.def.
Created attachment 98606 [details] [review] Fix for the missing symbols in libgstcontroller.def.
Created attachment 98607 [details] [review] Fix for the missing symbols in libgstdataprotocol.def.
Created attachment 98608 [details] [review] Fix for the missing symbols in libgstnet.def.
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.
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
*** Bug 503877 has been marked as a duplicate of this bug. ***