It's probably okay. It's alright to close the fd after the mmap, and it's not really calling mmap twice--it's just the debugger trying to follow the optimized code.
OK, Just my ignorance :-)
1401130956 170397 ./icu/source/data/locales/ja.txt (aligns)
Hmm, so it's looking like the error message may be genuine, in that the problem it's having is with ja.txt, and not a problem finding some other file. So maybe we should check the obvious, and see if that file got corrupted for you:
% cksum ./icu/source/data/locales/ja.txt 1401130956 170397 ./icu/source/data/locales/ja.txt
% md5 ./icu/source/data/locales/ja.txt MD5 (./icu/source/data/locales/ja.txt) = 728d7bb46a270b2d8ec07e96527858d7
728d7bb46a270b2d8ec07e96527858d7 (aligns)
Do those match?Yep :-|
Yep. Other locales seem to work correctly.
When I build, ja.txt isn't the first locale it gets to--I have lines like this right before it, invoking the same tool:
ICU_DATA=../data/out/build DYLD_LIBRARY_PATH=../common:../i18n:../tools/toolutil:../layout:../ layoutex:../extra/ustdio:../tools/ctestfw:../data/out:../data:../ stubdata/:$DYLD_LIBRARY_PATH ../tools/genrb/genrb -k -q -p icudt26b -s ../data/locales -d ../data/out/build it_IT.txt
ICU_DATA=../data/out/build DYLD_LIBRARY_PATH=../common:../i18n:../tools/toolutil:../layout:../ layoutex:../extra/ustdio:../tools/ctestfw:../data/out:../data:../ stubdata/:$DYLD_LIBRARY_PATH ../tools/genrb/genrb -k -q -p icudt26b -s ../data/locales -d ../data/out/build it_IT_PREEURO.txt
If you do too, then that implies that it may be something specific to ja.txt, rather than a general problem with genrb doing it's thing.
One other thing to do, if ja.txt looks okay:
Break on "parse.c:665", then "next" until you get to where it prints the warning, and see what "intStatus" and "coll" are set to.
Breakpoint 1, parseCollationElements (tag=0x814b6b8 "", startline=15,
status=0xbfffef38) at parse.c:665
665 coll = ucol_openRules(member->u.fString.fChars, member->u.fString.fLength,
(gdb) next
655 UErrorCode intStatus = U_ZERO_ERROR;
(gdb) next
658 int32_t len = 0;
(gdb)
665 coll = ucol_openRules(member->u.fString.fChars, member->u.fString.fLength,
(gdb)
668 if (U_SUCCESS(intStatus) && coll != NULL)
(gdb)
701 warning(line, "%%Collation could not be constructed from CollationElements - check context!");
(gdb) p coll
$1 = (UCollator *) 0x0
(gdb) p intStatus
$2 = U_INTERNAL_PROGRAM_ERROR
(gdb)
Then, start over, but step into the call to ucol_openRules, and see if you can tell where the error is getting set (assuming you found intStatus set to some error code)
At the moment I can't help much here.
Cheers Alberto