Issue 83430 - W32/.NET2003: m236 build fails in canvas
Summary: W32/.NET2003: m236 build fails in canvas
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: current
Hardware: PC Windows, all
: P1 (highest) Trivial (vote)
Target Milestone: OOo 2.4
Assignee: quetschke
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-08 01:35 UTC by quetschke
Modified: 2007-12-12 09:21 UTC (History)
7 users (show)

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


Attachments
Use DirectX 9 with .NET2003 (736 bytes, patch)
2007-11-08 01:36 UTC, quetschke
no flags Details | Diff
Always use DirectX 10 (694 bytes, patch)
2007-11-08 01:36 UTC, quetschke
no flags Details | Diff
DX5 patch for OOo environment (2.69 KB, patch)
2007-11-09 13:01 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 2007-11-08 01:35:33 UTC
My m236 build fails in canvas with:

LINK : fatal error LNK1181: cannot open input file 'd3dx.lib'
dmake:  Error code 2, while making '../../wntmsci10.pro/bin/directxcanvas.uno.dll'
---* tg_merge.mk *---
linking ../../wntmsci10.pro/bin/directxcanvas.uno.dll.manifest ...

ERROR: Error 65280 occurred while making /cygdrive/d/w1/tin_ws/canvas/source/directx

The reason is that canvas/source/directx/makefile.mk
uses d3dx.lib for .NET2003 and d3dx10.lib for .NET2005 and newer.

My .NET2003 installation does not include d3dx.lib and the DirectX 9.0 SDK
(still mentioned in the build instructions ;) ) only provides d3dx9.lib.

This seems to be rather an SDK than a .NET2003 vs. .NET2005 issue.

Each of the following two patches solves the build problem for canvas for me.

I am currently building a full m236 build with version 2 (DirectX 10 only).

P.S.: I am in favor of dropping .NET 2003 support, but currently that is the
recommended W32 compiler for OOo, so unless we make it official to drop .NET2003
OOo should build with it.
Comment 1 quetschke 2007-11-08 01:36:23 UTC
Created attachment 49510 [details]
Use DirectX 9 with .NET2003
Comment 2 quetschke 2007-11-08 01:36:55 UTC
Created attachment 49511 [details]
Always use DirectX 10
Comment 3 quetschke 2007-11-08 01:51:59 UTC
Well, the DirectX 10 SDK solution leads to this problem:

d:\w1\tin_ws\avmedia\source\win\framegrabber.cxx(44) : fatal error C1083: Cannot
open include file: 'Amvideo.h': No such file or directory
dmake:  Error code 2, while making '../../wntmsci10.pro/slo/framegrabber.obj'
---* tg_merge.mk *---

ERROR: Error 65280 occurred while making /cygdrive/d/w1/tin_ws/avmedia/source/win

That file existed in the old "Microsoft DirectX 9.0 SDK (April 2005)" version,
but is missing in "Microsoft DirectX SDK (August 2007)" (that is the last DX SDK
that supports .NET2003). The file moved to the Windows SDK, but we cannot use
that because of issue 77980.

@pjanik: It build for you, which versions of the PSDK/DirectX SDK are you using?
Comment 4 pavel 2007-11-08 05:13:57 UTC
In the "Add or Remove Programs", I see Microsoft DirectX 9.0 SDK Update (Summer 2004).

d3dx.lib is located in

/cygdrive/c/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/d3dx.lib
Comment 5 quetschke 2007-11-08 18:45:58 UTC
> d3dx.lib is located in
> /cygdrive/c/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/d3dx.lib

Yes, but that is not in the ILIB path. Looking at your winenv.set I don't
see that directory anywhere in any variable. Can you check if you have a
d3dx.lib anywhere else in one of the directories listed in your ILIB variable.

I'm slightly puzzled why that works for you.
Comment 6 pavel 2007-11-08 19:01:54 UTC
Looks like

