Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#2410 closed defect (fixed)

gdal does not compile with MrSID DSDK version 7

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

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 (1)

ticket-2410-mrsidstream.patch (1.2 KB ) - added by dron 16 years ago.
Patch to support MrSID SDK v. 7.x

Download all attachments as: .zip

Change History (33)

comment:1 by dron, 16 years ago

Owner: changed from warmerdam to dron
Status: newassigned

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

by dron, 16 years ago

Patch to support MrSID SDK v. 7.x

comment:2 by hobu, 16 years ago

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 );

comment:3 by hobu, 16 years ago

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

comment:4 by hobu, 16 years ago

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.

comment:5 by dron, 16 years ago

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

comment:6 by Even Rouault, 16 years ago

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.

comment:7 by dron, 16 years ago

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.

comment:8 by dron, 16 years ago

Cc: warmerdam added
Resolution: fixed
Status: assignedclosed

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?

comment:9 by kyngchaos, 16 years ago

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()’

comment:10 by kyngchaos, 16 years ago

Oh, and same error in trunk.

in reply to:  10 ; comment:11 by dron, 16 years ago

What SDK version? 7.0?

comment:12 by warmerdam, 16 years ago

configure regenerated and committed in 1.5 and trunk.

in reply to:  11 comment:13 by kyngchaos, 16 years ago

Replying to dron:

What SDK version? 7.0?

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

comment:14 by dron, 16 years ago

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

comment:15 by kyngchaos, 16 years ago

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.

comment:16 by kyngchaos, 16 years ago

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.

comment:17 by kyngchaos, 16 years ago

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.

comment:18 by kyngchaos, 16 years ago

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.

comment:19 by dron, 16 years ago

Resolution: fixed
Status: closedreopened

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...

comment:20 by dron, 16 years ago

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

comment:21 by kyngchaos, 16 years ago

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.

comment:22 by warmerdam, 16 years ago

Cc: tamas added

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

comment:23 by tamas, 16 years ago

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.

comment:24 by dron, 16 years ago

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

comment:25 by warmerdam, 16 years ago

Andrey,

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

comment:26 by dron, 16 years ago

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.

comment:27 by springmeyer, 15 years ago

Just a note that I have successfully re-compiled gdal from SVN HEAD (r.15590) using the Geo_DSDK-7.0.0.2167 on Mac OS 10.5

comment:28 by woodbri, 15 years ago

Cc: woodbri added

comment:29 by warmerdam, 15 years ago

Resolution: fixed
Status: reopenedclosed

I'm not seeing any problems configuring and building 1.6 branch and trunk with MrSID 7 SDK on linux. Is there an outstanding issue? I also didn't have any problems building the MrSID plugin on windows though for OSGeo4W though I may have done some fiddling with that.

I'm going to tentatively close this ticket ... please reopen if anyone can confirm an outstanding problem. (and document the problem)

in reply to:  29 comment:30 by ziziphus, 15 years ago

Do I understand correctly that 1.6 builds with MrSID 7 SDK for JP2 support. I have had no luck with GDAL and JP2 images on MapServer. (1) Is there a prebuild GDAL/MrSID/JP2 package available? (2) Or, do you a have detailed, step-by-step procedure for building and installing a GDAL package with MrSID JP2 support or EWC JP2 support (or any kind of JP2 support)? JP2 is now the primary aeril image format which I encounter. Thanks much.

comment:31 by ziziphus, 15 years ago

Opps,

Systems=Ubuntu Server 9.04 AMD64; MapServer 5.4.0

comment:32 by Even Rouault, 15 years ago

Ziziphus,

those kind of questions belong more to the mailing list.

Note: See TracTickets for help on using tickets.