Apache OpenOffice (AOO) Bugzilla – Issue 15899
patch on Solaris is not GNU patch
Last modified: 2004-08-12 17:27:40 UTC
Hi, Solaris' patch can not apply boost patch in current RC tree (the same applied to 11beta2 and 1.0.3): x boost_1_27_0/tools/build/tru64cxx-tools.jam, 3038 bytes, 6 tape blocks x boost_1_27_0/tools/build/tru64cxx65-tools.jam, 2930 bytes, 6 tape blocks x boost_1_27_0/tools/build/unit-tests.jam, 9655 bytes, 19 tape blocks x boost_1_27_0/tools/build/vacpp-tools.jam, 2205 bytes, 5 tape blocks x boost_1_27_0/tools/make-cputime-page.pl, 1173 bytes, 3 tape blocks make writeable... cd ./unxsols4.pro/misc/build && cat ../../../boost_1_27_0.patch | patch -b -p2 && touch so_patched_ooo_boost Looks like a new-style context diff. The next patch looks like a new-style context diff. The next patch looks like a new-style context diff. The next patch looks like a new-style context diff. The next patch looks like a new-style context diff. The next patch looks like a new-style context diff. File to patch: ^C [1] 18641 18642 ---* TG_SLO.MK *--- ERROR: Error 65280 occurred while making /ultra/BuildDir/ooo_11rc_src/boost oo@ultra:/ultra/BuildDir/ooo_11rc_src/boost> What do you really use to build OOo for Solaris? :-) It seems to me like GNU system with SOlaris kernel... Using GNU patch: oo@ultra:/ultra/BuildDir/ooo_11rc_src/boost/unxsols4.pro/misc/build> cat ../../../boost_1_27_0.patch | /usr/local/bin/patch --dry-run -p2 patching file boost_1_27_0/boost/config/user.hpp patching file boost_1_27_0/boost/detail/atomic_count_linux.hpp patching file boost_1_27_0/boost/detail/shared_array_nmt.hpp patching file boost_1_27_0/boost/detail/shared_count.hpp patching file boost_1_27_0/boost/detail/shared_ptr_nmt.hpp patching file boost_1_27_0/boost/detail/linux_atomic.h oo@ultra:/ultra/BuildDir/ooo_11rc_src/boost/unxsols4.pro/misc/build> No problem!
hmm... I thought this was the reason why there is a 'gnupatch' in unitools.mk 8-)
;-) Will we do something with it? I'm all for using only context diffs instead of unified diffs and not requiring GNU patch on Solaris systems.
*** Issue 16618 has been marked as a duplicate of this issue. ***
Vladimir Glazounov notified me, that GNU patch should be patch on Solaris - see http://tools.openoffice.org/ext_comp.html Although I use GNU patch (and have in in /usr/local/bin, I do not agree with this solution (calling patch on Solaris should be patch, not GNU patch). So we should remove all those gnupatch things from sources or (IMHO better) remove the need for GNU patch at all and use system patch on Solaris. Or we should test in configure for the version or call configure --with-patch=/usr/local/bin/patch. We should not depend on patch being GNU patch!
Changing the title. patch on Solaris is not GNU patch and should not be!
as GNU patch is a stated requirement i see no real advantage on switching back to solaris system patch. it would be nice to be "solaris patch clean" but it would require to check each and every patch for compatibility. not only the existing but also every new one. i admit that calling it patch also is no good idea and should be fixed.
i think the only really feasible fix is to a) make sure patch is always called via $GNUPATCH (just as make needs to be called via $GNUMAKE) and b) make the value of GNUPATCH be picked up from the environment. otherwise we will get a continuos stream of patches and repatches that fix when people assume gnu diff/patch
I agree with a) and would like to propose different b): b) use `which patch` unless something like --with-gnu-patch=/usr/local/bin/patch is specified. Configure should also check if `which patch` is GNU patch. If it is not it should emit an error/warning like: Warning: `which patch` is not GNU patch as required, use --with-gnu-patch OK?
I added --with-gnu-patch option to configure.in, and made unitools.mk pick up the value. not quite as fancy implementation but should do the job. marking as fixed
Closing ...