Testing libexpat, error: 'NAN' was not declared in this scope

Jeffrey Walton noloader at gmail.com
Thu Feb 24 21:13:58 CET 2022


On Thu, Feb 24, 2022 at 3:08 PM İhsan Doğan <ihsan at opencsw.org> wrote:
>
> Am 23.02.2022 um 16:33 schrieb Jeffrey Walton via users <users at lists.opencsw.org>:
>
> I'm trying to compile libexpat 2.4.5 on SOlaris 11.4. It has that
> antique GCC 4.8.2. The build is failing:
>
> $ make check -k
> ...
> /bin/g++ -DHAVE_CONFIG_H -I. -I..   -DXML_ENABLE_VISIBILITY=1
> -I./../lib -I/opt/ssh/incl
> ude -DNDEBUG -Wall   -fexceptions -fno-strict-aliasing -g2 -O2 -m64
> -march=native -fPIC
> -pthread -MT runtestspp.o -MD -MP -MF .deps/runtestspp.Tpo -c -o
> runtestspp.o runtestspp
> .cpp
> In file included from runtestspp.cpp:36:0:
> runtests.c: In function 'void test_billion_laughs_attack_protection_api()':
> runtests.c:11712:32: error: 'NAN' was not declared in this scope
>          parserWithoutParent, NAN)
>                               ^
> runtests.c:11734:32: error: 'INFINITY' was not declared in this scope
>          parserWithoutParent, INFINITY)
>                               ^
> *** Error code 1
>
> I've included <sunmath.h> but the defines/symbols are still missing. I
> also included headers mentioned at
> https://docs.oracle.com/cd/E19957-01/806-3568/ncg_lib.html. I'm out of
> ideas.
>
> Does anyone know what to include to get those symbols?
>
>
> I’m not an expert here, but you use our build recipe to build it on Solaris 11:
> https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l4
>
> But also in our case, „make test“ fails, but the build seems to be fine.
>
> Besides we have an up to date libexpat package in our repository. 😉
> https://www.opencsw.org/packages/CSWlibexpat1/

Thanks Ihsan,

It looks like OpenCSW can bump libexpat to 2.4.5. Current OpenCSW
version is 2.4.4.

`make check` builds and executes Ok for me on i86pc amd64 using this
patch: https://github.com/noloader/Build-Scripts/blob/master/patch/expat.patch.

I'll check a Sparc machine later today through the Compile Farm.

Jeff


More information about the users mailing list