Apache OpenOffice (AOO) Bugzilla – Issue 32110
W32-4nt build broken for external projects
Last modified: 2006-03-14 21:03:16 UTC
As noone cared to file an issue, I do it. The problem was discovered in <http://tools.openoffice.org/servlets/ReadMsg?list=dev&msgNo=5069> and this is my response that pinpoints the problem: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I was just curious and played a it with my favorite toy: shells :) > OK, now to your problem: ;-) > > The problem IMHO is that in SOLARINC > > set SOLARINC=-I. -Id:\oo112src\solver\645\wntmsci9.pro\inc\stl > > -Id:\oo112src\solver\645\wntmsci9.pro\inc\external > > ... > the stl dir is set as the first include, because it should superceede > the system compiler includes in the general case. > For most external projects this breaks and tg_ext.mk fixes this > by deleting the stl part from the include path. OK, that was the theory, unfortunately I found that the cygwin dll does some "clever" substitution. Try this in a cmd.exe: C:\>\cygwin\bin\echo.exe "1 \ 2 \\ 3 \\\ 4 \\\\ 5 \\\\\ 6 \t" 1 \ 2 \ 3 \\ 4 \\ 5 \\\ 6 \t There seems to be a rule that each \\ is collapsed by the cygwin dll, funnily, when you ommit the quotes there is no transformation. Now back to the problem: In tg_ext.mk we have: echo $(SOLARINC) | sed 's/\\stl//g;s/[ \t]*-I/;/g' --------------------------^^. For W32-4nt this has to be \\\, as sed needs \\ as a representation for \. Ause this might be also a problem for your environment. An issue would be nice to track the problem. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sorry, no time for a patch right now.
Target
Oh, I forgot, this has also to be fixed for 680.
Here is the corrected/fixed line: INCLUDE!:=$(shell $(WRAPCMD) echo $(SOLARINC) | sed 's/\\\\stl//g;s/[ \\t]*- I/;/g' ) Hope this helps everybody, who tries to build OOo with 4NT. Christian
A short confirmation from cygwin ml: - - - - - - - - - Quotes are not treated specially in cmd. But they are used in Cygwin to allow applications called from cmd to get values which are otherwise difficult to transport. The rules are fairly simple and match your obvservations. A backslash is always a special character. So a real backslash has to be written as \\, the quoting character itself as either \' or \", whatever you used for it. That's it, basically. So your example '\\\' is treated as an unfinished quote with two characters, a backslash and a single quote. - - - - - - - - - IMHO the best solution is to invent yet another macro, propably unitools.mk, .IF "$USE_SHELL"=="4nt" # Calling a cygwin application from a non-cygwin shell requires # that backslashes are escaped by another backslash: # ES .. escape slash ES=\ .ELSE ES= .ENDIF And the line in tg_ext.mk then has to be: INCLUDE!:=$(shell $(WRAPCMD) echo $(SOLARINC) | sed 's/$(ES)\$(ES)\stl//g;s/[ $(ES)\t]*-I/;/g' )
Created attachment 16889 [details] Patch for solenv/inc
The patch I just attached is for cws_src680_ooo20040815. I should have opened a new issue for the 680er series. I'll also attach a patch for 113fix2.
Created attachment 16890 [details] Patch for solenv/inc for 1.1.x series.
Set target. vq->pjanik: It's untested in this form but this would be my prefered patch. Please have a look, and when you agree, please commit. Ause is on vacation and cannot double-check, but I think it should go in now. (Without it W32-4nt is broken anyway.)
Fixed in cws_srx645_ooo113fix2.
verified.
.