Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | certain SOURCE_ROOT patterns break the build on Windows/cygwin | ||||||
---|---|---|---|---|---|---|---|
Product: | Build Tools | Reporter: | hans_werner67 | ||||
Component: | GNU make | Assignee: | Frank Schönheit <frank.schoenheit> | ||||
Status: | CLOSED FIXED | QA Contact: | issues@tools <issues> | ||||
Severity: | Blocker | ||||||
Priority: | P1 (highest) | CC: | clippka, hans-joachim.lankenau, issues | ||||
Version: | DEV300m96 | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
Frank Schönheit
2011-01-07 13:07:39 UTC
cl: The problem is definitly in file solenv/gbuild/platform/windows.mk in define gb_Helper_abbreviate_dirs_native My source_root is e:/cws/cws_name and cygpath -m gives "E:/cws/cws_name" watch the capital E here. So everywhere $(1) contains "e:/cws/cws_name" it will not be replaced by R since gb_Helper_REPODIR_NATIVE is "E:/cws/cws_name" and subst works case sensitive. But subst will find $(REPODIR) which is /cws/cws_name in "e:/cws/cws_name" and replace it with $R so we get "e:$R/". Raising priority as this makes the build system unusable on windows systems. As a quick fix I tried to set my source_root to "E:/cws/cws_name" which does not fix the issue entirely. this # Helper class lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) gb_Helper_SRCDIR_NATIVE := $(call lc,$(shell cygpath -m $(SRCDIR))) gb_Helper_WORKDIR_NATIVE := $(call lc,$(shell cygpath -m $(WORKDIR))) gb_Helper_OUTDIR_NATIVE := $(call lc,$(shell cygpath -m $(OUTDIR))) gb_Helper_REPODIR_NATIVE := $(call lc,$(shell cygpath -m $(REPODIR))) define gb_Helper_abbreviate_dirs_native R=$(gb_Helper_REPODIR_NATIVE) && $(subst $(REPODIR),$$R,$(subst $(gb_Helper_REPODIR_NATIVE),$$R,$1 )) endef Kind of fixes it for me but I still get some -IE:/cws/cws_name/ooo/solenv/inc The root cause are the replacements at gb_Helper_abbreviate_dirs_native: > http://hg.services.openoffice.org/DEV300/file/6a873085545b/solenv/gbuild/platform/windows.mk#l202 and that with your setup have $(WORKDIR) being a substring of $(gb_Helper_WORKDIR_NATIVE) etc. Probable solution: Replace (from innermost/first): - gb_Helper_WORKDIR_NATIVE (cannot be a substring of WORKDIR) - gb_Helper_OUTDIR_NATIVE (cannot be a substring of OUTDIR) - gb_Helper_SRCDIR_NATIVE (cannot be a substring of SRCDIR) - WORKDIR - OUTDIR - SRCDIR - REPODIR on line 202 instead of the current substitutions. Thanks to ause, this works at least for tools lc = $(patsubst A:%,a:%,$(patsubst B:%,b:%,$(patsubst C:%,c:%,$(patsubst D:%,d:%,$(patsubst E:%,e:%,$(patsubst F:%,f:%,$(patsubst G:%,g:%,$(patsubst H:%,h:%,$(patsubst I:%,i:%,$(patsubst J:%,j:%,$(patsubst K:%,k:%,$(patsubst L:%,l:%,$(patsubst M:%,m:%,$(patsubst N:%,n:%,$(patsubst O:%,o:%,$(patsubst P:%,p:%,$(patsubst Q:%,q:%,$(patsubst R:%,r:%,$(patsubst S:%,s:%,$(patsubst T:%,t:%,$(patsubst U:%,u:%,$(patsubst V:%,v:%,$(patsubst W:%,w:%,$(patsubst X:%,x:%,$(patsubst Y:%,y:%,$(patsubst Z:%,z:%,$1)))))))))))))))))))))))))) gb_Helper_SRCDIR_NATIVE := $(call lc,$(shell cygpath -m $(SRCDIR))) gb_Helper_WORKDIR_NATIVE := $(call lc,$(shell cygpath -m $(WORKDIR))) gb_Helper_OUTDIR_NATIVE := $(call lc,$(shell cygpath -m $(OUTDIR))) gb_Helper_REPODIR_NATIVE := $(call lc,$(shell cygpath -m $(REPODIR))) $(info $(gb_Helper_REPODIR_NATIVE)) define gb_Helper_abbreviate_dirs_native R=$(gb_Helper_REPODIR_NATIVE) && $(subst $(REPODIR),$$R,$(subst $(gb_Helper_REPODIR_NATIVE),$$R,$1 )) endef please use: gb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) |$(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')) ... instead. this still works but has a much shorter command line, like the original version # Helper class lc = $(patsubst A:%,a:%,$(patsubst B:%,b:%,$(patsubst C:%,c:%,$(patsubst D:%,d:%,$(patsubst E:%,e:%,$(patsubst F:%,f:%,$(patsubst G:%,g:%,$(patsubst H:%,h:%,$(patsubst I:%,i:%,$(patsubst J:%,j:%,$(patsubst K:%,k:%,$(patsubst L:%,l:%,$(patsubst M:%,m:%,$(patsubst N:%,n:%,$(patsubst O:%,o:%,$(patsubst P:%,p:%,$(patsubst Q:%,q:%,$(patsubst R:%,r:%,$(patsubst S:%,s:%,$(patsubst T:%,t:%,$(patsubst U:%,u:%,$(patsubst V:%,v:%,$(patsubst W:%,w:%,$(patsubst X:%,x:%,$(patsubst Y:%,y:%,$(patsubst Z:%,z:%,$1)))))))))))))))))))))))))) gb_Helper_SRCDIR_NATIVE := $(call lc,$(shell cygpath -m $(SRCDIR))) gb_Helper_WORKDIR_NATIVE := $(call lc,$(shell cygpath -m $(WORKDIR))) gb_Helper_OUTDIR_NATIVE := $(call lc,$(shell cygpath -m $(OUTDIR))) gb_Helper_REPODIR_NATIVE := $(call lc,$(shell cygpath -m $(REPODIR))) define gb_Helper_abbreviate_dirs_native R=$(gb_Helper_REPODIR_NATIVE) && $(subst $(REPODIR)/,$$R/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,O=$(gb_Helper_OUTDIR_NATIVE) && W=$(gb_Helper_WORKDIR_NATIVE) && S=$(gb_Helper_SRCDIR_NATIVE))) && \ $(subst $(REPODIR)/,$$R/,$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,$(subst $(WORKDIR)/,$$W/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,$(subst $(gb_Helper_SRCDIR_NATIVE)/,$$S/,$(subst $(gb_Helper_OUTDIR_NATIVE)/,$$O/,$(subst $(gb_Helper_WORKDIR_NATIVE)/,$$W/,($1))))))))) endef thanks björn. So Frank & Ause, can you please review if the following works in your environment? # Helper class gb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') gb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') gb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') gb_Helper_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }') define gb_Helper_abbreviate_dirs_native R=$(gb_Helper_REPODIR_NATIVE) && $(subst $(REPODIR)/,$$R/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,O=$(gb_Helper_OUTDIR_NATIVE) && W=$(gb_Helper_WORKDIR_NATIVE) && S=$(gb_Helper_SRCDIR_NATIVE))) && \ $(subst $(REPODIR)/,$$R/,$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,$(subst $(WORKDIR)/,$$W/,$(subst $(gb_Helper_REPODIR_NATIVE)/,$$R/,$(subst $(gb_Helper_SRCDIR_NATIVE)/,$$S/,$(subst $(gb_Helper_OUTDIR_NATIVE)/,$$O/,$(subst $(gb_Helper_WORKDIR_NATIVE)/,$$W/,($1))))))))) endef fs->cl: If you attach this as patch file, so it doesn't have the line breaks, and I know where to apply it exactly, I am willing to give it a try. Created attachment 75590 [details]
My proposed fix for this issue
there is a typo at the end of the patch that ends up all test quick: probably should be $(1) instead of ($1) cl->hjs: please integrate after testing added in gnumake3 http://hg.services.openoffice.org/cws/gnumake3/rev/f495584800da @fs: please verify |