Apache OpenOffice (AOO) Bugzilla – Issue 59477
m146: Build fails in postprocess
Last modified: 2009-09-22 17:09:51 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 *---
Forgot to say that this is m146 with W32-tcsh
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.
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.
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
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.
Created attachment 32556 [details] Patch for postprocess/checkdeliver/makefile.mk
Created attachment 32557 [details] Correct patch for postprocess/checkdeliver/makefile.mk
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
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.
#%%$@ 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
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.
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.
Created attachment 32580 [details] Patch for deliver.pl
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
OOps, I didn't see you answer before I replied. Yes, unfortunately it special-cases cygwin. :( But it seems to work.
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.
FWIW: me too. I reproduced this on cygwin as well.
Fixed on CWS rt14.
Created attachment 32629 [details] Fixed patch for feliver.pl
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?
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.
Created attachment 32631 [details] Fix for deliver.pl as committed to CWS rt14
Please verify. re-open issue and reassign to vq@openoffice.org
reassign to vq@openoffice.org
reset resolution to FIXED
verified
I should really get a Perl book ;) I didn't know that. Thank you, Ruediger, for the quick fix. Volker
Seen on MWS -> closing
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.