[gdal-dev] Build libecwj2 3.3 with GCC 4.9

Federico federicojurio at suremptec.com.ar
Thu Aug 13 12:23:14 PDT 2015


Hello list,

I'm trying to libecwj2 3.3 for GDAL 1.11.0
Under Ubuntu 14.04 i386 i have not compilation problems after applying  this
<https://trac.osgeo.org/gdal/ticket/4868>   patch. But i have troubles when
i try to compile on Windows XP x86 and Windows 7 x64 using GCC 4.9
I've read several tickets mentioned in the ECW article from the GDAL Wiki
but i cannot solve my compilation error.

Someone have to deal with this problem?

$ make
Making all in Source
make[1]: Entering directory `/c/stable-environment/src/libecwj2-3.3/Source'
Making all in NCSBuildGnu
make[2]: Entering directory
`/c/stable-environment/src/libecwj2-3.3/Source/NCSBuildGnu'
make  all-am
make[3]: Entering directory
`/c/stable-environment/src/libecwj2-3.3/Source/NCSBuildGnu'
if g++ -DHAVE_CONFIG_H -I. -I. -I.  -D_GNU_SOURCE -D_REENTRANT -DLIBECWJ2
-DPOSIX -I/c/stable-environment/src/libecwj2-3.3/Source/include
-I/c/stable-environment/src/libecwj2-3.3/Source/C/NCSEcw/lcms/
include -Wall -Wno-long-long -fno-common   -g -O2 -MT
______lib_libecwj2_a-NCSJP2.o -MD -MP -MF
".deps/______lib_libecwj2_a-NCSJP2.Tpo" \
          -c -o ______lib_libecwj2_a-NCSJP2.o `test -f
