Issue 59477 - m146: Build fails in postprocess
Summary: m146: Build fails in postprocess
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: current
Hardware: PC Windows, all
: P2 Trivial (vote)
Target Milestone: OOo 2.0.2
Assignee: quetschke
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-17 13:17 UTC by quetschke
Modified: 2009-09-22 17:09 UTC (History)
3 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch for postprocess/checkdeliver/makefile.mk (391 bytes, text/plain)
2005-12-19 10:30 UTC, rt
no flags Details
Correct patch for postprocess/checkdeliver/makefile.mk (353 bytes, text/plain)
2005-12-19 10:34 UTC, rt
no flags Details
Patch for deliver.pl (2.07 KB, patch)
2005-12-19 17:19 UTC, quetschke
no flags Details | Diff
Fixed patch for feliver.pl (1.63 KB, patch)
2005-12-21 13:32 UTC, quetschke
no flags Details | Diff
Fix for deliver.pl as committed to CWS rt14 (2.61 KB, text/plain)
2005-12-21 14:58 UTC, rt
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2005-12-17 13:17:05 UTC
The build fails with this output:

=============
Building project postprocess
=============
/cygdrive/d/w1/SRC680_m146/postprocess/checkdeliver
dmake: Executing shell macro: +pwd
mkout -- version: 1.6
/cygdrive/d/w1/SRC680_m146/postprocess/checkdeliver
dmake: Executing shell macro: date +%d%m%Y
/bin/perl checkdeliver.pl
-------------
Error: no such file
'/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/testtool.bin'Errors
found: Module 'automation' not delivered correctly?

Error: no such file
'/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/regcomp.bin'Error: no
such file
'/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/uno.bin'Errors found:
Module 'cpputools' not delivered correctly?

Error: no such file
'/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/pkgchk.bin'Error: no
such file
'/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/so/soffice_so.bin'Error:
no such file
'/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/soffice_oo.bin'Error:
no such file
'/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/unopkg.bin'Errors
found: Module 'desktop' not delivered correctly?

Error: no such file
'/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/cpp.lcc'Errors found:
Module 'soltools' not delivered correctly?

checkdeliver.pl - checking delivered binaries
dmake:  Error code 8, while making '../wntmsci10.pro/misc/checkdeliver.done'
---* tg_merge.mk *---
Comment 1 quetschke 2005-12-17 13:18:19 UTC
Forgot to say that this is m146 with W32-tcsh
Comment 2 quetschke 2005-12-17 13:39:13 UTC
For example:

solver\680\wntmsci10.pro\inc\automation\deliver.log contains:

COPY automation/wntmsci10.pro/bin/testtool.exe wntmsci10.pro/bin/testtool.exe
COPY automation/wntmsci10.pro/bin/testtool wntmsci10.pro/bin/testtool.bin
COPY automation/wntmsci10.pro/inc/classes wntmsci10.pro/bin/classes

and the actual deliver part of project says this:

COPY: ../wntmsci10.pro/bin/testtool.exe ->
/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/testtool.exe
COPY: ../wntmsci10.pro/bin/testtool ->
/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/testtool.bindeliver:
/cygdrive/d/w1/SRC680_m146/automation/prj/d.lst: ERROR: can't copy
../wntmsci10.pro/bin/testtool: No such file or directory

COPY: ../wntmsci10.pro/inc/classes ->
/cygdrive/d/w1/SRC680_m146/solver/680/wntmsci10.pro/bin/classes


But this is nothing new, this file wasn't delivered for m145 either and the
build finished successful for m145.

It looks as if CWS rt13 broke this, reassigning to Ruediger.
Comment 3 pavel 2005-12-18 14:53:22 UTC
I do not know if this is connected, but I can't deliver at all:

sh: -R: invalid option
Usage:  sh [GNU long option] [option] ...
        sh [GNU long option] [option] script-file ...
GNU long options:
        --debug
        --dump-po-strings
        --dump-strings
        --help
        --init-file
        --login
        --noediting
        --noprofile
        --norc
        --posix
        --rcfile
        --restricted
        --verbose
        --version
        --wordexp
Shell options:
        -irsD or -c command or -O shopt_option          (invocation only)
        -abefhkmnptuvxBCHP or -o option
deliver: /disk3/oo/BuildDir/ooo_SRC680_m146_src/stlport/prj/d.lst: ERROR: Failed
to execute  -R '.comment' -s /disk3/oo/Build

=============

Looks like strip command handling is broken in deliver.pl.
Comment 4 rt 2005-12-19 09:41:17 UTC
The latter one ( '-R invalid option') seems to be broken by i57063. Please check
and reopen that issue if appropriate.
For the postprocess stuff I'll see what to do. For now to finish your build just
disable 'postprocess/checkdeliver'. It is nothing more thatn a security check,
you do not really need it.

Rüdiger
Comment 5 rt 2005-12-19 10:11:20 UTC
Very strange. 'deliver.pl' is supposed to check for file existence before
writing it to deliver.log and before copying. Obviously neither the check in
line 840/841
        @from_stat = stat($from);
        return 0 unless -f _;
nor that in line 1102
        return 0 if ( ! -e $entry[1] );
works for you, because according to your example a non existing
automation/wntmsci10.pro/bin/testtool is tried to be copied. That leads to all
those error messages about non existing files and to wrong logfiles containing
entries for files which have never been copied.
Comment 6 rt 2005-12-19 10:30:29 UTC
Created attachment 32556 [details]
Patch for postprocess/checkdeliver/makefile.mk
Comment 7 rt 2005-12-19 10:34:40 UTC
Created attachment 32557 [details]
Correct patch for postprocess/checkdeliver/makefile.mk
Comment 8 rt 2005-12-19 10:39:09 UTC
Hi Volker,

