Discussion:
How to resolve this problem "1 out of 1 hunk FAILED -- saving rejects to file "
王海龙
2010-03-24 09:29:15 UTC
Permalink
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 ?

Thanks!
Petr Mladek
2010-03-24 10:12:12 UTC
Permalink
Post by 王海龙
Hi all,
cd ooo-build
./autogen.sh --with-distro=UbuntuHardy
./download
make
All commands are good except that the last command "make" give me the
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
Petr Mladek
2010-03-26 15:12:36 UTC
Permalink
Hi Petr,
When I used the command "make" to build ooo-build-3-2, a configure error
configure: error: KDE4 headers not found. Please specify the root of your
KDE4 installation by exporting KDE4DIR before running "configure".
The configure check tries to find the header file "ksharedptr.h". It is
searched in the path "$KDE4DIR/include/ksharedptr.h". See also the configure
check definition in ooo-build/build/ooo320-m12/configure.in.

You need to make sure that this header is installed on your system and set the
KDE4DIR variable accordingly.

On openSUSE, it is located in "/usr/include/ksharedptr.h" and is provided by
the package "libkdecore4-devel".
I find this bug report at http://bugs.gentoo.org/283618. I want to know
whether there are some methods to resolve this problem.
Do you use Gentoo or another distro?

I add ooo-***@lists.freedesktop.org into CC. You might get there help from
users using other distributions?
--
Best Regards,

Petr Mladek
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o. e-mail: ***@suse.cz
Lihovarská 1060/12 tel: +420 284 028 952
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
王海龙
2010-03-27 06:52:08 UTC
Permalink
Thank you.

The problem has been resolved. The method is :

My env is Ubuntu Karmic. I find the file "ksharedptr.h" located in "/usr/include/kde/", not in "usr/include" as openSUSE.
So I simply copy "ksharedptr.h" from "/usr/include/kde/" to "/usr/include". Then the problem donot recur.


----- Original Message -----
From: "Petr Mladek" <***@suse.cz>
To: "" <***@gmail.com>
Cc: <ooo-***@lists.freedesktop.org>
Sent: Friday, March 26, 2010 11:12 PM
Subject: Re: Hi Petr, ooo-build-3-2 can't find KDE4 headers. Can you help me? Thank you!
Hi Petr,
When I used the command "make" to build ooo-build-3-2, a configure error
configure: error: KDE4 headers not found. Please specify the root of your
KDE4 installation by exporting KDE4DIR before running "configure".
The configure check tries to find the header file "ksharedptr.h". It is
searched in the path "$KDE4DIR/include/ksharedptr.h". See also the configure
check definition in ooo-build/build/ooo320-m12/configure.in.

You need to make sure that this header is installed on your system and set the
KDE4DIR variable accordingly.

On openSUSE, it is located in "/usr/include/ksharedptr.h" and is provided by
the package "libkdecore4-devel".
I find this bug report at http://bugs.gentoo.org/283618. I want to know
whether there are some methods to resolve this problem.
Do you use Gentoo or another distro?

I add ooo-***@lists.freedesktop.org into CC. You might get there help from
users using other distributions?

--
Best Regards,

Petr Mladek
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o. e-mail: ***@suse.cz
Lihovarská 1060/12 tel: +420 284 028 952
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
Tor Lillqvist
2010-03-29 06:50:06 UTC
Permalink
Post by 王海龙
So I simply copy "ksharedptr.h" from "/usr/include/kde/" to
"/usr/include".
That doesn't sound like a good idea. What then when /usr/include/kde/ksharedptr.h eventually gets updated by package management, but your manual copy not? You will then have two different, potentially incompatible, versions of this header. Copying files around, especially ones that are part of the system package management, is never a good idea.

The correct solution here would have been to just make sure that the -I/usr/include/kde flag gets passed to the relevant compilations. Is ksharedptr.h really the only header for which this problem occurred?

--tml
Jan Holesovsky
2010-03-29 09:24:59 UTC
Permalink
Hi,
Post by 王海龙
My env is Ubuntu Karmic. I find the file "ksharedptr.h" located in
"/usr/include/kde/", not in "usr/include" as openSUSE. So I simply copy
"ksharedptr.h" from "/usr/include/kde/" to "/usr/include". Then the
problem donot recur.
The _idea_ of the ./configure script is to ensure that your environment is
correct. So if you fake your environment so that ./configure thinks it is
correct, but it is in fact not, you'll have trouble during the build later
anyway - copying this one particular file does not help you at all.

Either configure with --disable-kde4, or export KDE4DIR pointing to the right
location.

HTH,
Kendy

Loading...