Issue 22030 - Check for the correct dmake version
Summary: Check for the correct dmake version
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: configure (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0.2
Assignee: hjs
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-02 17:44 UTC by quetschke
Modified: 2006-03-14 21:02 UTC (History)
6 users (show)

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


Attachments
Patch for config_office and dmake (2.05 KB, patch)
2003-11-02 18:21 UTC, quetschke
no flags Details | Diff
New patch (2.53 KB, patch)
2003-11-10 21:21 UTC, quetschke
no flags Details | Diff
Patch to check the version of the used dmake (2.39 KB, patch)
2005-12-17 23:51 UTC, quetschke
no flags Details | Diff
Patch to check cygwin vs. native build dmake (4.01 KB, patch)
2005-12-17 23:52 UTC, quetschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2003-11-02 17:44:20 UTC
As discussed here:
<http://porting.openoffice.org/servlets/ReadMsg?msgId=911436&listName=dev>

Slight changes for dmake/ and config_office/ are needed.
Comment 1 quetschke 2003-11-02 18:21:05 UTC
Created attachment 10889 [details]
Patch for config_office and dmake
Comment 2 quetschke 2003-11-02 18:24:11 UTC
Set target to 1.1.1

vq->ause: "del /FY objects" is 4nt syntax, is this OK for
          dmake/win95/microsft/vpp40/mk.bat?
Comment 3 foskey 2003-11-02 21:35:47 UTC
MIght be better if you issue a make distclean (or dist-clean) in the 
dmake directory.  This will purge everything to ensure a clean build 
(like config.h for example). 
 
All you have to do is run this and ignore errors or check for a 
Makefile and then run it. 
Comment 4 quetschke 2003-11-03 08:05:35 UTC
I thought about the make distclean, but when you build dmake
with winenv.bat (4nt) then you don't get a Makefile created
and you can't do a distclean on the unixy targets.

Propably we should do both,
rm objects
make disclean .
Comment 5 hjs 2003-11-03 13:45:22 UTC
"del /FY" is ok for me as for "dos-like" builds we require a 4nt shell
anyway.
Comment 6 quetschke 2003-11-07 14:59:27 UTC
OK, first of all I withdraw the suggestion of different output
trees for *-tcsh and *-4nt. This is not useful as the output
trees are independent of the used build system (tcsh vs. 4nt) with
one tiny exception: dmake and therefore also:
   $SOLARENV/$OUTPATH/bin/dmake.exe

This is managable without two trees, I change the summary to the new
situation.

I checked for files in dmake that are created during building dmake
depending on the used system:

Build with 4NT (dmake/win95/microsft/vpp40/mk.bat):
  dmake/dmake.exe
  dmake/objects/*
  dmake/startup/config.mk

Build unixy style with configure:
  dmake/.deps
  dmake/Makefile
  dmake/config.h
  dmake/config.log
  dmake/config.status
  dmake/dag.o
  dmake/dmake.exe
  dmake/dmake.o
  dmake/dmakeroot.h
  dmake/dmdump.o
  dmake/dmstring.o
  dmake/expand.o
  dmake/function.o
  dmake/getinp.o
  dmake/hash.o
  dmake/imacs.o
  dmake/infer.o
  dmake/macparse.o
  dmake/make.o
  dmake/parse.o
  dmake/path.o
  dmake/percent.o
  dmake/quit.o
  dmake/rulparse.o
  dmake/stamp-h1
  dmake/stat.o
  dmake/state.o
  dmake/sysintf.o
  dmake/msdos/.deps
  dmake/msdos/Makefile
  dmake/startup/Makefile
  dmake/startup/unix/Makefile
  dmake/startup/unix/cygwin/Makefile
  dmake/startup/unix/linux/Makefile
  dmake/startup/unix/macosx/Makefile
  dmake/startup/unix/solaris/Makefile
  dmake/startup/unix/sysvr4/Makefile
  dmake/startup/winnt/Makefile
  dmake/startup/winnt/mingw/Makefile
  dmake/startup/winnt/msvc6/Makefile
  dmake/unix/.deps
  dmake/unix/Makefile
  dmake/unix/arlib.o
  dmake/unix/dcache.o
  dmake/unix/dirbrk.o
  dmake/unix/libunix.a
  dmake/unix/rmprq.o
  dmake/unix/ruletab.o
  dmake/unix/runargv.o
  dmake/unix/tempnam.o
  dmake/win95/.deps
  dmake/win95/Makefile
  dmake/win95/microsft/.deps
  dmake/win95/microsft/Makefile

This shows that the configure type build doesn't interfere with the
4nt build very much, ignore startup/config.mk as we use $DMAKEROOT,
we only have to remove the two *.h to build dmake-4nt successfully.

The configure build needs a make distclean (only when dmake/Makefile
exists)

I'll prepare new patches, ignore the old one.
Comment 7 quetschke 2003-11-10 21:21:56 UTC
Created attachment 11129 [details]
New patch
Comment 8 quetschke 2003-11-10 21:24:29 UTC
I'll commit config_dmake2.diff shortly.
Comment 9 quetschke 2003-11-10 21:31:09 UTC
done
Comment 10 utomo99 2003-11-11 11:03:24 UTC
utomo> vq:
Done is same as fixed ? (because you never change to started yet)
if yes, you forget to change the status. please change it. 
Thanks
Comment 11 quetschke 2003-11-11 12:39:53 UTC
Done means committed that patch, this is only a part of the complete
solution. I'll do the rest soon.
Comment 12 quetschke 2003-11-12 09:58:46 UTC
Hmmm, to check if the correct dmake is used, one can use this
commandline for bash:

if test "`dmake.exe -V | $AWK '/cygwin/ { print \"yes\" }'`" != "yes"
; then echo "Error! You're using the wrong dmake.exe"; fi

It assumes that a dmake is there, no test for missing file, but this
is IMHO ok. My problem is: Where to put it?

And I have another problem, what to do in the 4NT case?

vq->ause: Suggestions?
Comment 13 hjs 2003-11-12 17:15:53 UTC
maybe "setsoenv" could push these lines to the generated script to
setup the environment. IIRC, this script is called after bootstrap, so
"dmake.exe" should exist. 
Comment 14 Martin Hollmichel 2003-12-09 11:03:59 UTC
setting to fixed since already committed.
Comment 15 quetschke 2003-12-09 13:56:27 UTC
vq->mh: I reopen the issue because it wasn't finished yet. I still have to put
        the check for the dmake somewhere. My build systems are running again
        since a few hours here but I will need some time to work on this.

Setting target to 1.1.2
Comment 16 utomo99 2004-05-06 06:04:16 UTC
utomo > Vq:
Just reminder, OOo 1.1.2 almost ready. do you have new patch ? Thanks
------- Additional comments from vq Tue Dec 9 06:56:27 -0700 2003 -------

vq->mh: I reopen the issue because it wasn't finished yet. I still have to put
        the check for the dmake somewhere. My build systems are running again
        since a few hours here but I will need some time to work on this.

Setting target to 1.1.2
Comment 17 quetschke 2004-08-18 22:39:49 UTC
Retargeted. IMHO a very low priority.
Comment 18 Martin Hollmichel 2004-11-03 09:29:10 UTC
retarget to 1.1.5
Comment 19 quetschke 2005-12-16 20:13:43 UTC
issue 58709 shows that a better check for the used dmake version is needed. Not
only for W32-tcsh vs. W32-4nt but generally if dmake is new enough.
Comment 20 quetschke 2005-12-17 23:51:14 UTC
Created attachment 32508 [details]
Patch to check the version of the used dmake
Comment 21 quetschke 2005-12-17 23:52:34 UTC
Created attachment 32509 [details]
Patch to check cygwin vs. native build dmake
Comment 22 quetschke 2005-12-17 23:59:52 UTC
Committed to CWS vq25.
Comment 23 quetschke 2005-12-18 00:00:28 UTC
@ause: Please verify.
Comment 24 hjs 2005-12-19 17:07:06 UTC
this check will instantly stop all builds in hamburg env. (still stuck with 4.1).

.IF $(MAKEVERSION:s/-cvs//:s/.//:s/410/41/)>=43

IRC, 4.3 isn't as critical as 4.3-cvs regarding oooold makefiles, but until
environment restructuring (versioned tools set) took place, it would be a huge
effort to verify this.

also the previous check 

.IF 400<=200
[do fail]

indicates that dmake versions not being able to do comparison would treat the
new test as TRUE - didn't check yet
Comment 25 quetschke 2005-12-19 19:02:12 UTC
> this check will instantly stop all builds in hamburg env. (still stuck
> with 4.1).
Erm, 1.9.x and newer ships with 4.3!

.IF $(MAKEVERSION:s/-cvs//:s/.//:s/410/41/)>=43

> IRC, 4.3 isn't as critical as 4.3-cvs regarding oooold makefiles, but until
> environment restructuring (versioned tools set) took place, it would be a
> huge effort to verify this.
Hmm, I thought I kept it compatible. Only warnings, no errors, so dmake43 should
be a drop in replacement

> also the previous check 
>
> .IF 400<=200
> [do fail]
> 
> indicates that dmake versions not being able to do comparison would treat the
> new test as TRUE - didn't check yet
Yep, my fault. I had it right the first time (not attached here) when I used
 <= 42, but I didn't like that. ;) Is easily fixed.
Comment 26 quetschke 2005-12-19 20:27:20 UTC
Fixed the last point in vq25.

I see your problem with only one dmake for all development trees, but as
issue 58709 shows there is already perfectly valid code in our sourcebase
that leads to errors when a *buggy* dmake 4.10 version is used. We need
somethink like this patch to check for dmake versions.

OOo currently "delivers" (when bootstrap is used) the newly build dmake to
$SOLARENV/$OUTPATH/bin/ or when dmake is found in the path lets configure
check if it is version 4.3 or newer. I understand that you cannot deliver
to solenv, but something similar sounds easy to implement for the Hamburg
environment if something (maybe even build.pl) copies one of the needed dmake
versions to some place in solver that is available only in the search path of
the architecture that is currently build.

We're only talking about two dmake versions so far, the old 4.10 or the current
4.3 from OOo 2.0. If this scheme is established one might even start to use
dmake 4.4 from dmake43p01.

I understand this takes time so I will propably back out the version checking
part of the patch to get the rest of the CWS integrated but we should think
about getting this fixed.
Comment 27 hjs 2005-12-20 12:07:33 UTC
rt came up with the idea of supplying the required version in a variable set by
configure/setsolar. this would allow to do the checking based on the used
environment.

this sounds like a workaround for the 2.x codeline until we solve our problem
with the shared (stoneage) dmake here.
Comment 28 quetschke 2005-12-20 16:38:46 UTC
> rt came up with the idea of supplying the required version in a variable set by
> configure/setsolar. this would allow to do the checking based on the used
> environment.
So you want to set something like
  DMAKEMINVER=40 (setsolar) or =42 (*env.set)
Ugly ;)

> this sounds like a workaround for the 2.x codeline until we solve our problem
> with the shared (stoneage) dmake here.

Why not just define
  FORCEDMAKEEXECUTABLE=/<something you know better than>/dmake43
in setsolar and place something like this in setsolar.pl (or build.pl):

if( ! -x $ENV{SOLARVER}/$ENV{SOLARUPD}/$ENV{INPATH}/bin/dmake ) {
 `cp $FORCEDMAKEEXECUTABLE/dmake $ENV{SOLARVER}/$ENV{SOLARUPD}/$ENV{INPATH}/bin/`

Pseudocode, you know what I mean.
Comment 29 quetschke 2005-12-26 17:14:49 UTC
I reverted the code that checks for the correct dmake version. I will open a
new issue for this which can be integrated once the handling of the dmake
version is a little more flexible in Hamburg ;)

The rest should be OK as it's config_office only.

@ause: please verify.
Comment 30 hjs 2006-01-05 17:30:23 UTC
fine with me
Comment 31 quetschke 2006-02-23 21:48:10 UTC
closed