GNOME Bugzilla – Bug 333977
Make check fails with error: Test failed: unexpected error when using g_utf8_collate() on ./collate/collate-1.in
Last modified: 2008-05-02 20:14:35 UTC
Please describe the problem: When running "make check" after compiling glib-2.10.1 on my Linux system, I get this error: Cannot set locale to lt_LT.UTF-8, skipping Cannot set locale to lt_LT.UTF-8, skipping PASS: unicode-caseconv PASS: unicode-encoding PASS: utf8-validate PASS: utf8-pointer PASS: uri-test PASS: run-markup-tests.sh 2d1 < GTK+ 8a8 > GTK+ Test failed: unexpected error when using g_utf8_collate() on ./collate/collate-1.in FAIL: run-collate-tests.sh ===================================================================== 1 of 47 tests failed Please report to http://bugzilla.gnome.org/enter_bug.cgi?product=glib ===================================================================== make[4]: *** [check-TESTS] Error 1 make[4]: Leaving directory `/build/glib-2.10.1/tests' make[3]: *** [check-am] Error 2 make[3]: Leaving directory `/build/glib-2.10.1/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/build/glib-2.10.1/tests' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/build/glib-2.10.1' make: *** [check] Error 2 tom@linux:~/build/glib-2.10.1$ Steps to reproduce: 1. Run a "make check" after compiling glib-2.10.1 2. 3. Actual results: I get the output shown above. Expected results: The testing should complete 100% successfully. Does this happen every time? Yes. Other information: Here is my system configuration information: Linux 2.6.15.5 kernel gccc-4.0.2 glibc-2.3.4 glib-2.8.6 gtk+-2.8.13 binutils 2.16.1 XFree86 4.5.99.901 configure command: ./configure --prefix=/opt/gnome I do not run the GNOME desktop environment.
Created attachment 61470 [details] buildlog.glib2.bz2 I get the exact same error. Full build log attached.
I get this error on Mac OS X 10.4 as well. ---(snip!)--- PASS: run-markup-tests.sh 2d1 < GTK+ 8a8 > GTK+ Test failed: unexpected error when using g_utf8_collate() on ./collate/collate-1.in FAIL: run-collate-tests.sh ---(snip!)--- Is there anything I can do to help figure out what's happening here?
(In reply to comment #2) > I get this error on Mac OS X 10.4 as well. I forgot to mention, it happens with both 2.10.1 and 2.10.2.
I also noticed that this used to not have a unit test, and as far as I can tell, this code hasn't changed since 2.8, so I guess it's been an existing bug, only now noticed.
Compiling on 10.4.6 ( Mac OS X ) I get the same error
*** Bug 342014 has been marked as a duplicate of this bug. ***
glib-2.10.2 fails this way for me on OS X 10.4/intel and 10.3 (powerpc), and IIRC from #fink, Mike S (comment #5) is powerpc as well, so it doesn't feel like an endian issue. Looking at the test, we're seeing "GTK+" being sorted ahead of "bar" whereas the expected result has "GTK+" between "foo" and "z". Is it true that the goal here is a "dictionary" sort (vs. the observed strict binary char values)? Miga pointed me to http://scentric.net/tutorial/sec-sorting-string-nocase.html, which suggests that "GTK+" is expected to come first. That and http://developer.gnome.org/doc/API/2.0/glib/glib-Unicode-Manipulation.html#g-utf8-collate, teach that locale matters. I (and Ben and Mike) have LANG=C. No idea what others have. But if locale can affect the results, the test should make sure to control it.
Apparently LANG=C is a bad idea for unicode sorting. OTOH, run-collate-tests.sh sets LC_ALL=en_US. If I set LANG=en_US also, I still get the same test failure.
LC_ALL is supposed to override LANG. Do you actually have en_US locale files installed?
Hm, OS X's collation rules simply seem broken. On the OS X 10.4 box I have access to, given the following input under LANG=en_US.UTF-8: f ë GTK+ the "sort" command spits out: GTK+ f ë On Linux, under LANG=en_US.UTF-8 it spits out: ë f GTK+ So I'm thinking OS X is just busted, and the people running into this on Linux simply don't have en_US locales installed. Setting NEEDINFO to verify.
Ok, I just successfully built glib-2.10.3 and I *did* have en_US locales installed. I *did not* have en_US locales installed when I built glib-2.10.1 and glib-2.10.2. "locale -a" displayed "C" and "POSIX" only. I installed the en_US locales *before* building glib-2.10.3 and both the compile and test suite ran fine. Peace...
*** Bug 360275 has been marked as a duplicate of this bug. ***
*** Bug 396858 has been marked as a duplicate of this bug. ***
*** Bug 449396 has been marked as a duplicate of this bug. ***
So GtkFileChooser incorrectly sorting files and stuff like that is not a bug? Or is Mac OS an unsupported platform here or something?
*** Bug 454357 has been marked as a duplicate of this bug. ***