Apache OpenOffice (AOO) Bugzilla – Issue 14032
gnupatch and gnucp on Solaris?
Last modified: 2003-08-08 14:07:24 UTC
Hi, I do not have those tools on Solaris: oo@ultra:/> find . -name gnupatch 2>/dev/null oo@ultra:/> find . -name gnucp 2>/dev/null oo@ultra:/> uname -a SunOS ultra 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-5_10 Shouldn't we first check if those binaries exist before calling them? I use this simple change to get over this: -GNUCOPY=gnucp -GNUPATCH=gnupatch +GNUCOPY=cp +GNUPATCH=/usr/local/bin/patch
Sander, is it for you?
yes, we should get this fixed before beta2.
Sander, what is the status of this?
Hmm, odk/util/makefile.pmk uses $(GNUCOPY) -u. But standard cp does not support -u. So I just removed it: --- makefile.pmk~ Sat Jun 14 10:00:42 2003 +++ makefile.pmk Sat Jun 14 10:00:44 2003 @@ -115,8 +115,8 @@ MY_COPY=$(GNUCOPY) MY_COPY_RECURSIVE=$(GNUCOPY) -r .ELSE -MY_COPY=$(GNUCOPY) -u -MY_COPY_RECURSIVE=$(GNUCOPY) -urf +MY_COPY=$(GNUCOPY) +MY_COPY_RECURSIVE=$(GNUCOPY) -rf .ENDIF CONVERTTAGSCRIPT=$(SOLARENV)$/bin$/converttags.pl
reassigned.
$(GNUCOPY) is set in the build environment. It seems to be used in other places too. In fact of this i will use gnucp and the options exactly as i did it in this makefile. Removing of options is not a good fix :-( I think gnucp is more a requirement for the build env and should be documented (Sander?). I will not accept this patch, please remove it.
Reopen to reassign. That patch is not meant to be included in OOo. It only whos how I solved it for my build. The issue is that: "Shouldn't we first check if those binaries exist before calling them?" as I said in the issue.
Sander, please take it back :-)
Sander, could you please comment on this?
so what we need to do is: a) make sure that gnucp and gnupatch are settable values like CC (because people will have them in different places and different names) b) have test in configure that make sure that we are dealing with the real things (so gnucp does support -u) c) update the requirements page
Isn't it better to stick with the default cp and patch and get rid of extra features like -u of GNU patch? Don't get me wrong, I'm not against GNU (in fact I'm the developer of Emacs and have @gnu.org address), but it would be much easier for newcomers to compile on Solaris without that extra requirement.
Sort of yes - but really only if the people using -u actually stop adding it back again and again so it isn't a continual struggle of making it compile with solaris patch and cp again.
This is easily solved by reporting such thing to IZ and fixing them. According to POSIX 1003.2, cp allows: cp [-fip] source_file target_file cp [-fip] source_file . . . target cp -R [-fip] source_file . . . target cp -r [-fip] source_file . . . target Thus using -u is not POSIX compliant and as such must not be used!
there are now --with-gnu-patch and --with-gnu-cp options to configure, that allow one to specify the location of teh respective tools. marking as closed
Hi, dmake in python on Solaris with GNU patch in /usr/local/bin/patch and configured with --with-gnu-patch=/usr/local/bin/patch: oo:/mnt/hdc2/ultra/BuildDir/ooo_11rc3_src/solenv # grep ^GNUPATCH ../SolarisSparcEnv.Set.sh GNUPATCH="/usr/local/bin/patch" cd ./unxsols4.pro/misc/build && cat ../../../Python-2.2.2.patch | patch -b -p2 & & touch so_patched_so_python 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. 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. Malformed patch at line 1822: patch: Line must begin with '+ ', ' ', or '! '. dmake: Error code 2, while making './unxsols4.pro/misc/build/so_patched_so_pyth on' ---* TG_SLO.MK *--- solenv/inc/tg_ext.mk uses system patch on Solaris instead of GNUPATCH when BSCLIENT is not TRUE: .IF "$(BSCLIENT)"=="TRUE" +cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATCH_FILE_NAME) | $(GNUPATCH) -f $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FI LE) .ELSE # "$(BSCLIENT)"!="" +cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATCH_FILE_NAME) | patch $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE) .ENDIF # "$(BSCLIENT)"!="" I propose changing patch to GNUPATCH. Thus we will have almost the same lines there. Can those be unified? I will use this patch temporarily on Solaris: --- ooo_11rc3_src.orig/solenv/inc/tg_ext.mk Sat Aug 2 18:15:15 2003 +++ ooo_11rc3_src/solenv/inc/tg_ext.mk Sat Aug 2 18:17:26 2003 @@ -218,7 +218,7 @@ .IF "$(BSCLIENT)"=="TRUE" +cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATCH_FILE_NAME) | $(GNUPATCH) -f $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FI LE) .ELSE # "$(BSCLIENT)"!="" - +cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATCH_FILE_NAME) | patch $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE) + +cd $(PACKAGE_DIR) && $(TYPE) $(BACK_PATH)$(PATCH_FILE_NAME) | $(GNUPATCH) $(PATCHFLAGS) -p2 && $(TOUCH) $(PATCH_FLAG_FILE) .ENDIF # "$(BSCLIENT)"!="" .ENDIF # "$(GUI)"=="WNT" .ENDIF # "$(PATCH_FILE_NAME)"=="none" || "$(PATCH_FILE_NAME)"==""
commited in 1.46.18.1 (rc3), reclosing
Thanks!