Aaron Peterson
2008-Aug-17 21:57 UTC
[Xen-users] xen tools compile failed - missing gnu/stubs-32.h
I was trying to compile xen tools from 3.2-testing on centos5 amd64 (with vmxassist=n) and the compile failed with: gcc -m32 -march=i686 -DNDEBUG -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -fno-builtin -O2 -msoft-float -nostdlib -fno-stack-protector -I../ -I../../ -DGCC_PROTOS -c -o tcgbios.o tcgbios.c In file included from /usr/include/features.h:352, from /usr/include/stdint.h:26, from ../rombios_compat.h:8, from tcgbios.c:24: /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory make[4]: *** [tcgbios.o] Error 1 make[4]: Leaving directory `/usr/src/xen-3.2-testing.hg/tools/firmware/rombios/32bit/tcgbios'' make[3]: *** [subdirs] Error 2 make[3]: Leaving directory `/usr/src/xen-3.2-testing.hg/tools/firmware/rombios/32bit'' make[2]: *** [all] Error 2 make[2]: Leaving directory `/usr/src/xen-3.2-testing.hg/tools/firmware'' make[1]: *** [install] Error 2 make[1]: Leaving directory `/usr/src/xen-3.2-testing.hg/tools'' make: *** [install-tools] Error 2 what is this stubs-32.h, why don''t I have it and where can I get it :-) I just typed "make world vmxassist=n" but perhaps I need "-march=k8" or something about "x86_64" somewhere. Not sure why it is compiling for 686, doesn''t it compile for the current arch by default? TIA _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Aaron Peterson
2008-Aug-17 23:02 UTC
[Xen-users] Fwd: xen tools compile failed - missing gnu/stubs-32.h
nevermind. I needed the glibc-devel.i386. "yum install glibc-devel" took care of the error... ---------- Forwarded message ---------- From: Aaron Peterson <lloyd.peterson@gmail.com> Date: Sun, Aug 17, 2008 at 5:57 PM Subject: xen tools compile failed - missing gnu/stubs-32.h To: xen-users@lists.xensource.com I was trying to compile xen tools from 3.2-testing on centos5 amd64 (with vmxassist=n) and the compile failed with: gcc -m32 -march=i686 -DNDEBUG -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement -D__XEN_TOOLS__ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -fno-builtin -O2 -msoft-float -nostdlib -fno-stack-protector -I../ -I../../ -DGCC_PROTOS -c -o tcgbios.o tcgbios.c In file included from /usr/include/features.h:352, from /usr/include/stdint.h:26, from ../rombios_compat.h:8, from tcgbios.c:24: /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory make[4]: *** [tcgbios.o] Error 1 make[4]: Leaving directory `/usr/src/xen-3.2-testing.hg/tools/firmware/rombios/32bit/tcgbios'' make[3]: *** [subdirs] Error 2 make[3]: Leaving directory `/usr/src/xen-3.2-testing.hg/tools/firmware/rombios/32bit'' make[2]: *** [all] Error 2 make[2]: Leaving directory `/usr/src/xen-3.2-testing.hg/tools/firmware'' make[1]: *** [install] Error 2 make[1]: Leaving directory `/usr/src/xen-3.2-testing.hg/tools'' make: *** [install-tools] Error 2 what is this stubs-32.h, why don''t I have it and where can I get it :-) I just typed "make world vmxassist=n" but perhaps I need "-march=k8" or something about "x86_64" somewhere. Not sure why it is compiling for 686, doesn''t it compile for the current arch by default? TIA _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tim Post
2008-Aug-18 11:43 UTC
Re: [Xen-users] xen tools compile failed - missing gnu/stubs-32.h
On Sun, 2008-08-17 at 17:57 -0400, Aaron Peterson wrote:> what is this stubs-32.h, why don''t I have it and where can I get it :-)Just: ln -s /usr/include/gnu/stubs-64.h /usr/include/gnu/stubs-32.h The stubs just load arch specific headers, which do their own sanity. This is a bug, however the work-around is quite safe. Cheers, --Tim -- Monkey + Typewriter = Echoreply ( http://echoreply.us ) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Todd Deshane
2008-Aug-18 12:59 UTC
Re: [Xen-users] xen tools compile failed - missing gnu/stubs-32.h
Hi Tim, On Mon, Aug 18, 2008 at 7:43 AM, Tim Post <echo@echoreply.us> wrote:> On Sun, 2008-08-17 at 17:57 -0400, Aaron Peterson wrote: >> what is this stubs-32.h, why don''t I have it and where can I get it :-) > > Just: > > ln -s /usr/include/gnu/stubs-64.h /usr/include/gnu/stubs-32.h >I just did a apt-get install libc6-dev-i386 followed by: diff /usr/include/gnu/stubs-64.h /usr/include/gnu/stubs-32.h 10c10,12 < #define __stub_bdflush ---> #define __stub___kernel_cosl > #define __stub___kernel_sinl > #define __stub___kernel_tanl15d16 < #define __stub_getmsg 18d18 < #define __stub_putmsg The ln might not be so harmless necessarily> The stubs just load arch specific headers, which do their own sanity. > This is a bug, however the work-around is quite safe. >Whose bug is it? If it is Xen''s then shouldn''t it be fixed before the release? Although a dependency on the i386 libc devel package isn''t that big of a deal really. Cheers, Todd -- Todd Deshane http://todddeshane.net check out our book: http://runningxen.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tim Post
2008-Aug-19 03:46 UTC
Re: [Xen-users] xen tools compile failed - missing gnu/stubs-32.h
Hi Todd, On Mon, 2008-08-18 at 08:59 -0400, Todd Deshane wrote:> I just did a apt-get install libc6-dev-i386 > The ln might not be so harmless necessarilyIts more or less a work around for setting __WORDSIZE (32 or 64) by just including stubs.h , which in turn includes stubs-$(__WORDSIZE).h. So if __WORDSIZE is 64, stubs-64.h is included, else stubs32, each one defines respective stub functions that just fail (and set errno) which are slightly different. If you follow the spaghetti trail through bits/ you''ll see what I mean. stubs-32 is included, but stuff is linked against whatever arch your building on, which means stubs-64 should be used if compiling on a 64 bit machine.> Whose bug is it? If it is Xen''s then shouldn''t it be fixed before the release?Not really a bug, just a quirk.> Although a dependency on the i386 libc devel package isn''t that big of a > deal really.That''s where I get confused, as i386 libc doesn''t appear to be being used, but checks are done against its stubs. That means certain stubs might not actually fail that should? I could be wrong, however :) Cheers, --Tim -- Monkey + Typewriter = Echoreply ( http://echoreply.us ) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users