Apache OpenOffice (AOO) Bugzilla – Issue 82202
Remove the need for $(WRAPCMD) for W32-bash builds
Last modified: 2013-08-07 15:34:52 UTC
With dmake 4.11 it should be possible to remove the need for WRAPCMD/guw.exe. I tried the following strategy: * Use mixed mode path names (DOS paths with / instead of \ as directory separator) in the environment variables set by winenv.set[.sh] * Enable .WINPATH to make dmake output mixed mode paths * Set WRAPCMD to empty The following attached patches are prove of principle patches that allow to build OOo without guw.exe until it fails in instsetoo_native. There are surprisingly few changes but the problems I encountered were: * Some programs really want backslashes in DOS paths, but so far only two came up: csc.exe and rsc.exe. I created a very simple guw like wrapper that just flips every non-leading '/' to '\'. This script, slfl.pl is also attached and has to be copied into solenv/bin/. * dmake's $(mktmp ..) function macro is not .WINPATH aware, it returns a POSIX path. Luckily there is a workaround for this problem. If TMPDIR is set to a mixed mode path mktmp returns a temp file that uses this path. This should be properly fixed in the next dmake. My plan is solve this in two stages: 1. Clean up the patches and create a configure switch --disable-wrapcmd that switches the environment to the mode described above. 2. After building OOo without WRAPCMD is thoroughly tested remove the now unused $(WRAPCMD) occurences. I will work on this in a nowrapcmd CWS soon.
Created attachment 48661 [details] Patch for config_office and solenv
Created attachment 48662 [details] Patch for testtools
Created attachment 48663 [details] Flip slashes to backslashes - copy to solenv/bin/
Created attachment 49728 [details] Make instsetoo_native work without WRAPCMD
All patches and some additional changes committed to CWS nowrapcmd1. The default is now to build without WRAPCMD but a configure switch --enable-wrapcmd can be used to enable its use again. A follow-up issue and CWS will deal with the clean-up.
@ause: Please verify. @is: Ingo, please check the parts in solenv that are used in instsetoo_native.
The patch looks technically good. But I do not like, that the path conversion is done in every systemcall in servicesfile.pm. It should only be done once for the constant pathes.
@is: I agree, but the previous/old status is that the wrapper is called on the full command-line, with all the overhead like parsing and tons of regexes. With the new version this is reduced to one external call to cygpath on arguments that really have to be translated (in fix_cygwin_path(), but non cygwin targets should not suffer much from this, as for them no external function calls are involved.). See the FIXME I left in there, it is even worse, $typesrdbref for example is brought into POSIX form by get_source_path_cygwin_safe() just so that wrapcmd can convert it back into DOS form. I see there is a lot of clean up possible after wrapcmd is gone, but I hope we can do this in CWS wrapcmd2 and I hope you are OK with the little bit of extra overhead until then.
Yes, I agree that this is okay as a temporary solution.
ok
seen on mws