/cygdrive/e/Microsoft DirectX 9.0 SDK/Lib/d3dx.lib

was used and:

pavel@drogo:~/BuildDir/ooo_SRC680_m236_src> echo $ILIB
.;f:\home\pavel\BuildDir\ooo_SRC680_m236_src\solver\680\wntmsci10.pro\lib;c:\J2SDK1~1.2_0
\lib;c:\PROGRA~1\MICROS~2\lib;c:\PROGRA~1\MICROS~1.NET\SDK\v1.1\lib;c:\PROGRA~1
\MICROS~1.NET\Vc7\lib;e:\MICROS~1.0SD\lib
pavel@drogo:~/BuildDir/ooo_SRC680_m236_src> 
Comment 7 quetschke 2007-11-08 20:07:42 UTC
Ahh, that explains it. My slightly newer "Microsoft DirectX 9.0 SDK (April
2005)" does not have that library anymore, only d3dx9.lib. M$ seems to have
dropped that library in later versions.

@thb: Do you need DX10? If not, I would propose to use DirectX 9 for both
.NET2003 and .NET2003 and open an issue to switch to DirectX 10 and the Windows
(Vista) SDK (issue 77980) in one change.

I volunteer to do the configure changes and the testing, but it would be nice
if Oliver could look at the remaining issues with the Windows SDK in the 2.4
timeframe.  (Is it possible to use the .NET2003/2005 compiler and a current
Windows SDK to avoid the ADO/winres.h problems?)
Comment 8 thb 2007-11-08 23:08:26 UTC
Okay, to shed some light on this: the d3dx10.lib is clearly a typo, should be
d3dx9.lib (like for SHL2STDLIBS below). 

BUT: it's currently NOT an option to axe the SHL1STDLIBS += d3dx.lib line,
because that'll kill support for Win9x and true DirectX5. We need to figure out
a distinctive element in the environment (obviously, the compiler rev didn't
suffice) to keep this working somehow for Hamburg buildenv.

Apart from that: I'd rather stay out of this tangled mess. ;-)
Comment 9 quetschke 2007-11-09 01:52:03 UTC
Thorsten, can you elaborate on the Win9x / true DirectX5 statement. Does that
mean that an OOo build with .NET2005 and newer is not working on Win9x anymore?
(because d3dx9.lib, well currently d3dx10.lib is used).

How does this fit with Martins wish to axe .NET2003 and thereby the use of
d3dx.lib.

