Ticket #2410 (reopened defect)

Opened 4 months ago

Last modified 2 months ago

gdal does not compile with MrSID DSDK version 7

Reported by: mfyahya Assigned to: dron
Priority: normal Milestone:
Component: ConfigBuild Version: 1.5.1
Severity: major Keywords: mrsid
Cc: warmerdam, tamas

Description

./configure --with-mrsid=/path/to/Geo_DSDK-7.0.0.2167

fails with /path/to/Geo_DSDK-7.0.0.2167/include/support.. not found

The configure script works after replacing 'include/support' with 'include' in configure.in, but make fails with

mrsiddataset.cpp:416: error: invalid use of undefined type 'struct LizardTech::LTIImageReader'

Attachments

ticket-2410-mrsidstream.patch (1.2 kB) - added by dron on 06/05/08 14:38:23.
Patch to support MrSID SDK v. 7.x

Change History

06/05/08 14:37:20 changed by dron

  • status changed from new to assigned.
  • owner changed from warmerdam to dron.

There is a patch from Alexander Bondar to solve this problem. Also we need to modify configure script. I am taking over this bug.

06/05/08 14:38:23 changed by dron

  • attachment ticket-2410-mrsidstream.patch added.

Patch to support MrSID SDK v. 7.x

06/06/08 13:23:42 changed by hobu

I applied the patch in an attempt to use their 64bit SDK on Linux but I'm getting a segfault. I suspect this is LizardTech?'s fault in some way...

Starting program: /usr/src/64bit/gdal.trunk/apps/.libs/gdalinfo /qpub1/maps/nassau/aerials/5243A-11.sid
[Thread debugging using libthread_db enabled]
[New Thread 46912534170624 (LWP 21887)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912534170624 (LWP 21887)]
0x00002aaaaaec8522 in L1BDataset::DetectFormat (pabyHeader=0x0)
    at l1bdataset.cpp:1384
1384	    if ( *(pabyHeader + L1B_NOAA15_HEADER_SIZE + 25) == '.'
Current language:  auto; currently c++
(gdb) bt
#0  0x00002aaaaaec8522 in L1BDataset::DetectFormat (pabyHeader=0x0)
    at l1bdataset.cpp:1384
#1  0x00002aaaaaecaa45 in L1BDataset::Open (poOpenInfo=0x7ffff49953c0)
    at l1bdataset.cpp:1439
#2  0x00002aaaab017380 in GDALOpen (
    pszFilename=0x1b6246d0 "/qpub1/maps/nassau/aerials/5243A-11.sid", 
    eAccess=GA_ReadOnly) at gdaldataset.cpp:1782
#3  0x000000000040246e in main (argc=2, argv=0x1b624650) at gdalinfo.c:129
(gdb) f 2
#2  0x00002aaaab017380 in GDALOpen (
    pszFilename=0x1b6246d0 "/qpub1/maps/nassau/aerials/5243A-11.sid", 
    eAccess=GA_ReadOnly) at gdaldataset.cpp:1782
1782	        poDS = poDriver->pfnOpen( &oOpenInfo );
(gdb) l
1777	    for( iDriver = 0; iDriver < poDM->GetDriverCount(); iDriver++ )
1778	    {
1779	        GDALDriver      *poDriver = poDM->GetDriver( iDriver );
1780	        GDALDataset     *poDS;
1781	
1782	        poDS = poDriver->pfnOpen( &oOpenInfo );
1783	        if( poDS != NULL )
1784	        {
1785	            if( strlen(poDS->GetDescription()) == 0 )
1786	                poDS->SetDescription( pszFilename );

06/06/08 13:25:47 changed by hobu

Oops, after further investigation (actually reading the stack trace :) :) ), I think the problem is the L1B driver is attempting to open the file.

06/06/08 14:51:53 changed by hobu

Even fixed it in r14638 and I can report that the patch works well now on 64bit Linux with the 7.0 DSDK and trunk.

06/07/08 10:35:30 changed by dron

I have fixed both mrsiddataset.cpp and configure.in (r14649). Please test these changes. If everything works right, I will apply the patch to 1.5 branch.

Best regards,
Andrey

06/07/08 10:44:59 changed by rouault

I have regenerated my configure, reconfigured and compiled. And it still works fine with Geo_DSDK-6.0.7.1407, so backward compability with < 7 works.

06/09/08 04:14:15 changed by dron

Yes, it should work with 6.x DSDK, but I didn't implemented configure logic for ESDK, because I haven't the one for testing. So there will be a need in bit of work for ESDK in the future.

