Issue 104829 - cannot build with non-empty WITH_LANG in incomplete source tree
Summary: cannot build with non-empty WITH_LANG in incomplete source tree
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: DEV300m57
Hardware: All All
: P1 (highest) Trivial (vote)
Target Milestone: ---
Assignee: Frank Schönheit
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-05 22:48 UTC by Frank Schönheit
Modified: 2013-08-07 15:35 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2009-09-05 22:48:59 UTC
$ setsolar dev300 -ver m57 -jdk15 wntmsci12
$ copyprj -nx vcl .
$ cd vcl/source/src
$ export WITH_LANG="en-US de"
$ dmake ../../common/misc/vcl/source/src/localize.sdf
mkout -- version: 1.8
mkout -- version: 1.8
------------------------------ 
Making: ../../wntmsci12/misc/svsrc.dpr
dmake  -f makefile.mk  NO_HIDS=true make_srs_deps=true
../../wntmsci12/misc/svsrc.svsrc.dprr
------------------------------
Making: ../../wntmsci12/misc/svsrc.svsrc.dprr
: &&    PATH=${PATH}:/cygdrive/o/DEV300/wntmsci12/bin.m57
o:/DEV300/wntmsci12/bin.m57/rscdep  -CHARSET_DONTKNOW -s  -I. -I  -I../inc
-I../../inc -I../../wntmsci12/inc -DWNT -DNT351 -DMSC -DM1500 -DSOLAR_JAVA
-DBUILD_SPECIAL=TRUE -DFULL_DESK -DDBG_UTIL -DOSL_DEBUG_LEVEL=1 
-DUPDVER="300m57(Build:9422)" -fp=../../common/srs/svsrc.srs
-fo=../../wntmsci12/misc/svsrc.svsrc.dprr -p=svsrc images.src menu.src
stdtext.src helptext.src units.src btntext.src
cat ../../wntmsci12/misc/svsrc.*.dprr >> ../../wntmsci12/misc/svsrc.dpr
dmake:  Error: -- Don't know how to make
`../../common/misc/vcl/source/src/localize.sdf'

This very same problem appears in other places as well, for instance in
officecfg/registry/data/org/openoffice. It disappears as soon as you unset
WITH_LANG.
Comment 1 Frank Schönheit 2009-09-05 22:50:12 UTC
forgot to mention: That affects wntmsci12, at least unxlngi6 is not affected,
don't know about other platforms.
Comment 2 ivo.hinkelmann 2009-09-07 12:07:33 UTC
hi frank,

$ setsolar dev300 -ver m57 -jdk15 wntmsci12
$ copyprj -nx vcl .
$ cd vcl/source/src
$ export WITH_LANG="en-US de"
$ dmake

works fine here .... 

what exactly do you want do with this line:
dmake ../../common/misc/vcl/source/src/localize.sdf

???

Comment 3 Frank Schönheit 2009-09-07 12:24:02 UTC
@ihi: here it doesn't ... The dmake line just selectively builds the
localize.sdf file, omitting to build all the other stuff in the same directory.
I used this as shortcut, I can also reproduce the problem with a simple "dmake",
but in this case it takes ages to build all the other files before.
Comment 4 ivo.hinkelmann 2009-09-07 12:38:20 UTC
there are just 6 files in that directory, we are really talking about the same
directory?

$ pwd
/cygdrive/c/TEMP/bla/vcl/source/src

$ ls -l
total 40K
-rw-rw-r-- 1 so-uprel Updater 2.5K Sep 15  2008 btntext.src
-rw-rw-r-- 1 so-uprel Updater 2.8K Sep 15  2008 helptext.src
-rw-rw-r-- 1 so-uprel Updater  16K Dec  1  2008 images.src
-rw-rw-r-- 1 so-uprel Updater 1.7K Sep 15  2008 makefile.mk
-rw-rw-r-- 1 so-uprel Updater 2.7K Sep 15  2008 menu.src
-rw-rw-r-- 1 so-uprel Updater 3.2K Sep 15  2008 stdtext.src
-rw-rw-r-- 1 so-uprel Updater 1.8K Sep 15  2008 units.src

can you please verify by removeing the local common and wntmsci12 output trees
and just do a simple dmake in that directory? 

a dmake ../../common/misc/vcl/source/src/localize.sdf also breaks here but this
is simply not what you want
Comment 5 ivo.hinkelmann 2009-09-07 14:57:15 UTC
I can not reproduce on master so I set prio to P2
Comment 6 hjs 2009-09-07 15:46:47 UTC
.
Comment 7 Frank Schönheit 2009-09-07 16:49:00 UTC
Damn, I would have sworn I could reproduce this on the MWS, I explicitly tried a
MWS environment before submitting. However, at the moment I can reproduce in a
CWS of mine only. Strange enough, this CWS didn't see any changes in solenv, or
any (relevant) changes in vcl or officecfg. Nonetheless, I can reproduce the
problem reliably. /me is absolutely clueless.

Okay, grabbing the issue, this is something I need to investigate further. Sorry
for the noise. (I would have *sworn* ...)
Comment 8 Frank Schönheit 2009-09-07 22:55:07 UTC
fs->ihi: In solinc/inc/target.mk, there's the following line:
  @@$(IFNOTEXIST) $(LOCALIZESDF) $(THEN) unzip -o -d
  $(COMMONMISC)$/$(PRJNAME)_$(TARGET) $(SOLARCOMMONSDFDIR)$/$(PRJNAME).zip 
(without the line break)

Which, resolves to
  if ! test -f ../../common/misc/vcl/source/src/localize.sdf ] ; then unzip -o
  -d ../../common/misc/vcl_svsrc g:/dev/o_dba32g/DEV300/common/sdf.m57/vcl.zip

Note that this is not a valid bash statement, there's a "; fi" missing at the
end. If I add an "$(FI)" to the very end of the rule in target.mk, then
everything works like a charm.

Why this doesn't happen on the MWS (or, more precise: not always ... meanwhile I
think I perhaps really saw it in an MWS env) is completely beyond me. According
to target.mk:1391-1393, it means that either LOCALIZESDF is empty, or
LOCALIZATION_FOUND is /not/ empty. The last sounds quite impossible, given that
LOCALIZATION_FOUND seemingly is *nowhere* set in solenv/inc/*, so I would assume
it is always empty.

Nonetheless, IMO the fix belongs to target.mk. IFNOTEXIST seems to be newly
introduced, and given that unitools.mk defines it to some "if ...", it indeed
should be accompanied by a $(FI), /me thinks.
Comment 9 Frank Schönheit 2009-09-07 23:04:27 UTC
Okay, I just set up another m57 env, and added the following to
vcl/source/src/makefile.mk:

test:
  @echo WITH_LANG: $(WITH_LANG)
  @echo LOCALIZATION_FOUND: $(LOCALIZATION_FOUND)
  @echo LOCALIZESDF: $(LOCALIZESDF)

"dmake test" then gives:

WITH_LANG: en-US de
LOCALIZATION_FOUND: YES
LOCALIZESDF: o:/DEV300/src.m57/l10n/common/misc/sdf/vcl/source/src/localize.sdf
 
Okay, off to grok now gives me
http://svn.services.openoffice.org/opengrok/xref/DEV300_m57/solenv/inc/settings.mk#657

Argh!!!!!!!11elf The problem is that I do not have the l10n module(s) in my
source tree, respectively the CWS. So, besides fixing target.mk, I'd vote for
also fixing settings.mk to not only look for l10n, but also for l10n.link!
Comment 10 ivo.hinkelmann 2009-09-08 11:36:08 UTC
ups, yes this missing $(FI) looks fatal indeed. I would propose to fix it on the
master in the next build.

regarding the l10n module: maybe I should underline again on the dev lists that
if you want build localizations you either need to build the l10n module or your
solver have to contain the prebuilded and ziped localization. We should not
invent such nasty tricks regarding the access into l10n.link dir imho

OBO: Please fix this on the master in the current round
In solenv/inc/inc/target.mk, there's the following line:
  @@$(IFNOTEXIST) $(LOCALIZESDF) $(THEN) unzip -o -d
  $(COMMONMISC)$/$(PRJNAME)_$(TARGET) $(SOLARCOMMONSDFDIR)$/$(PRJNAME).zip 

to

  @@$(IFNOTEXIST) $(LOCALIZESDF) $(THEN) unzip -o -d
  $(COMMONMISC)$/$(PRJNAME)_$(TARGET) $(SOLARCOMMONSDFDIR)$/$(PRJNAME).zip $(FI)
Comment 11 oliver.bolte 2009-09-09 13:09:46 UTC
fixed. Commited @275988 for DEV300_m58
Comment 12 oliver.bolte 2009-09-09 13:11:23 UTC
verify, please.
Comment 13 Frank Schönheit 2009-09-11 08:56:31 UTC
verified the patch is present in m58, admittedly I didn't bother to create a CWS
based on m58 and build it on Windows ...
Comment 14 Frank Schönheit 2009-09-11 08:56:53 UTC
closing - thanks