Keeping it buildable within the Hamburg environment is one thing, but we also
need a consistent set of prerequisites for the OOo environment. (And relying
on DirectX SDKs from 2004 does not seem a feasible option.
Comment 10 oliver.bolte 2007-11-09 07:57:35 UTC
Switching to .NET2005 / Vista SDK is not an option for the 2.4 codeline (i77980).
Comment 11 thb 2007-11-09 09:48:07 UTC
@vq: yep, it seems that the 2005er compiler + SDK is unable to produce
DX5-compatible binaries. From what I've heard, we might drop the Win9x support
for 3.0, which would then quite nicely fit in with switching the compiler.

But for today, we need a stop-gap solution that maintains compatibility...
...obo, any distinction I could query in the makefile?
Comment 12 oliver.bolte 2007-11-09 10:06:26 UTC
Maybe this is an option?

RCS file: /cvs/gsl/canvas/source/directx/makefile.mk,v
retrieving revision 1.2
diff -r1.2 makefile.mk
119a120
> .IF "$(USE_DIRECTX5)"!=""
120a122,125
> .ELSE # "$(USE_DIRECTX5)
> SHL1STDLIBS += d3dx9.lib     # directx 9
> SHL1STDLIBS += dxguid.lib    # directx 9
> .ENDIF # "$(USE_DIRECTX5)

And I'll set USE_DIRECTX5=YES in Hamburg environment.
Comment 13 oliver.bolte 2007-11-09 10:42:55 UTC
rev 1.3 commited as MWS fix for SRC680_m237
HTH,
Oliver
Comment 14 oliver.bolte 2007-11-09 10:55:33 UTC
setting to fixed.
Comment 15 quetschke 2007-11-09 13:01:37 UTC
Created attachment 49554 [details]
DX5 patch for OOo environment
Comment 16 quetschke 2007-11-09 13:07:11 UTC
Thanks for the patch!

What I don't like is the fact that now only Hamburg builds are able to run
on W9x. The previous patch should fix that and use the d3dx lib that come
with the .NET2003 compiler. The patch is still untested, I'm going to start
a testbuild once the current build is done.

@Pavel: Can you please test it also (maybe you need to rename your "other"
d3dx.lib for now.)
Comment 17 tml 2007-11-09 17:43:21 UTC
> What I don't like is the fact that now only Hamburg builds are 
> able to run on W9x.

But it is the directx canvas which we are talking about here, isn't it? And that
is a completely optional extension, isn't it? If somebody otherwise builds his
own OOo but because of a lack of a sufficiently ancient DirextX SDK can't
produce a directx canvas extension that would run on Win9x, she can download the
prebuilt directx extension and use that.

Or am I missing something?
Comment 18 quetschke 2007-11-09 18:47:00 UTC
Not all languages are build by Sun, Pavel for example provides a lot more
community builds for other languages.

I would like to avoid to hear "... my official build works on Win9x, but the
version of XYZ does not." It is only about consistency, if Hamburg wants to
be compatible with Win9x, we (community builds) need to provide that too.

Changeing owner to mh.
Comment 19 tml 2007-11-09 19:18:10 UTC
So would it be easiest if the directx canvas simply wasn't part of the OOo
sources, but a separate download? (But still LGPL licensed, etc.) After all, it
was only recently added (as far as I know), so it can't be that many people are
already very accustomed to it being built together with OOo. Then one couldn't
claim that problems in building the directx canvas is blocking one's build of OOo.
Comment 20 quetschke 2007-11-09 22:50:28 UTC
That seems too much effort to me. With my patch everyone that builds with
.NET2003 on windows will create something that runs on Win9x, and is exactly
the same as if build within Hamburg. It's a minimal patch (still untested, but
I am confident that it (or a fixed patch) will solve the problem.
Comment 21 quetschke 2007-11-10 13:25:58 UTC
My patch works for an m236 + canvas/source/directx/makefile.mk rev 1.3 .NET2003
build. d3dx.lib was used.

@pjanik: Pavel, can you double check that the patch is safe? I'd like to get it
in the next possible master.
Comment 22 pavel 2007-11-10 13:51:57 UTC
Volker, what exactly should I test?
Comment 23 quetschke 2007-11-10 15:29:49 UTC
That with my patch (iz83430_dx5.diff) and either
 m236 + canvas/source/directx/makefile.mk rev 1.3
or
 m237
the build finds a d3dx.lib from
 Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib/ .
You might have to "remove" your d3dx.lib from your
 Microsoft DirectX 9.0 SDK/Lib/
directory as M$ removed it from there in more recent DirectX SDKs. Thanks!
Comment 24 pavel 2007-11-11 07:29:13 UTC
vq: I did so. Works ok.
Comment 25 quetschke 2007-11-11 17:08:28 UTC
Thank you Pavel.

@rt,obo: Masterfix please ;)
Comment 26 oliver.bolte 2007-11-12 08:38:29 UTC
Hi,

I've commited Volkers patch for SRC680_m237.
@vq: verify please.

Oliver
Comment 27 oliver.bolte 2007-11-12 08:39:27 UTC
.
Comment 28 quetschke 2007-11-19 04:28:47 UTC
Seen in m237.
Comment 29 kami911 2007-12-09 21:59:26 UTC
May I found this problem in 2.3.1? Because my winxp build stopped at same place...
Comment 30 rt 2007-12-12 09:21:19 UTC
closing