Summary: | devel/icu /custrtrn/Test_widestrs test fails | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Gergely Czuczy <phoemix> | ||||||
Component: | Individual Port(s) | Assignee: | Mikhail Teterin <mi> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | ||||||||
Priority: | Normal | ||||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Gergely Czuczy
2006-09-14 09:30:14 UTC
State Changed From-To: open->feedback Awaiting maintainers feedback State Changed From-To: feedback->open Assign to maintainer Responsible Changed From-To: freebsd-ports-bugs->mi Assign to maintainer I get what seems to be this same problem, but running FreeBSD 5.5. Here's gdb output from an amd64: ---[OK] ---/custrtrn/Test_widestrs cintltst in free(): error: page is already free Program received signal SIGABRT, Aborted. 0x0000000801c8a308 in kill () from /lib/libc.so.5 (gdb) bt #0 0x0000000801c8a308 in kill () from /lib/libc.so.5 #1 0x0000000801c7f931 in raise () from /lib/libc.so.5 #2 0x0000000801cf87f6 in abort () from /lib/libc.so.5 #3 0x0000000801c96d05 in ldexp () from /lib/libc.so.5 #4 0x0000000801c96d48 in ldexp () from /lib/libc.so.5 #5 0x0000000801c978f5 in ldexp () from /lib/libc.so.5 #6 0x0000000801c97ee5 in ldexp () from /lib/libc.so.5 #7 0x0000000801c98005 in free () from /lib/libc.so.5 #8 0x0000000800b8169b in u_strFromWCS_3_6 () from /usr/ports/devel/icu/work/icu/source/lib/libicuuc.so.36 #9 0x000000000048c737 in Test_WCHART_LongString () #10 0x000000080073a3f1 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #11 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #12 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #13 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #14 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #15 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #16 0x000000080073a3a3 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #17 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #18 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #19 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #20 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #21 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #22 0x000000080073a3d0 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #23 0x000000080073a3a3 in iterateTestsWithLevel () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #24 0x000000080073a5e8 in runTests () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #25 0x000000080073aa0d in processArgs () from /usr/ports/devel/icu/work/icu/source/tools/ctestfw/libicutest.so.36 #26 0x000000000042d43a in main () (gdb) -- Rasmus Kaj <rasmus@kaj.se> -- http://www.stacken.kth.se/~kaj/ ACRONYM: A Contrived Reduction Of Nomenclature Yielding Mnemonics According to the ICU developers, this is a gcc bug... Could you try rebuilding with gcc-4.x? Add the following 3 lines to the port's Makefile -- right after the bsd.port.pre.mk: .if ${OSVERSION} < 601000 USE_GCC= 4+ .endif Thanks! -mi On Wed, Oct 18, 2006 at 10:35:58AM -0400, Mikhail Teterin wrote: > According to the ICU developers, this is a gcc bug... Could you try rebuilding > with gcc-4.x? Add the following 3 lines to the port's Makefile -- right after > the bsd.port.pre.mk: > > .if ${OSVERSION} < 601000 > USE_GCC= 4+ > .endif # make build "Makefile", line 39: Malformed conditional (${OSVERSION} < 601000) "Makefile", line 41: if-less endif make: fatal errors encountered -- cannot continue Bye, Gergely Czuczy mailto: gergely.czuczy@harmless.hu -- Weenies test. Geniuses solve problems that arise. > # make build
> "Makefile", line 39: Malformed conditional (${OSVERSION} < 601000)
> "Makefile", line 41: if-less endif
> make: fatal errors encountered -- cannot continue
Please, send me the complete Makefile -- by direct e-mail. Thanks!
-mi
ÓÅÒÅÄÁ 18 ÖÏ×ÔÅÎØ 2006 13:53, Gergely CZUCZY ÎÁÐÉÓÁ×: > > Add the following 3 lines to the port's Makefile -- right after > > the bsd.port.pre.mk: > > > > .if ${OSVERSION} < 601000 > > USE_GCC=4+ > > .endif > > # make build > "Makefile", line 39: Malformed conditional (${OSVERSION} < 601000) > "Makefile", line 41: if-less endif > make: fatal errors encountered -- cannot continue Contrary to my request above, you added the three lines BEFORE, rather than AFTER the bsd.port.pre.mk line... Please, try again. Thanks! -mi Hello,
> According to the ICU developers, this is a gcc bug... Could you try
> rebuilding with gcc-4.x?
For this bug :
---
cintltst in free(): error: page is already free
Abort trap (core dumped)
---
It is ok with GCC 4 (gcc version 4.0.4 20061005 (prerelease) [FreeBSD]) and
CFLAGS = -O2 or with the default gcc (gcc version 3.4.6) but with
CFLAGS= -O. I run FreeBSD 6.2
But i've got another problem because of my locale fr_FR :
# locale
LANG=fr_FR.ISO8859-15
LC_CTYPE="fr_FR.ISO8859-15"
LC_COLLATE="fr_FR.ISO8859-15"
LC_TIME="fr_FR.ISO8859-15"
LC_NUMERIC="fr_FR.ISO8859-15"
LC_MONETARY="fr_FR.ISO8859-15"
LC_MESSAGES="fr_FR.ISO8859-15"
LC_ALL=fr_FR.ISO8859-15
The test fails with :
---OK: CollationMonkeyTest
ERROR : The junk is the same as the French collator.
---ERRORS (1) in TestProperty
--------------------------------------
Errors in total: 1.
TestProperty
CollationAPITest
collate
Looking the source, i think it is normal, the test gets a default locator
and compare it to a french locator : there are the same on my system.
file test/intltest/apicoll.cpp
void
CollationAPITest::TestProperty(/* char* par */)
[...]
junk = Collator::createInstance(abcd, success);
if (U_FAILURE(success))
{
errln("Junk collation creation failed, should at least return
default.");
delete col;
return;
}
delete col;
col = Collator::createInstance(success);
if (U_FAILURE(success))
{
errln("Creating default collator failed.");
delete junk;
return;
}
doAssert(((RuleBasedCollator *)col)->getRules() == ((RuleBasedCollator
*)junk)->getRules(),
"The default collation should be returned.");
Collator *frCol = Collator::createInstance(Locale::getFrance(),
success);
if (U_FAILURE(success))
{
errln("Creating French collator failed.");
delete col; delete junk;
return;
}
doAssert((*frCol != *junk), "The junk is the same as the French
collator.");
------------
So if i revert my locale to "C" (setenv LC_ALL C), all the tests run ok
Regards.
On Sunday 22 October 2006 07:13, Patrick Lamaizière wrote: = But i've got another problem because of my locale fr_FR : This looks like a problem with the ICU itself (rather than the FreeBSD port) -- could you, please, report it to the ICU maintainers? http://bugs.icu-project.org/cgi-bin/icu-bugs Thanks! -mi Le dimanche 22 octobre 2006 17:16, Mikhail Teterin a écrit : > = But i've got another problem because of my locale fr_FR : > > This looks like a problem with the ICU itself (rather than the FreeBSD > port) -- could you, please, report it to the ICU maintainers? > > http://bugs.icu-project.org/cgi-bin/icu-bugs I did it: http://source.icu-project.org/cgi-bin/icu-bugs/incoming?id=5473;user=guest For the FreeBSD port, is-it possible to set the locale to "C" in the Makefile as a work around ? Regards. On Sunday 22 October 2006 13:01, Patrick Lamaizière wrote: = For the FreeBSD port, is-it possible to set the locale to "C" in the = Makefile as a work around ? It is, of course... However, this would hide the bugs like this and thus partially defeat the purpose of the testing. If you know, this particular test is wrong -- I can add a patch for the test to the port, but if we run the tests in "C" only, we will not catch a non-C locale bug in the future. -mi Hi I had the same problem until I added -fno-strict-aliasing to my CFLAGS in /etc/make.conf I have experimented with settings and the following worked for me CFLAGS= -O2 -pipe -funroll-loops -fomit-frame-pointers -fno-strict-aliasing This one worked but I have not tested omitting the others and rebuilding :-) Torben hi, -fno-strict-aliasing does the job. you can omit all of the other flags. to be honest i am not completely sure that this is the best way to go. anyway. in case i will face any postgres faults i will check the status of this bug(?) again. :] andras Hi all I have done some cleanup of my make.conf (from a previous post) so I don't get too many strange build errors because of my ICU hack. The following is a snip from my new make.conf and should give you all an idea of how to make different options depending of the build. ... # Build settings for ports collection .if ${.CURDIR:M*/usr/ports/*} CFLAGS= -O2 -pipe -funroll-loops CXXFLAGS= -O2 -pipe -funroll-loops .endif # Build settings for base system .if ${.CURDIR:M*/usr/src/*} || ${.CURDIR:M*/usr/obj/*} CFLAGS+= -O2 -pipe -funroll-loops -ffast-math CXXFLAGS+= -O2 -pipe -funroll-loops -ffast-math COPTFLAGS= -O2 -pipe -funroll-loops -ffast-math .endif ... # Hack to build ICU .if ${.CURDIR:M*/usr/ports/devel/icu} CFLAGS+= -fno-strict-aliasing .endif ... This snippet gives you different options for making the base system and the ports collection. At the end there is a hack where I add the -fno-strict aliasing to the ICU port only -- the hack as I originally posted it will most likely break other builds. I have no idea why it works -- it was just frustrated trial and error until I could make ICU. Afterwards I was so happy I had to share it with you guys and gals. Med venlig hilsen / Kind Regards Torben Jakobsen Consultant ____________________________________________ (Embedded image moved to file: pic05758.gif) International Business Machines A/S Cell phone: +45 4120 1195 E-mail: torben.jakobsen@dk.ibm.com Web: www.ibm.com On Monday 06 November 2006 05:00, Torben Jakobsen wrote: = # Build settings for base system = .if ${.CURDIR:M*/usr/src/*} || ${.CURDIR:M*/usr/obj/*} = CFLAGS+= -O2 -pipe -funroll-loops -ffast-math = CXXFLAGS+= -O2 -pipe -funroll-loops -ffast-math = COPTFLAGS= -O2 -pipe -funroll-loops -ffast-math = .endif Ok, using fast-math in the base is, probably, wrong. But that's not related to ICU. = # Hack to build ICU = .if ${.CURDIR:M*/usr/ports/devel/icu} = CFLAGS+= -fno-strict-aliasing = .endif AFAIK, -fno-strict-aliasing is part of CFLAGS by default... Anyway, can you tell me, what the final CFLAGS are in icu? make -C /usr/ports/devel/icu -V CFLAGS -V CXXFLAGS Thanks! -mi mi 2006-11-07 19:14:25 UTC FreeBSD ports repository Modified files: devel/icu Makefile Added files: devel/icu/files patch-intltest Log: Add a patch to fix test-failures in some "exotic" locales (obtained from ICU): PR: 102629 Make sure to use not only "-O2", but also "-fno-strict-aliasing" -- but only when using the "stock" cc/c++ as the newer gcc-4.x does not seem to exhibit a problem. This seems to help the test-exposed miscompilations. PR: 103255 Revision Changes Path 1.23 +8 -2 ports/devel/icu/Makefile 1.1 +64 -0 ports/devel/icu/files/patch-intltest (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" State Changed From-To: open->closed Using -fno-strict-aliasing is essential. The gcc-3.x is known to be buggy without this. Port updated to add the flag automatically, when using the "stock" cc and c++. Thanks to all for investigating. |