* Stubdom compilation failure on Fedora 24 beta
@ 2016-05-13 12:35 Marek Marczykowski-Górecki
2016-05-13 13:33 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Marek Marczykowski-Górecki @ 2016-05-13 12:35 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1734 bytes --]
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?
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Stubdom compilation failure on Fedora 24 beta
2016-05-13 12:35 Stubdom compilation failure on Fedora 24 beta Marek Marczykowski-Górecki
@ 2016-05-13 13:33 ` Wei Liu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2016-05-13 13:33 UTC (permalink / raw)
To: Marek Marczykowski-Górecki; +Cc: Wei Liu, xen-devel
Hi Marek
On Fri, May 13, 2016 at 02:35:21PM +0200, Marek Marczykowski-Górecki wrote:
> 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)
>
Yes, it should be from newlib. This is expected because stubdom uses
newlib after all.
>
> 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?
>
You're not the first one that got bitten by this.
Search for
Error compiling Xen in configuring stubdom/gmp with glibc-2.23 on Arch Linux
or message-id
<1457311127.3237075.541322218.485CFC99@webmail.messagingengine.com>
in xen-users@ archive.
The thread contains some analysis, but it's not yet complete.
There are two possibilities that I can think of off the top of my head:
1. the cross-build environment is buggy 2. newlib bit-rots too much.
The first requires fixing the build environment, the second requires
patching newlib (preferable imo) or upgrading it to a newer version.
It's on our radar but Ian and I are working on other things at the
moment.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-13 13:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-13 12:35 Stubdom compilation failure on Fedora 24 beta Marek Marczykowski-Górecki
2016-05-13 13:33 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).