Problem with php_mapscript and ecw

James Browne James.Browne at LIU.EDU
Fri Aug 12 10:56:55 EDT 2005


Hello All,

    I "applied" the patch to the 3.2 beta by hand editing the thread.c file and NCSUtil.so built just fine, but I still had problems because libNCSEcw.so is not building due to a header file problem.
in LIBNCSEcw.so
undefined reference to 'NCSMutexTryBegin in function 'NCSecwGlobalTryLock'
in NCSJP2FileView.o
undefined reference to 'CNCSEvent::~CNCSEvent [in-charge()' in function
(no function named)

This is after double checking that I followed all of the other hand edits mentioned on the ERmapper forum thread.
I will triple check all my steps over the weekend.

HOWEVER:
As an experiment, I tried the new "patched" 3.2 NCSUtil.so as a drop in replacement for the 3.1 version. This worked better, although now I get a "GDALRasterIO() failed when zooming in close, particularly in one image.

Also: I can ask friends if anyone is willing to help with and auto-config for the ecwsdk, if that is still and issue.

        Jim

-----Original Message-----
From: UMN MapServer Users List on behalf of Bart van den Eijnden
Sent: Fri 8/12/2005 5:12 AM
To: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] Problem with php_mapscript and ecw
 
Hi Bill, list,

we are running into this same issue unfortunately.

I am trying to get the ECW3.2 beta source code SDK compiled using Microsoft Visual Studio 6 but there are some problems compiling ... I did include the platform SDK.

And ofcourse I cannot apply your patch to 3.1 since that is only a binary distribution.

What's the best thing to try? Which part of the ECW 3.2 beta SDK do I need to compile exactly for GDAL?

Did anybody succeed in doing this all on Windows?

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> Bill Binko <bill at BINKO.NET> 08/10/05 06:56pm >>>
On Wed, 10 Aug 2005, James P. Browne wrote:

> I am running a Debian Linux/Gnu server and compiled the new ECW driver into
> GDAL and compiled Mapserver against that.
> 
> When I write PHP4 code using php_mapscript I have no trouble creating an
> interface where the user can turn shape files on and off, but when either of
> ECW layers are turned on, they only work intermittently. The correct output
> is created in the image directory, but there is usually no php/html output
> after the line
>   dl('php_mapscript.so');
> If there is no output before that, it looks like nothing happened when using
> firefox or mozila, although IE returns a "page cannot be
> displayed...technical difficulty..." error. The images were created on the
> server, it seems that php_mapscript locks up.
> 
> If you switch back to shape files, the page works normally again.
> 
> I can't see what I could be doing wrong. Any ideas?
> 
> 
I am pretty sure I know the problem here:

libecw 3.1 (all versions) have a multi-threading bug that sometimes leaves 
a thread hanging and keeps the process from completing.  I posted a patch 
to the ermapper forums, and Tom has taken it and incorporated it into 
their latest 3.2 betas (I believe).

There are other problems with ECW at the moment, but the good news is that 
several very smart people are "all over it" at the moment.  Frank and Tom 
are both working to get a 3.2 out (with that and other fixes) and Frank 
has updated the GDAL interface to ECW to match it in GDAL CVS.

Now: to solve your problem...

1) If this can wait a few weeks: just wait for libecw3.2 to be released 
and for Frank to sign off on the changes to GDAL.  Your problems will 
probably go away.

2) If this is critical, you have two options:
	a) If you feel comfortable doing it, apply the patch attached to 
this discussion to the libecw3.1 sources and rebuild completely ( make 
clean all)

http://forums.ermapper.com/viewtopic.php?t=486&highlight= 

	b) If you're really realy stuck, find someone who can build you a 
patched library.  I can do it on Mandrake 10.1, but you should be able to 
find someone to help on most platforms if you ask nicely. 

Bill


 



More information about the mapserver-users mailing list