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

İhsan Doğan ihsan at opencsw.org
Thu Feb 24 21:08:14 CET 2022


Hi,

> 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 <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/ <https://www.opencsw.org/packages/CSWlibexpat1/>




Regards

Ihsan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.opencsw.org/pipermail/users/attachments/20220224/afab6aba/attachment-0001.html>


More information about the users mailing list