[Fuego] Functional.expat test fails during build stage on 64-bit x86 Ubuntu target

Bird, Timothy Tim.Bird at sony.com
Fri Oct 6 15:11:47 UTC 2017


> -----Original Message-----
> From Dhinakar Kalyanasundaram on Sent: Friday, October 06, 2017 5:11 AM


> I get the following error during 'fuego build phase', while executing
> Functional.expat test on x86 Ubuntu target.

This was fixed in my 'next' branch with the following commit:
https://bitbucket.org/tbird20d/fuego-core/commits/9f9ef8ff6d56a9ccb4b858eb59640f1354feaf1a

Please do a 'git pull' on the appropriate fuego-core repository on your host, to pull
the latest commits for this branch.

Thanks for the report!
 -- Tim

commentary inline below...

> ##### doing fuego phase: build ########
> Unpacking expat-2.0.0.tar.gz
> patching file xmltest.sh
> /fuego-rw/buildzone/TRAV-Ethernet-x86.default.Functional.expat-x86_64
> checking build system type... x86_64-gnu-linux-gnu
...
> checking for an ANSI C99-conforming __func__... yes
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating expat_config.h
> /bin/sh ./libtool --silent --mode=compile gcc -I./lib -I. -g -O2 -Wall -Wmissing-
> prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H   -o
> lib/xmlparse.lo -c lib/xmlparse.c
...
> g++ -I. -I./lib -g -O2   -c -o tests/runtestspp.o tests/runtestspp.cpp
> In file included from tests/runtests.c:18:0,
>                  from tests/runtestspp.cpp:6:
> tests/runtests.c: In function 'void basic_setup()':
> tests/minicheck.h:26:59: warning: deprecated conversion from string
> constant to 'char*' [-Wwrite-strings]
> #define fail(msg)  _fail_unless(0, __FILE__, __LINE__, msg)
>                                                            ^
> tests/runtests.c:38:9: note: in expansion of macro 'fail'
>          fail("Parser not created.");
>          ^
> tests/runtests.c: In function 'void test_nul_byte()':
> tests/minicheck.h:26:59: warning: deprecated conversion from string
> constant to 'char*' [-Wwrite-strings]
> #define fail(msg)  _fail_unless(0, __FILE__, __LINE__, msg)
>                                                            ^
> tests/runtests.c:159:9: note: in expansion of macro 'fail'
>          fail("Parser did not report error on NUL-byte.");
>          ^
> In file included from tests/runtestspp.cpp:6:0:

I haven't looked into fixing these warnings ("deprecated conversion from
string constant to 'char *'").  They are not the items causing the build
failure, but it would be nice to get them resolved also.  It's low
priority for the release.  If anyone has an idea for fixing this, please
let me know.  Since they're coming from a macro, I think it's likely a
simple fix at a single location would resolve it, but I haven't had time
to look at it.

...[ lots more of that warning omitted ]...

> tests/runtests.c: In function 'int external_entity_handler(XML_Parser, const
> XML_Char*, const XML_Char*, const XML_Char*, const XML_Char*)':
> ./lib/expat.h:674:52: error: cast from 'void*' to 'int' loses precision [-
> fpermissive]
> #define XML_GetUserData(parser) (*(void **)(parser))
>                                                     ^
> tests/runtests.c:1179:27: note: in expansion of macro 'XML_GetUserData'
>      int callno = 1 + (int)XML_GetUserData(parser);
>                            ^

This is the actual bug.  Casting a (void*) to an (int) for a 64-bit architecture.

The commit mentioned above changes the type for callno to 'intptr_t'
to avoid this problem.

Please pull the commit and try the test again.

Thanks.



More information about the Fuego mailing list