Error during installation libecwj2

I want to install libecwj2 library (AUR (en) - libecwj2). During building I get error like this:

../C/NCSUtil/../tinyxml/tinyxml.h:654:95: warning: 'nonnull' argument 'this' compared to NULL [-Wnonnull-compare]
  654 |         TiXmlElement*  ToElement()                      { return ( this && type == ELEMENT  ) ? (TiXmlElement*)  this : 0; } ///< Cast to a more defined type. Will return null not of the requested type.
      |                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -D_REENTRANT -DLIBECWJ2 -DLINUX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOSIX -I/home/macwojs/Downloads/libecwj2/src/libecwj2-3.3/Source/include -Wall -Wno-long-long -fno-common -fpic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -MT ../C/NCSUtil/NCSPrefs.lo -MD -MP -MF ../C/NCSUtil/.deps/NCSPrefs.Tpo -c ../C/NCSUtil/NCSPrefs.cpp -o ../C/NCSUtil/NCSPrefs.o >/dev/null 2>&1
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -D_REENTRANT -DLIBECWJ2 -DLINUX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOSIX -I/home/macwojs/Downloads/libecwj2/src/libecwj2-3.3/Source/include -Wall -Wno-long-long -fno-common -fpic -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -MT ../C/NCSUtil/NCSPrefsXML.lo -MD -MP -MF ../C/NCSUtil/.deps/NCSPrefsXML.Tpo -c ../C/NCSUtil/NCSPrefsXML.cpp -o ../C/NCSUtil/NCSPrefsXML.o >/dev/null 2>&1
make[3]: Leaving directory '/home/macwojs/Downloads/libecwj2/src/libecwj2-3.3/Source/NCSBuildGnu'
make[2]: *** [Makefile:1233: all] Error 2
make[2]: Leaving directory '/home/macwojs/Downloads/libecwj2/src/libecwj2-3.3/Source/NCSBuildGnu'
make[1]: *** [Makefile:366: all-recursive] Error 1
make[1]: Leaving directory '/home/macwojs/Downloads/libecwj2/src/libecwj2-3.3/Source'
make: *** [Makefile:576: all-recursive] Error 1
==> ERROR: A failure occurred in build().

What can I do with this?

You did notice, on the AUR page, that there is a comment since 2021 with a similar error, no reply to it and also that the package was flagged out of date since February 2022?

Probably you are safer to compile it from source, as described here ECW – GDAL