Ticket #2168 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

MSG compile problem

Reported by: rroman Assigned to: mloskot
Priority: normal Milestone: 1.5.3
Component: ConfigBuild Version: 1.5.0
Severity: normal Keywords: msg
Cc: retsios, lichun

Description (Last modified by warmerdam)

When I try to compile gdal-1.5.0 on fedora core 5 with msg format support the following problem occur.

make[2]: Entering directory
`/home/rroman/gdal-1.5.0/frmts/msg'
g++ -Wall -fPIC -O2   -I../../port -I../../gcore -I../../alg -I../../ogr
-I../../ogr/ogrsf_frmts -I PublicDecompWT/DISE -I
PublicDecompWT/COMP/WT/Inc -I PublicDecompWT/COMP/Inc -I. -c
-o ../o/msgdataset.o msgdataset.cpp
msgdataset.h:51: error: expected `)' before ‘*’ token
msgdataset.h:56: error: ‘MSGDataset’ has not been declared
PublicDecompWT/COMP/WT/Inc/CompressWT.h: In constructor
‘COMP::CWTParams::CWTParams(unsigned int, unsigned int,
COMP::CWTParams::EWTPredictionMode, COMP::CWTParams::EWTBlockMode,
unsigned int, unsigned int)’:
PublicDecompWT/COMP/WT/Inc/CompressWT.h:140: warning: enumeration value
‘e_FullWidth’ not handled in switch
msgdataset.cpp: In static member function ‘static GDALDataset*
MSGDataset::Open(GDALOpenInfo*)’:
msgdataset.cpp:286: error: no matching function for call to
‘MSGRasterBand::MSGRasterBand(MSGDataset*&, int)’
msgdataset.h:47: note: candidates are: MSGRasterBand::MSGRasterBand()
msgdataset.h:47: note:
MSGRasterBand::MSGRasterBand(const MSGRasterBand&)
msgdataset.cpp: At global scope:
msgdataset.cpp:298: error: prototype for
‘MSGRasterBand::MSGRasterBand(MSGDataset*, int)’ does not match any in
class ‘MSGRasterBand’
msgdataset.h:47: error: candidates are:
MSGRasterBand::MSGRasterBand(const MSGRasterBand&)
msgdataset.h:47: error:                 MSGRasterBand::MSGRasterBand()
msgdataset.cpp: In member function ‘virtual CPLErr
MSGRasterBand::IReadBlock(int, int, void*)’:
msgdataset.cpp:609: error: no matching function for call to
‘MSGRasterBand::rRadiometricCorrection(short unsigned int&, int&, int,
int, MSGDataset*&)’
msgdataset.h:56: note: candidates are: double
MSGRasterBand::rRadiometricCorrection(unsigned int, int, int, int, int*)
msgdataset.cpp:634: error: no matching function for call to
‘MSGRasterBand::rRadiometricCorrection(short unsigned int&, int&, int,
int, MSGDataset*&)’
msgdataset.h:56: note: candidates are: double
MSGRasterBand::rRadiometricCorrection(unsigned int, int, int, int, int*)
msgdataset.cpp: At global scope:
msgdataset.cpp:653: error: prototype for ‘double
MSGRasterBand::rRadiometricCorrection(unsigned int, int, int, int,
MSGDataset*)’ does not match any in class ‘MSGRasterBand’
msgdataset.h:56: error: candidate is: double
MSGRasterBand::rRadiometricCorrection(unsigned int, int, int, int, int*)
make[2]: *** [../o/msgdataset.o] Error 1
make[2]: Leaving directory
`/home/rroman/gdal-1.5.0/frmts/msg'
make[1]: *** [msg-install-obj] Error 2
make[1]: Leaving directory `/home/rroman/gdal-1.5.0/frmts'
make: *** [frmts-target] Error 2

On the internet I found that it was previously discussed but did not find the solution. Any help would be apprececiated. Thanks Raymond

Attachments

eumetsat-wt203-gcc412-mloskot.patch (3.3 kB) - added by mloskot on 07/28/08 16:00:26.
Patch for EUMETSAT Wavelet Transform Software (version 2.03) that enables compilation with GCC 4.1.x . Original version of WT software does not compiler out of the box.
eumetsat-wt203-gcc431-mloskot.patch (9.6 kB) - added by mloskot on 07/28/08 16:19:55.
Patch for EUMETSAT Wavelet Transform Software (version 2.03) that enables compilation with GCC 4.3.x . Original version of WT software does not compile with this compiler.

