[ooo-build] How to resolve this problem "1 out of 1 hunk FAILED -- saving rejects to file "

Petr Mladek pmladek at suse.cz
Wed Mar 24 03:12:12 PDT 2010


On Wednesday 24 March 2010, 王海龙 wrote:
> Hi all,
>
> I have checked out the ooo-build souce and build it using following
> commands:
>
> cd ooo-build
> ./autogen.sh --with-distro=UbuntuHardy
> ./download
> make
>
> All commands are good except that the last command "make" give me the
> following error information:
>
> patching file idlc/source/idlcmain.cxx
> Hunk #1 FAILED at 42.
> 1 out of 1 hunk FAILED -- saving rejects to file
> idlc/source/idlcmain.cxx.rej Testing patch ubuntu-sparc-hack.diff failed.
> at /root/work/ooo-build/patches/apply.pl line 98. make: ***
> [stamp/patch.apply] Error 1
>
> What should I do ?

The diff probably has some conflicts with the current sources. Alternatively, 
there might be some fuzzy hunks.

The best solution should be to update to fix the diff to apply cleanly. You 
might do it the following way:

     cd ooo-build/build/ooo320-m12
     patch -p0 --dry-run <../../patches/dev300/ubuntu-sparc-hack.diff

, see what happens and try to fix the diff to apply by editing the diff 
itself.

Alternatively you might omit the --dry-run option => it will apply the valid 
hunks. If a hunk can not be applied, it will create .orig and .rej file. In 
your case it will create:

    idlc/source/idlcmain.cxx.orig
    idlc/source/idlcmain.cxx.rej

You should port the changes from the .rej file into the idlcmain.cxx and 
generate the clean diff using:

    diff -up idlc/source/idlcmain.cxx.orig idlc/source/idlcmain.cxx

update ubuntu-sparc-hack.diff accordingly and commit the updated .diff.


Temporary solution is to disable this diff. It is enough to comment it out in 
ooo-build/patches/dev300/apply.

The name of the diff probably means that it is needed only on sparc, so it 
might be safe to disable it.


Best Regards,
Petr


More information about the ooo-build mailing list