'../C/NCSEcw/NCSJP2/NCSJP2.cpp' || echo './'`../C/NCSEcw/NCSJP2/NCSJP2.cpp;
\
        then mv -f ".deps/______lib_libecwj2_a-NCSJP2.Tpo"
".deps/______lib_libecwj2_a-NCSJP2.Po"; \
        else rm -f ".deps/______lib_libecwj2_a-NCSJP2.Tpo"; exit 1; \
        fi
In file included from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSPrefs.h:130:0,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSUtil.h:86,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/ECW.h:137,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSEcw.h:73,
                 from ../C/NCSEcw/NCSJP2/NCSJP2.cpp:24:
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSString.h:6:0:
warning: ignoring #pragma warning  [-Wunknown-pragmas]
  #pragma warning(disable:4786)
 ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSString.h:7:0:
warning: ignoring #pragma warning  [-Wunknown-pragmas]
  #pragma warning(disable:4251)
 ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSString.h:8:0:
warning: ignoring #pragma warning  [-Wunknown-pragmas]
  #pragma warning(disable:4275)
 ^
In file included from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSEcw.h:53:0,
                 from ../C/NCSEcw/NCSJP2/NCSJP2.cpp:24:
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSDefs.h: In function
'int wcsnicmp(const wchar_t*, const wchar_t*, int)':
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSDefs.h:407:80:
error: conflicting declaration of C function 'int wcsnicmp(const wchar_t*,
const wchar_t*, int)'
 static NCS_INLINE int wcsnicmp(const wchar_t *s1, const wchar_t *s2, int
nChars)
                                                                               
^
In file included from
C:/mingw-w64/i686-4.9.0-release-posix-sjlj-rt_v3-rev2/mingw32/i686-w64-mingw32/include/guiddef.h:148:0,
                 from
C:/mingw-w64/i686-4.9.0-release-posix-sjlj-rt_v3-rev2/mingw32/i686-w64-mingw32/include/winnt.h:602,
                 from
C:/mingw-w64/i686-4.9.0-release-posix-sjlj-rt_v3-rev2/mingw32/i686-w64-mingw32/include/minwindef.h:146,
                 from
C:/mingw-w64/i686-4.9.0-release-posix-sjlj-rt_v3-rev2/mingw32/i686-w64-mingw32/include/windef.h:8,
                 from
C:/mingw-w64/i686-4.9.0-release-posix-sjlj-rt_v3-rev2/mingw32/i686-w64-mingw32/include/windows.h:69,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSTypes.h:78,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSDefs.h:38,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSEcw.h:53,
                 from ../C/NCSEcw/NCSJP2/NCSJP2.cpp:24:
C:/mingw-w64/i686-4.9.0-release-posix-sjlj-rt_v3-rev2/mingw32/i686-w64-mingw32/include/string.h:162:15:
note: previous declaration 'int wcsnicmp(const wchar_t*, const wchar_t*,
size_t)'
   int __cdecl wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t
_MaxCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^
In file included from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSString.h:14:0,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSPrefs.h:130,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSUtil.h:86,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/ECW.h:137,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSEcw.h:73,
                 from ../C/NCSEcw/NCSJP2/NCSJP2.cpp:24:
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h: In function
'INT32 NCSfloatToInt32_RM(IEEE4)':
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h:89:3: error:
expected '(' before '{' token
   {                                       \
   ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h:128:2: note:
in expansion of macro 'FLT_TO_INT32'
  FLT_TO_INT32(i32, f);
  ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h:90:10:
error: expected '(' before 'fld'
    __asm fld dword ptr [b]             \
          ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h:128:2: note:
in expansion of macro 'FLT_TO_INT32'
  FLT_TO_INT32(i32, f);
  ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h:90:10:
error: 'fld' was not declared in this scope
    __asm fld dword ptr [b]             \
          ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h:128:2: note:
in expansion of macro 'FLT_TO_INT32'
  FLT_TO_INT32(i32, f);
  ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h: In function
'INT32 NCSfloatToInt32_0_1(IEEE4)':
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h:140:24:
warning: dereferencing type-punned pointer will break strict-aliasing rules
[-Wstrict-aliasing]
     return((*(INT32 *)&y) & 0x7FFFFF); // last 23 bits
                        ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h: In function
'INT32 NCSfloatToInt32(IEEE4)':
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h:146:28:
warning: dereferencing type-punned pointer will break strict-aliasing rules
[-Wstrict-aliasing]
  INT32 FltInt = *(INT32 *)&x;
                            ^
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h: In function
'INT32 NCSdoubleToInt32(IEEE8)':
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSMisc.h:169:28:
warning: dereferencing type-punned pointer will break strict-aliasing rules
[-Wstrict-aliasing]
  INT64 DblInt = *(INT64 *)&x;
                            ^
In file included from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSPrefs.h:131:0,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSUtil.h:86,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/ECW.h:137,
                 from
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSEcw.h:73,
                 from ../C/NCSEcw/NCSJP2/NCSJP2.cpp:24:
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSError.h: At global
scope:
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSError.h:53:63:
warning: deprecated conversion from string constant to 'char*'
[-Wwrite-strings]
  CNCSError(const NCSError eError = NCS_SUCCESS, char *pFile = ""
/*__FILE__*/, int nLine = 0 /*__LINE__*/, CNCSLog::NCSLogLevel eLevel =
CNCSLog::LOG_LEVEL1, const char *pText = (char*)NULL);
                                                               ^
In file included from ../C/NCSEcw/NCSJP2/NCSJP2.cpp:26:0:
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSJPCFileIOStream.h:
In member function 'virtual void CNCSJPCFileIOStream::WriteFlush()':
c:/stable-environment/src/libecwj2-3.3/Source/include/NCSJPCFileIOStream.h:180:24:
warning: deprecated conversion from string constant to 'char*'
[-Wwrite-strings]
      *(CNCSError*)this = eError;
                        ^
make[3]: *** [______lib_libecwj2_a-NCSJP2.o] Error 1
make[3]: Leaving directory
`/c/stable-environment/src/libecwj2-3.3/Source/NCSBuildGnu'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/c/stable-environment/src/libecwj2-3.3/Source/NCSBuildGnu'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/stable-environment/src/libecwj2-3.3/Source'
make: *** [all-recursive] Error 1

Thanks in advance!



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Build-libecwj2-3-3-with-GCC-4-9-tp5219716.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list