Change History

03/04/08 15:55:57 changed by warmerdam

  • description changed.
  • cc set to retsios.
  • component changed from default to ConfigBuild.
  • priority changed from high to normal.
  • owner changed from warmerdam to mloskot.
  • version changed from unspecified to 1.5.0.
  • milestone set to 1.5.2.
  • keywords set to msg.

Bas,

Any thoughts? Mateusz, could you try and fix this up based on what Bas suggests unless Bas takes care of it?

03/05/08 05:29:52 changed by retsios

The "previous discussion" mentioned was "[Bug 889] Patch to get msg format to build under Linux".

The solution was a so-called forward declaration of MSGDataset (simply adding "class MSGDataset;" at line 44).

Please try this. Unfortunately I do not have a linux machine to try it, so feel free to change anything else required to make it compile, and to "commit" the result.

Note that for the MSG driver you need to 1) enable the driver in GDAL, 2) download the (free) wavelet transform library from eumetsat (see http://www.gdal.org/frmt_msg.html, but it could be that eumetsat has moved the file).

07/24/08 17:03:57 changed by mloskot

Frank,

It seems that I'm not able to reproduce this problem because I'm unable to build and test the MSG driver mentioned. The problem is that EUMETSAT has changed their licensing policy and now the Wavelet Transform Software is licensed software available after registration and formal acceptance by EUMETSAT (see Apply for online licence link). I've submitted the form more than 3 weeks ago and got no response so far.

I'm not sure what to do now.

07/24/08 17:05:25 changed by mloskot

I forgot to add that I've updated the frmt_msg.html with fresh links and notes on the Wavelet Transform Software.

07/24/08 17:06:16 changed by mloskot

Docs update (r14854)

07/24/08 22:09:32 changed by warmerdam

  • cc changed from retsios to retsios, lichun.

Lichun / Bas,

Any thoughts on this?

07/28/08 11:14:25 changed by mloskot

  • status changed from new to assigned.

Folks,

Just for records, as Bas suggested, eumetsat.int is not Firefox friendly but requires IE. So, Apply for online licence form works only with IE. Anyone who will be submitting it should check that she gets 3 steps: 1) fill form, 2) confirm data input is valid and click ACCEPT button 3) see page with final confirmation the form has been submitted. I've reported that problem to EUMETSAT, hopefully they will fix it.

07/28/08 14:40:45 changed by mloskot

Added MSG driver support to configure.in (r15062). EUMETSAT Wavelet Trasform software is only detected on request, option --with-msg specified.

07/28/08 15:39:19 changed by mloskot

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

Fix for compilation problems and a bunch of improvements submitted to trunk (r15064).

MSG docs updated (r15065)

Also, I've started MSG Wiki page dedicated to building and using MSG driver. Feel free to document your experiences.

Successfully tested building MSG driver with GCC 4.1.2 on Linux Ubuntu 7.04

07/28/08 16:00:26 changed by mloskot

  • attachment eumetsat-wt203-gcc412-mloskot.patch added.

Patch for EUMETSAT Wavelet Transform Software (version 2.03) that enables compilation with GCC 4.1.x . Original version of WT software does not compiler out of the box.

07/28/08 16:19:55 changed by mloskot

  • attachment eumetsat-wt203-gcc431-mloskot.patch added.

Patch for EUMETSAT Wavelet Transform Software (version 2.03) that enables compilation with GCC 4.3.x . Original version of WT software does not compile with this compiler.

07/28/08 16:30:22 changed by mloskot

Updated MSG driver for GCC 4.3.1 (r15066) This submission is related to attached patch for the EUMETSAT WT Software (eumetsat-wt203-gcc431-mloskot.patch). So, anyone who needs MSG driver build with GCC 4.3.1 need to do this:

  • apply the patch to EUMETSAT WT Software (frmts/msg/PublicDecompWT)
  • use GDAL from SVN trunk, at least revision 15066
  • call ./configure with --with-msg option
  • call make