atom feed2 messages in com.xensource.lists.xen-devel[Xen-devel] Stubdom compilation failu...
FromSent OnAttachments
Marek Marczykowski-GóreckiMay 13, 2016 5:35 am 
Wei LiuMay 13, 2016 6:33 am 
Subject:[Xen-devel] Stubdom compilation failure on Fedora 24 beta
From:Marek Marczykowski-Górecki (marm@invisiblethingslab.com)
Date:May 13, 2016 5:35:21 am
List:com.xensource.lists.xen-devel

Hi,

I'm trying to build Xen 4.6.1 on Fedora 24 beta. Since gcc 6, I need to pull some patches from unstable, but then I hit some strange problem:

During configure run in stubdom/gmp-x86_64 I've got:

checking size of unsigned short... configure: error: cannot compute sizeof
(unsigned short) See `config.log' for more details.

It turned out the failing line in conftest is:

return ferror (f) || fclose (f) != 0;

ferror(f) returned 1. That's strange, when running under gdb, manually checking ferror(f) (`p ferror(f)`) returns 0. So I've looked at code produced (after slight modification to have "if (ferror(f)) ..."), ferror(f) was turned to:

0x000000000040063d <+55>: testb $0x40,0x10(%rbx)

This doesn't look like ferror from glibc. And 0x40 is not _IO_ERR_SEEN (0x20).

This looks like ferror from newlib
(stubdom/newlib-1.16.0/newlib/libc/include/stdio.h):

#define __SERR 0x0040 /* found error */ #define __sferror(p) (((p)->_flags & __SERR) != 0) #define ferror(p) __sferror(p)

Configure is called this way (stubdom/Makefile): cd $@; CPPFLAGS="-isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include
$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" CC=$(CC) $(GMPEXT) ./configure
--disable-shared --enable-static --disable-fft --without-readline
--prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf

And indeed $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include contains headers from newlib.

Any idea how to fix this? And why it was working before?