openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damjan Jovanovic <dam...@apache.org>
Subject Re: Building on Windows
Date Wed, 10 Feb 2016 23:57:21 GMT
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 <pats@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 <pats@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-unsubscribe@openoffice.apache.org
>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>

Mime
View raw message