06/09/08 04:23:34 changed by dron

  • status changed from assigned to closed.
  • cc set to warmerdam.
  • resolution set to fixed.

I put the 7.x support in 1.5 branch. See r14667.

Frank,

Could you regenerate configure scripts both in trunk and 1.5 branches?

06/09/08 10:06:51 changed by kyngchaos

Hmm, with the 1.5 branch change, I get:

mrsiddataset.cpp: In static member function ‘static GDALDataset* MrSIDDataset::Open(GDALOpenInfo*)’:
mrsiddataset.cpp:1268: error: cannot convert ‘LTIDLLReader<LizardTech::J2KImageReader>*’ to ‘LizardTech::MrSIDImageReader*’ in assignment
mrsiddataset.cpp:1273: error: no matching function for call to ‘LizardTech::MrSIDImageReader::initialize()’

(follow-up: ↓ 11 ) 06/09/08 10:11:50 changed by kyngchaos

Oh, and same error in trunk.

(in reply to: ↑ 10 ; follow-up: ↓ 13 ) 06/09/08 10:14:38 changed by dron

What SDK version? 7.0?

06/09/08 10:24:09 changed by warmerdam

configure regenerated and committed in 1.5 and trunk.

(in reply to: ↑ 11 ) 06/09/08 10:36:15 changed by kyngchaos

Replying to dron:

What SDK version? 7.0?

Yes, 7.0..0.2167, OSX versions (both 32bit and 64bit).

06/09/08 10:45:55 changed by dron

Ok, I fixed 1.5 (r14671), but I don't understand whats wrong with trunk. Are you sure it is a trunk?

06/09/08 11:20:11 changed by kyngchaos

Still get the error, and in trunk also. But I see what's wrong - I enabled the MRSID_J2K support. You don't have a conditional on that for MrSID 7.

06/09/08 20:48:25 changed by kyngchaos

Well, by disabling MRSID_J2K I got it to compile. It would be nice to have that working, but it's not critical for me.

Seems to work, but I'm getting a little error in a 64bit build. In the autotests, #4 fails:

  TEST: mrsid_4 ... 
old =  (0.0, 255.0, 102.684, 51.613999999999997)
new =  [0.0, 255.0, 103.11236497314, 52.476991490286998]
fail
    Approximate statistics differs.

I'm getting a lot more projection comparison errors in general in a 64bit build than 32bits, so I wonder if that's another matter not specific to MrSID.

PS. I'm on OSX 10.5.

06/09/08 20:52:11 changed by kyngchaos

I hate to keep dragging out this closed bug - I'm not getting more projection errors in 64bits. I'm getting more in both 32bits and 64bits that I haven't seen before. The MrSID statistics error is only in 64bits.

06/09/08 20:56:33 changed by kyngchaos

I hope I'm not getting too annoying now (a little distracted with cooking) - yes, the MrSID statistics error is in both 32bits and 64bits. So it's something new either with GDAL 1.5.2 (along with those other new projection errors in the autotests) or MrSID 7 support.

06/10/08 08:00:55 changed by dron

  • status changed from closed to reopened.
  • resolution deleted.

I am reopening the ticket, because of JPEG2K problem. And it hasn't an easy solution: those guys changed the inheritance tree of their classes and now I should study the new API to implement complete support for the new DSDK... Grrr...

06/10/08 09:22:26 changed by dron

r14681 should add configure support for MrSID JP2K in 1.5 branch.

06/10/08 11:36:42 changed by kyngchaos

I saw your note on the ml about the lack of JP2 support in MrSID 7 (your note on the new configure option above isn't clear on that).

Not a big deal - MrSID JP2 is really kakadu based, so maybe don't worry about it and focus on the Kakadu driver, where you get JP2 decode and encode, regardless of whether you have the MrSID ESDK or just the DSDK.

07/09/08 17:56:21 changed by warmerdam

  • cc changed from warmerdam to warmerdam, tamas.

Tamas reports problems building with GeoExpress? 7 on windows ... investigating.

07/10/08 07:32:37 changed by tamas

I confirm I have the same problem on windows with MRSID_J2K enabled. And I see we intend to store different object types using the same object reference.

07/28/08 10:29:43 changed by dron

With r15059 I have added support for DSDK 7.0 in trunk. I am thinking on porting the fix to 1.5 branch.

07/28/08 10:34:50 changed by warmerdam

Andrey,

As long as the older DSDKs continue to work, I think porting it into 1.5 would be appropriate.

07/28/08 10:38:39 changed by dron

I will go forward.

Little update to my message from 07/28/08 10:29:43: I meant the JPEG2000 decoder support in DSDK 7. MrSID decoder is working already.