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 333977 - Make check fails with error: Test failed: unexpected error when using g_utf8_collate() on ./collate/collate-1.in
Make check fails with error: Test failed: unexpected error when using g_utf8_...
Status: RESOLVED NOTABUG
Product: glib
Classification: Platform
Component: general
2.10.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 342014 360275 396858 449396 454357 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-03-09 05:01 UTC by Tom Williams
Modified: 2008-05-02 20:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
buildlog.glib2.bz2 (16.66 KB, application/octet-stream)
2006-03-18 02:24 UTC, ahasenack
Details

Description Tom Williams 2006-03-09 05:01:03 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.
Comment 1 ahasenack 2006-03-18 02:24:39 UTC
Created attachment 61470 [details]
buildlog.glib2.bz2

I get the exact same error. Full build log attached.
Comment 2 Benjamin Reed 2006-04-07 20:39:11 UTC
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?
Comment 3 Benjamin Reed 2006-04-07 20:40:25 UTC
(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.
Comment 4 Benjamin Reed 2006-04-08 03:25:39 UTC
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.
Comment 5 Mike S 2006-05-17 07:30:11 UTC
Compiling on 10.4.6 ( Mac OS X ) I get the same error
Comment 6 Matthias Clasen 2006-05-18 17:21:53 UTC
*** Bug 342014 has been marked as a duplicate of this bug. ***
Comment 7 Daniel Macks 2006-05-18 22:37:51 UTC
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.
Comment 8 Daniel Macks 2006-05-18 22:56:06 UTC
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.

Comment 9 Manish Singh 2006-05-18 23:14:07 UTC
LC_ALL is supposed to override LANG.

Do you actually have en_US locale files installed?
Comment 10 Manish Singh 2006-05-19 01:57:49 UTC
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.
Comment 11 Tom Williams 2006-05-27 16:45:16 UTC
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...
Comment 12 Behdad Esfahbod 2006-10-17 20:01:42 UTC
*** Bug 360275 has been marked as a duplicate of this bug. ***
Comment 13 Karsten Bräckelmann 2007-02-22 20:46:43 UTC
*** Bug 396858 has been marked as a duplicate of this bug. ***
Comment 14 Manish Singh 2007-06-21 18:54:32 UTC
*** Bug 449396 has been marked as a duplicate of this bug. ***
Comment 15 Yevgen Muntyan 2008-05-02 19:16:52 UTC
So GtkFileChooser incorrectly sorting files and stuff like that is not a bug? Or is Mac OS an unsupported platform here or something?
Comment 16 Yevgen Muntyan 2008-05-02 20:07:23 UTC
*** Bug 454357 has been marked as a duplicate of this bug. ***