Attached patch (the second one, not the test version I erroneously submitted
first) should disable the deliver check for windows tcsh builds. Of course that
cannot be the real solution but it would work around your problems until I find
out why deliver.pl does such strange things in your environment.
Please check whether it works for you. If so, I'll submit it as master fix.

Rüdiger
Comment 9 rt 2005-12-19 12:51:03 UTC
Seems to be a cygwin speciality. cygwin tcsh states <testfile> exists if there
is <testfile.exe> . Try to do the following:
   > mkdir testdir
   > touch testdir/bla.exe
Do 'ls  testdir' and you will se testdir/bla.exe - nothing else.  Just as expected.
   > ls  testdir
   bla.exe
Now do 'ls testdir/bla' and see
   > ls testdir/bla
   testdir/bla
And even 'test' states that a file named 'bla'exists, also it does not:
   > test -e testdir/bla
   > echo $?
   0
That's why all perl checks for existence of
automation/wntmsci10.pro/bin/testtool fail. Unfortunately I do not have an idea
yet how to work around that.
Comment 10 quetschke 2005-12-19 14:25:05 UTC
#%%$@ automatic .exe handling!

Ruediger, I'm not sure how the file tests in perl handle this problem, I'll
look into that later, but for now this ugly construct works:

$ find . -maxdepth 1 -name bla.exe -exec echo _XfoundX_ \; | grep _XfoundX_ >
dev/null && echo OK

prints OK, and

$ find . -maxdepth 1 -name bla -exec echo _XfoundX_ \; | grep _XfoundX_ >
/dev/null && echo OK

doesn't.

I'll ask the cygwin list for better alternatives.

   Volker
Comment 11 quetschke 2005-12-19 15:31:42 UTC
I got a better solution on the cygwin list, see
 <http://cygwin.com/ml/cygwin/2005-12/msg00699.html>

Adding a trailing dot works in all cases, e.g.

 test -e bla.
 test -e bla.exe.

do the "right" thing. It is still ugly but much better than my workaround.
Comment 12 rt 2005-12-19 16:42:59 UTC
Volker,

Thanks for your evaluation. I'm still unshure what I will do here. 'test -e
<filename>.' would not work for unix like systems, so I would have to introduce
OS dependent tests - not so nice. But, yes, it could work. 
Comment 13 quetschke 2005-12-19 17:19:25 UTC
Created attachment 32580 [details]
Patch for deliver.pl
Comment 14 quetschke 2005-12-19 17:21:36 UTC
Hi Ruediger,
the previous patch seems fo fix the problem. I only checked the deliver.log and
now testtool is no longer in deliver.log.

I might have added a few dots to many, please have a look.

Volker 
Comment 15 quetschke 2005-12-19 19:04:35 UTC
OOps, I didn't see you answer before I replied. Yes, unfortunately it
special-cases cygwin. :( But it seems to work.
Comment 16 pavel 2005-12-19 19:12:27 UTC
BTW:

touch file.exe
head file
head file.exe

Will tell you that file doesn't exist and file.exe exists. Any simple open (not
stat) should do the right thing.
Comment 17 pavel 2005-12-21 09:45:18 UTC
FWIW: me too. I reproduced this on cygwin as well.
Comment 18 rt 2005-12-21 11:39:40 UTC
Fixed on CWS rt14.
Comment 19 quetschke 2005-12-21 13:32:03 UTC
Created attachment 32629 [details]
Fixed patch for feliver.pl
Comment 20 quetschke 2005-12-21 13:36:55 UTC
Sorry to reopen, but my original patch didn't work.

I had to revert the two
        return <something> -f _.$maybedot; 
changes. The new, attached patch was tested with a successful complete build
from a fresh tree.

Btw, are you sure the lines I changed back should really test for a "_" file?
Comment 21 rt 2005-12-21 14:39:28 UTC
I also fixed your previous patch, have you seen what I checked in on CWS rt14?
I'll attach the diff to this issue.
And, yes, it's correct to test for '_'. According to my perl book '_' is a
special file handle holding all infromation of the last 'stat', 'lstat' or file
test operator.
Comment 22 rt 2005-12-21 14:58:09 UTC
Created attachment 32631 [details]
Fix for deliver.pl as committed to CWS rt14
Comment 23 rt 2005-12-21 14:59:13 UTC
Please verify.

re-open issue and reassign to vq@openoffice.org
Comment 24 rt 2005-12-21 14:59:25 UTC
reassign to vq@openoffice.org
Comment 25 rt 2005-12-21 14:59:31 UTC
reset resolution to FIXED
Comment 26 jens-heiner.rechtien 2005-12-21 16:32:09 UTC
verified
Comment 27 quetschke 2005-12-21 19:48:47 UTC
I should really get a Perl book ;) I didn't know that.

Thank you, Ruediger, for the quick fix.

Volker
Comment 28 rt 2006-01-04 11:26:11 UTC
Seen on MWS -> closing
Comment 29 tml 2009-09-22 17:09:28 UTC
FYI, in the upcoming Cygwin 1.7 the trick to add a trailing dot to filenames
passed to stat() doesn't work any longer; in fact stat() then fails. This at
least with the "1.7.0s(0.212/5/3) 20090801" snapshot of cygwin1.dll. This is on
Windows Server 2008 R2 if it matters.