Thank you. Also recompiled icu 200 times successfully, so we can be pretty sure that patch is correct.
I've made a bug for this issue (https://bz.apache.org/ooo/show_bug.cgi?id=126840) and committed the patch in r1729921: #i126840# - Windows/MSVC build often fails in main/icu The build script (used only on MSVC, not MingW or other OSes) for icu generates nmake makefiles for the build using icu's source/allinone/allinone.sln, in which layoutex doesn't list a dependency on i18n, despite linking to icuin.lib from i18n, which sporadically causes the icu build to fail. This is really an upstream bug, however upstream doesn't build using allinone.sln so we are affected more. This patch declares the missing dependecy, and makes icu build reliably. Patch by: me Tested by: pats On Thu, Feb 11, 2016 at 7:33 PM, Patricia Shanahan <p...@acm.org> wrote: > Your patch works for me. > > On 2/10/2016 3:57 PM, Damjan Jovanovic wrote: >> >> icu supports building on Cygwin using Cygwin's make, but for some bizarre >> reason AOO builds it with MSVC's nmake using makefiles generated by a Perl >> script and even completely bypassing ./configure (makefile.mk has >> CONFIGURE_ACTION+= $(PERL) ..$/..$/..$/..$/..$/createmak.pl >> ..$/..$/..$/..$/..$/createmak.cfg .). It could not have been easy to set >> that up, nor does the nmake build parallelize at all, which is why icu >> wastes 5 minutes building while using only a single thread, so you have to >> wonder why it was done that way. >> >> Building with mingw or building on any other platform does use ./configure >> and GNU make instead, which explains why we only see this bug with MSVC. >> >> Anyway I think I've hacked icu into working. In allinone.sln I've made >> layoutex project depend on the i18n project containing icuin.lib, and the >> Perl script should convert that dependency into the makefiles it creates. >> So far icu has been rebuilt 10 times with this patch (attached), >> succeeding >> every time, so please test it and see if it works for you as well. >> >> Damjan >> >> On Tue, Feb 9, 2016 at 7:51 PM, Patricia Shanahan <p...@acm.org> wrote: >> >>> I have already done some of this. The key difference between failing and >>> non-failing is whether layoutex is built early or later in the build. See >>> the attached files for sample build outputs. >>> >>> I believe layoutex has a dependency on icuin.lib that is not properly >>> declared in the makefile etc., allowing layoutex to be built too soon. If >>> so, the best fix would be to declare the dependency, but I don't know >>> enough about the dmake and configuration stuff to make that change >>> without >>> some study first. >>> >>> Patricia >>> >>> >>> On 2/9/2016 9:40 AM, Damjan Jovanovic wrote: >>> >>>> The icu module has a complicated build with scripts generating >>>> makefiles... >>>> >>>> I am not sure what approach to even take debugging this, but some ideas >>>> might be: >>>> * make a copy of a main/icu[/wntmsci12.pro] directory that builds and a >>>> copy of one that doesn't, then diff the files to see what's different >>>> * compare build logs with it working and not working, to see what steps >>>> differ (eg. build order of some files might be different) >>>> * try and follow the makefile to understand the problem analytically; my >>>> first try didn't get me far >>>> * give up completely, and just hack it. Make a loop in build.pl that >>>> just >>>> keeps cleaning and rebuilding the module. If it builds 50% of the time, >>>> with 10 retries only 1 in 1024 builds will fail, with 20 retries only 1 >>>> in >>>> 2^20 will fail, etc. Something like this might already have been tried >>>> in >>>> the past, as build.pl contains the following code which is only run on >>>> Windows: >>>> >>>> sub give_second_chance { >>>> my $pid = shift; >>>> # A malicious hack for mysterious windows problems - try 2 times >>>> # to run dmake in the same directory if errors occurs >>>> my $child_nick = $processes_hash{$pid}; >>>> $running_children{$folders_hashes{$child_nick}}--; >>>> delete $processes_hash{$pid}; >>>> start_child($child_nick, $folders_hashes{$child_nick}); >>>> }; >>>> >>>> >>>> On Sun, Feb 7, 2016 at 1:42 AM, Patricia Shanahan <p...@acm.org> wrote: >>>> >>>> My next step is to try to get rid of the intermittent failure of the icu >>>>> >>>>> build. It seems to be the one thing standing between me a repeatable >>>>> unattended build. If you know anything about its cause, please let me >>>>> know. >>>>> >>>>> Here is a typical failure output: >>>>> >>>>> Generating Code... >>>>> link.exe @C:\cygwin32\tmp\nm2E74.tmp >>>>> Creating library .\..\..\lib\icule.lib and object >>>>> .\..\..\lib\icule.exp >>>>> if exist ..\..\bin\icule40.dll.manifest mt.exe -manifest >>>>> ..\..\bin\icule40.dll.manifest -outputresource:..\..\bin\icule40.dll;2 >>>>> copy ".\LEFontInstance.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> copy ".\LEGlyphFilter.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> copy ".\LEGlyphStorage.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> copy ".\LEInsertionList.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> copy ".\LELanguages.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> copy ".\LEScripts.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> copy ".\LESwaps.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> copy ".\LETypes.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> copy ".\LayoutEngine.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> copy ".\loengine.h" ..\..\include\layout >>>>> 1 file(s) copied. >>>>> cd "..\allinone" >>>>> cd "C:\OpenOfficeDev\Trunk\main\icu\wntmsci12.pro >>>>> \misc\build\icu\source\allinone\..\layoutex" >>>>> C:\PROGRA~2\MICROS~1.0\VC\bin\nmake.exe / >>>>> /F >>>>> layoutex.mak EXCEPTIONSWITCH="-EHa -Zc:wchar_t-" >>>>> >>>>> Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 >>>>> Copyright (C) Microsoft Corporation. All rights reserved. >>>>> >>>>> if not exist ".\Release/" mkdir ".\Release" >>>>> rc.exe /l 0x409 /fo".\Release\layoutex.res" /i "..\common" /d >>>>> "NDEBUG" .\layoutex.rc >>>>> Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385 >>>>> Copyright (C) Microsoft Corporation. All rights reserved. >>>>> >>>>> NMAKE : fatal error U1073: don't know how to make >>>>> '".\..\..\lib\icuin.lib"' >>>>> Stop. >>>>> NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\nmake.exe' : >>>>> return code '0x2' >>>>> Stop. >>>>> dmake: Error code 2, while making './ >>>>> wntmsci12.pro/misc/build/so_built_so_icu' >>>>> >>>>> 1 module(s): >>>>> icu >>>>> need(s) to be rebuilt >>>>> >>>>> Reason(s): >>>>> >>>>> ERROR: error 65280 occurred while making >>>>> /cygdrive/c/OpenOfficeDev/Trunk/main/icu >>>>> >>>>> When you have fixed the errors in that module you can resume the build >>>>> by >>>>> running: >>>>> >>>>> build --all:icu >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org >>>>> For additional commands, e-mail: dev-h...@openoffice.apache.org >>>>> >>>>> >>>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org >>> For additional commands, e-mail: dev-h...@openoffice.apache.org >>> >> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org >> For additional commands, e-mail: dev-h...@openoffice.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org > For additional commands, e-mail: dev-h...@openoffice.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org