Bug 2037 - [MS4W] ECW build problems
: [MS4W] ECW build problems
Status: NEW
: MS4W
Base
: 3.x
: PC All
: P1 blocker
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-04-27 17:18 by
Modified: 2010-08-02 09:24 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-04-27 17:18:02
- the ECW SDK 3.3 is not supported on Visual Studio 2008
- there is a workaround, to use an older Windows SDK:
http://forums.ermapper.com/viewtopic.php?t=2826
  - I am building with the latest Windows SDK (v6.1)
  - Tamas builds with an older Windows SDK
    - I discovered the SDK difference when Tamas sent me his entire ECW folder
and it would not build
- another possible workaround is to set this WIN32_WINNT compiler option in the
visual studio project:
  - Project/Properties/Configuration Properties/C/C++/Command line/
  - add the following to the "Additional Options"
      /D "_WIN32_WINNT=0x0500"

- problem is that mapserv.exe crashes with either change ("Premature end of
script headers") when using mapserv CGI through the browser (mapserv -v at the
commandline is fine)
- the ECW SDK 4.0 is supposed to fully support Visual Studio 2008, but it is
not yet released
- I don't see any other option except to remove ECW support from MS4W until the
next ECW SDK is released (rebuilding each dependent library with the old SDK
now is not an option, this late in the release)

If anyone else has ideas/solutions please let me know.

-jeff
------- Comment #1 From 2009-04-27 18:29:41 -------
Not much help here.  But there is no harm  of doing an RC1 with out the ECW and
make a decision after that.
------- Comment #2 From 2009-04-28 20:45:18 -------
Have you tried compiling ECW as a plugin? I'm using the driver this way and
seems to be working with MSVC2008 (at least the ECW GDAL autotests are all
passed)


(In reply to comment #0)
> - the ECW SDK 3.3 is not supported on Visual Studio 2008
> - there is a workaround, to use an older Windows SDK:
> http://forums.ermapper.com/viewtopic.php?t=2826
>   - I am building with the latest Windows SDK (v6.1)
>   - Tamas builds with an older Windows SDK
>     - I discovered the SDK difference when Tamas sent me his entire ECW folder
> and it would not build
> - another possible workaround is to set this WIN32_WINNT compiler option in the
> visual studio project:
>   - Project/Properties/Configuration Properties/C/C++/Command line/
>   - add the following to the "Additional Options"
>       /D "_WIN32_WINNT=0x0500"
> 
> - problem is that mapserv.exe crashes with either change ("Premature end of
> script headers") when using mapserv CGI through the browser (mapserv -v at the
> commandline is fine)
> - the ECW SDK 4.0 is supposed to fully support Visual Studio 2008, but it is
> not yet released
> - I don't see any other option except to remove ECW support from MS4W until the
> next ECW SDK is released (rebuilding each dependent library with the old SDK
> now is not an option, this late in the release)
> 
> If anyone else has ideas/solutions please let me know.
> 
> -jeff
------- Comment #3 From 2009-04-29 12:35:32 -------
I haven't tried ECW as a plugin, but will do so for beta2.  Note that the
problem only occurs when calling the mapserv.exe CGI through Apache.

Tamas: does your automated tests check for the CGI's use in Apache?
------- Comment #4 From 2009-04-29 13:19:45 -------
(In reply to comment #3)
> I haven't tried ECW as a plugin, but will do so for beta2.  Note that the
> problem only occurs when calling the mapserv.exe CGI through Apache.
> 
> Tamas: does your automated tests check for the CGI's use in Apache?

No, the ECW tests (in gdal autotest) use the GDAL python bindings as far as I
know. The mapserver tests use the MapScript bindings or invoke the commandline
applications (incl. mapserv.exe) externally.
------- Comment #5 From 2009-05-02 13:58:48 -------
- same problem exists with ECW as a plugin:
  - 'gdalinfo --formats' shows ECW driver correctly
  - 'mapserv -v' at commandline functions properly
  - however when calling mapserv through Apache a 'Premature end of script
headers' error occurs
------- Comment #6 From 2009-05-03 18:29:24 -------
I had to patch libecw to prevent from the access violations with the x64
builds, it might be unrelated to this problem though.

But here is the required change anyway (NCSJPCResolution.cpp 1781):

//UINT32 n2n = n * 2 - 2;
INT32 n2n = n * 2 - 2;
------- Comment #7 From 2010-01-28 18:07:26 -------
After a good discussion on IRC in #gdal, Paul Ramsey pointed me to a thread on
ECW license issues on the GeoServer list
(http://n2.nabble.com/ECW-license-changed-td3460720.html)

Paul summed it up as "you can use the ecw library if your software *and* the
things you use that software *for* are entirely "noncommercial"

This to me (and the fact that the *old* SDK does not support MSVC 2008) signals
the end of ECW support in MS4W.
------- Comment #8 From 2010-01-28 18:35:49 -------
Ok, so there is a new ECW SDK version (Oct 2010), and it compiles with MSVC
2008.

But, I don't think we should distribute it with MS4W, because of the license
issues.

Thoughts?
------- Comment #9 From 2010-01-28 18:37:04 -------
correction: new SDK (with new license) was released Oct 2009.
------- Comment #10 From 2010-01-28 19:29:00 -------
(In reply to comment #8)
> Ok, so there is a new ECW SDK version (Oct 2010), and it compiles with MSVC
> 2008.
> 
> But, I don't think we should distribute it with MS4W, because of the license
> issues.
> 
> Thoughts?

Jeff,

Did you mean the new SDK won't crash with Apache? I confirm the old version of
the SDK did compile with MSVC2008.

We could probably patch the older one with the fixes related to this issue.
------- Comment #11 From 2010-01-28 19:32:50 -------
I totally forgot that the issue was with Apache, and have not tested that. 
More testing is needed.

In any case, I don't feel that we can distribute GDAL with ECW support in MS4W,
due to the ECW license change.
------- Comment #12 From 2010-08-02 09:24:42 -------
updates:

- recent patches are available for libecwj2-3.3 (see
http://trac.osgeo.org/gdal/wiki/ECW)
- however Erdas no longer distributes the SDK and requires approval for license
use (description
athttp://lists.osgeo.org/pipermail/osgeo4w-dev/2010-July/000994.html)
- this ticket will be left open, but ECW will not be added to MS4W 3.0