GNOME Bugzilla – Bug 438440
All tests for Gtk2 failing when installing from CPAN
Last modified: 2007-05-30 19:57:21 UTC
I had to force the installation when installing Gtk2 via CPAN. Not a single test passed when I ran the command; cpan> install Gtk2
What were the error messages? If there were segmentation faults, can you get backtraces?
I wonder if the gtk+2 libs were built for x11 graphics and you didn't have an X11 session available for the tests to use? Hard to imagine a GUI test succeeding from a shell that doesn't support G.
The Gtk2 test suite is designed to skip any gui tests if gtk_init_check() fails (which usually happens when DISPLAY is not set).
I removed my Gtk2.pm installation with the ExtUtils::Packlist and ExtUtils::Installed packages. I re-installed Gtk2 with the following command using an updated version of CPAN with reloaded indexes; cpan> install Gtk2 [ snipped output ] ... t/PangoTabs.t 255 65280 ?? ?? ?? t/PangoTypes.t 255 65280 ?? ?? ?? t/set-scroll-adjustments-signal.t 255 65280 ?? ?? ?? Failed 198/198 test scripts. 35/35 subtests failed. Files=198, Tests=35, 45 wallclock secs (37.67 cusr + 5.75 csys = 43.42 CPU) Failed 198/198 test programs. 35/35 subtests failed. make: *** [test_dynamic] Error 255 TSCH/Gtk2-1.144.tar.gz /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force Failed during this command: TSCH/Gtk2-1.144.tar.gz : make_test NO All tests are failing and Gtk2 refuses to install.
t/GtkVBox..........................Can't load '/Users/jeremiah/.cpan/build/Gtk2-1.144-Wgl3I5/blib/arch/auto/Gtk2/Gtk2.bundle' for module Gtk2: dlopen(/Users/jeremiah/.cpan/build/Gtk2-1.144-Wgl3I5/blib/arch/auto/Gtk2/Gtk2.bundle, 2): Symbol not found: _gdk_free_text_list Referenced from: /Users/jeremiah/.cpan/build/Gtk2-1.144-Wgl3I5/blib/arch/auto/Gtk2/Gtk2.bundle Expected in: dynamic lookup at /Users/jeremiah/.cpan/build/Gtk2-1.144-Wgl3I5/blib/lib/Gtk2/TestHelper.pm line 63 Compilation failed in require at /Users/jeremiah/.cpan/build/Gtk2-1.144-Wgl3I5/blib/lib/Gtk2/TestHelper.pm line 63. BEGIN failed--compilation aborted at /Users/jeremiah/.cpan/build/Gtk2-1.144-Wgl3I5/blib/lib/Gtk2/TestHelper.pm line 63. Compilation failed in require at t/GtkVBox.t line 3. BEGIN failed--compilation aborted at t/GtkVBox.t line 3. # Looks like your test died before it could output anything. t/GtkVBox..........................dubious Test returned status 255 (wstat 65280, 0xff00) (I installed Test::Helper as well, no change in the failing tests.)
Looks like it's complaining about being unable to find the symbol _gdk_free_text_list. And indeed, such a symbol doesn't exist. gdk_free_text_list (without the leading underscore) exists, and that's what Gtk2 uses (in xs/GdkProperty.xs). I don't know how why your linker wants to lookup _gdk_free_text_list. This looks Mac OS specific, so we'd need someone with expertise in that area.
Should I file a bug with Apple? I doubt they do perl module support though.
All symbols in OS X compiled binaries get a leading underscore.
Jeremiah, we're also missing a lot of information about your system...especially what gtk library version you have and where you got it, and what version of OS X. If you're using an Intel-based Mac, do you remember if you installed cleanly onto it or if you had used Migration Assistant to import from a PowerPC Mac? Torsten, Gtk2-1.122 works fine on my OS X machine: the .bundle file does have _gdk_free_text_list, and the .bundle is dynamically linked against libgdk-x11-2.0, wherein that symbol is actually defined.
My apologies, I ought to have included machine information. 1.66 Intel Core Duo OS X 10.4.9 installed from DVD (no Migration assistant, clean install) From cpan I received: Glib -- 1.144 Gtk2 -- 1.144 I am using the GTK+2 installation as outlined by Imendio here: http://developer.imendio.com/projects/gtk-macosx/build-instructions So all my libraries are coming from subversion and git repositories. So I am using Glib-2.0 and Gtk-2.0. Since they are installed via the Imendio build script and that is hackable, I changed the installation to /sw so the Gtk-2.0 libraries are there, but it was _not_ installed via fink. Note that everything is working, that is to say I can write Gtk2 applications and they run showing the window using Aqua, not X11. Jeremiah
Umm. Could it be that when I install Gtk2 via cpan it is looking for the GTK2 libs somewhere else than where I have them? Is there some way I can tell cpan that the libs are under /sw? Is this why the tests are failing? Jeremiah
When compiling Gtk2, all information about the location of various libraries comes from pkg-config which can be persuaded to use the prefix you want by setting the environment variable PKG_CONFIG_PATH to the directory containing the relevant .pc files. Probably /sw/lib/pkgconfig in your case.
You're using aqua-graphics Gtk which is beyond what I know about specifically, but... Could you run 'nm /Users/jeremiah/.cpan/build/Gtk2-1.144-Wgl3I5/blib/arch/auto/Gtk2/Gtk2.bundle | grep _gdk_free_text_list' and 'otool -L /Users/jeremiah/.cpan/build/Gtk2-1.144-Wgl3I5/blib/arch/auto/Gtk2/Gtk2.bundle', and then that nm...grep also for the files listed by otool? That will tell us whether the symbol is in the .bundle at all, whether/where the gtk library is, and then whether that lib actually supports that symbol. /sw is certainly not a place that the compiler usually looks for libs, but the Glib-2.0 and Gtk-2.0 libraries use pkg-config to inform others where they are; I don't think you could have gotten as far as even compiling the perl package if the compiler couldn't find those libs.
The first nm and grep gives this output: U _gdk_free_text_list The second nm and grep gives no output.
Doing a grep on /Users/jeremiah/.cpan/build/Gtk2-1.144-Wgl3I5/blib/arch/auto/Gtk2/Gtk2.bundle shows that _gdk_free_text_list is there in the binary file. When I use the -a switch to grep it just prints gibberish.
Created attachment 89030 [details] [review] The Quartz backend should provide gdk_free_text_list() even if the function is not implemented function.
Richard, could you add gdk_free_text_list() implementation (that is OK if the implementation is empty) to the Quartz backend? The reason why I request this is the same as Bug 441795.
Implementation is in svn now, thanks for noticing.