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 438440 - All tests for Gtk2 failing when installing from CPAN
All tests for Gtk2 failing when installing from CPAN
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Quartz
unspecified
Other Mac OS
: Normal major
: ---
Assigned To: gtk-quartz maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-05-14 21:07 UTC by Jeremiah Foster
Modified: 2007-05-30 19:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
The Quartz backend should provide gdk_free_text_list() even if the function is not implemented function. (421 bytes, patch)
2007-05-30 00:01 UTC, Kouhei Sutou
none Details | Review

Description Jeremiah Foster 2007-05-14 21:07:11 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
Comment 1 Torsten Schoenfeld 2007-05-15 17:23:10 UTC
What were the error messages?  If there were segmentation faults, can you get backtraces?
Comment 2 Daniel Macks 2007-05-16 21:05:22 UTC
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.
Comment 3 muppet 2007-05-17 00:20:33 UTC
The Gtk2 test suite is designed to skip any gui tests if gtk_init_check() fails (which usually happens when DISPLAY is not set).
Comment 4 Jeremiah Foster 2007-05-17 13:08:52 UTC
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.
Comment 5 Jeremiah Foster 2007-05-17 13:13:07 UTC
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.)
Comment 6 Torsten Schoenfeld 2007-05-17 13:31:22 UTC
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.
Comment 7 Jeremiah Foster 2007-05-17 13:35:27 UTC
Should I file a bug with Apple? I doubt they do perl module support though.
Comment 8 Daniel Macks 2007-05-17 13:37:58 UTC
All symbols in OS X compiled binaries get a leading underscore.
Comment 9 Daniel Macks 2007-05-17 13:47:02 UTC
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.
Comment 10 Jeremiah Foster 2007-05-17 14:17:47 UTC
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
Comment 11 Jeremiah Foster 2007-05-17 14:20:27 UTC
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
Comment 12 Torsten Schoenfeld 2007-05-17 14:30:13 UTC
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.
Comment 13 Daniel Macks 2007-05-17 14:36:46 UTC
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.

Comment 14 Jeremiah Foster 2007-05-17 15:10:16 UTC
The first nm and grep gives this output:

   U _gdk_free_text_list

The second nm and grep gives no output.
Comment 15 Jeremiah Foster 2007-05-17 15:11:48 UTC
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.
Comment 16 Kouhei Sutou 2007-05-30 00:01:08 UTC
Created attachment 89030 [details] [review]
The Quartz backend should provide gdk_free_text_list() even if the function is not implemented function.
Comment 17 Kouhei Sutou 2007-05-30 00:05:20 UTC
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.
Comment 18 Richard Hult 2007-05-30 17:22:02 UTC
Implementation is in svn now, thanks for noticing.