ChinnaSuhas / ossbuild

Automatically exported from code.google.com/p/ossbuild
Other
0 stars 1 forks source link

New GTK+ bundle should be included. #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was unable to run the gstreamer's example 
$OSSBUILD\Main\GStreamer\Source\gst-plugins-base\tests\examples\seek\seek.c 
in windows with the existing GTK+.

The compilation in Visual Studio 2008 was successful, but when I tried to run 
it, the system 
complained about missing entry point gdk_window_ensure_native in 
libgtk-win32-2.0-0.dll.
Dependency walker (http://www.dependencywalker.com/) also highlighted this 
function (and 
two more) with red, in its window, listing parent imports.

I have downloaded the fresh gtk+ bundle  from
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.20/gtk+-
bundle_2.20.0-20100406_win32.zip
and have simply replaced files in the Gstreamer installation directory (both 
DLLs and SDK) with 
ones from that bundle. 

Then everything has become OK.

Original issue reported on code.google.com by wl2776@gmail.com on 27 Apr 2010 at 8:09

GoogleCodeExporter commented 9 years ago
This function (gdk_window_ensure_native) is new in GTK since 2.17, if I remember
correctly, and the version we provide is 2.20. Maybe an older installation of 
GTK is
messing up your dll's

Original comment by ylatuya on 27 Apr 2010 at 8:21

GoogleCodeExporter commented 9 years ago
My computer doesn't have any other GTK installations.

Original comment by wl2776@gmail.com on 27 Apr 2010 at 8:34

GoogleCodeExporter commented 9 years ago
Moreover, depwalker writes full paths to the DLLs and executables it loads, so 
I'm pretty sure that the 
problem DLLs come from GStreamer.

Original comment by wl2776@gmail.com on 27 Apr 2010 at 8:39

GoogleCodeExporter commented 9 years ago
It's entirely possible that we've miscompiled GTK+. Do you know where we can 
take a 
look at the configuration options used by the GTK+ folks?

Original comment by david.g.hoyt on 27 Apr 2010 at 2:30

GoogleCodeExporter commented 9 years ago
This function was added with the new client-side-windows in GDK and is part of 
GDK
from 2.18: 
http://library.gnome.org/devel/gtk/2.18/gtk-migrating-ClientSideWindows.html
I think no particular option needs to passed to configure.

Original comment by ylatuya on 27 Apr 2010 at 5:25

GoogleCodeExporter commented 9 years ago
Just have made next svn update, the problem still persists.

Original comment by wl2776@gmail.com on 19 Jul 2010 at 11:12

GoogleCodeExporter commented 9 years ago
It's not in libgtk-win32-2.0-0.dll, but it is in libgdk-win32-2.0-0.dll. 
Dependency walker shows it as such (ordinal 585). If you're linking against it, 
then the associated .lib is fine. Perhaps you just missed 
libgdk-win32-2.0-0.dll?

Original comment by david.g.hoyt on 19 Jul 2010 at 3:13

GoogleCodeExporter commented 9 years ago
Here is my linker input list

glib-2.0.lib
gthread-2.0.lib
gobject-2.0.lib
gstreamer-0.10.lib
gstinterfaces-0.10.lib
gstbase-0.10.lib
xml2.lib
gtk-win32-2.0.lib
gdk-win32-2.0.lib
gdk_pixbuf-2.0.lib

Original comment by wl2776@gmail.com on 19 Jul 2010 at 3:22

GoogleCodeExporter commented 9 years ago
One more study...
1. Installing GStreamer-GPL and GStreamer-SDK-GPL.
2. Building seek.c
3. It builds, but doesn't run (the error message about missing entry point)
4. DepWalker doesn't show libgdk-win32-2.0-0.dll in its dependency tree view.

5. Replacing 
$(GStreamer-inst-directory)/sdk/lib/{gdk-win32-2.0.lib,gdk_pixbuf-2.0.lib,gtk-wi
n32-2.0.lib} with files from www.gtk.org
6. Rebuilding seek.c
7. It builds, runs fine, and 
8. DepWalker shows libgdk-win32-2.0-0.dll in its dependency tree view.

Looks like libgdk has invalid def file.

Original comment by wl2776@gmail.com on 19 Jul 2010 at 3:46

GoogleCodeExporter commented 9 years ago
I seem to be right.
If you study the hexdump of files with the name gdk-win32-2.0.lib, obtained 
from the mentioned sources, then you can see some words about DLL name.

GStreamer's gdk-win32-2.0.lib library has at the offset 0x1672 words 
"__IMPORT_DESCRIPTOR_libgtk-win32-2.0" and some more mentions of libgtk.

www.gtk.org's gdk-win32-2.0.lib library has at the offset 0x1540 words 
"__IMPORT_DESCRIPTOR_libgdk-win32-2.0"

Original comment by wl2776@gmail.com on 19 Jul 2010 at 3:58

GoogleCodeExporter commented 9 years ago
http://library.gnome.org/devel/gtk/unstable/gtk.html

gdk should be a dependency of gtk, so it makes sense that dependency walker (as 
I'm using it with svn trunk) would show the same thing (which is what I'm 
seeing).

dumpbin provides the following output for gdk-win32-2.0.lib: 
http://pastebin.com/tjPXhvGz and for libgdk-win32-2.0.dll.a: 
http://pastebin.com/Qj3HuU2Z

Here's my view of dependency walker: http://imagebin.ca/view/15tfZJR.html

gdk_window_ensure_native seems to be there.

Could you attach the VS2008 project file you're using to compile the source? 
Perhaps it'd be easier to address if we could reproduce your setup.

Original comment by david.g.hoyt on 20 Jul 2010 at 12:26

GoogleCodeExporter commented 9 years ago
I tried to say in my comment #10, that gdk-win32-2.0.lib was incorrectly 
generated. 

There are traces of libgtk-win32-2.0.dll in it. 
You can find them in the raw hex viewer, for example, in FAR manager. Just 
press F3 on that file and search for "gtk" string.

Meanwhile the same library, downloaded from www.gtk.org, doesn't contain traces 
of GTK library, but has "gdk" strings on that places.

And because of that incorrectness, the executable, linked with this library, 
contains the code that doesn't load libgdk-win32-2.0.dll, but tries loading 
libgtk-win32-2.0.dll instead.

I don't know currently, how gdk-win32-2.0.lib was generated. 
But suspect that it was created using VS2008's lib utility, with a .def file as 
an argument. And that .def file, in my suspicions, simply contains a typo, "t" 
instead of "d".

Your dumps and screenshots don't show the right picture.
Try to link something with this libraries and load the resulting executable in 
the Dependency Walker.

Attached are my version of seek.c and VS2008 solution and project. I had to 
patch somewhat the original code to make it buildable in windows. 
Patches are simple - just replacing several X-window macros with Win32 macros.

Original comment by wl2776@gmail.com on 20 Jul 2010 at 7:30

Attachments:

GoogleCodeExporter commented 9 years ago
I've found one more tool to show the difference.
It's nm from linux, which lists symbols from object files, according to the man 
page.
VS2008's .lib files and ar's .a files have the same format.

$ nm gdk-win32-2.0.lib.gst 
libgtk-win32-2.0-0.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
         U __IMPORT_DESCRIPTOR_libgtk-win32-2.0-0
00000000 I __imp__gdk_add_client_message_filter
00000000 T _gdk_add_client_message_filter

libgtk-win32-2.0-0.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
         U __IMPORT_DESCRIPTOR_libgtk-win32-2.0-0
00000000 I __imp__gdk_add_option_entries_libgtk_only
00000000 T _gdk_add_option_entries_libgtk_only

libgtk-win32-2.0-0.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
         U __IMPORT_DESCRIPTOR_libgtk-win32-2.0-0
00000000 I __imp__gdk_app_launch_context_get_type
00000000 T _gdk_app_launch_context_get_type
 [cut]

$ nm gdk-win32-2.0.lib.www
libgdk-win32-2.0-0.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
         U __IMPORT_DESCRIPTOR_libgdk-win32-2.0-0
00000000 I __imp__gdk_add_client_message_filter
00000000 T _gdk_add_client_message_filter

libgdk-win32-2.0-0.dll:
00000000 I .idata$4
00000000 I .idata$5
00000000 I .idata$6
00000000 T .text
         U __IMPORT_DESCRIPTOR_libgdk-win32-2.0-0
00000000 I __imp__gdk_add_option_entries_libgtk_only
00000000 T _gdk_add_option_entries_libgtk_only
[cut]

I've omitted complains about the unrecognized file format for DLLs. 
The output clearly shows, that GStreamer's library refers to the libgtk DLL 
instead of libgdk DLL.

Original comment by wl2776@gmail.com on 20 Jul 2010 at 7:54

GoogleCodeExporter commented 9 years ago
Indeed there is a typo here:
http://code.google.com/p/ossbuild/source/browse/trunk/Libraries/Build-All-Window
s-x86.sh#1021

Original comment by ylatuya on 18 Aug 2010 at 9:27

GoogleCodeExporter commented 9 years ago
It's making gdk-win32-2.0.lib to link against gtk-win32-2.0-0.dll  instead of 
gdk-win32-2.0.dll

Original comment by ylatuya on 18 Aug 2010 at 9:29

GoogleCodeExporter commented 9 years ago

Original comment by ylatuya on 18 Aug 2010 at 9:30

GoogleCodeExporter commented 9 years ago
And?.. :)

The error source is located, the fix is trivial (just replace one letter in the 
file). 
Where is it?

Original comment by wl2776@gmail.com on 7 Sep 2010 at 9:02

GoogleCodeExporter commented 9 years ago
I'm working this one today, actually. I've finally got a stable gcc build that 
I'm using to rebuild the dependencies. I'll update this asap.

Original comment by david.g.hoyt on 7 Sep 2010 at 4:38

GoogleCodeExporter commented 9 years ago
Please try the latest build in the repo. as of today: r832.

Original comment by david.g.hoyt on 23 Sep 2010 at 10:09

GoogleCodeExporter commented 9 years ago
Yes, it works now. Issue #38 can be closed.

Original comment by wl2776@gmail.com on 27 Sep 2010 at 9:54

GoogleCodeExporter commented 9 years ago
Wonderful. Closed.

Original comment by david.g.hoyt on 27 Sep 2010 at 4:01