wang zhihao
2012-Apr-26 13:09 UTC
How to avoid this error "bits/predefs.h No such file or directory" when compiling XEN?
Hi , All I try to compile xen-unstable.hg(25249:a4e7fce6ee2b) from source repo on ubuntu11.10-amd64. It complains "/usr/include/features.h:323:26 fatal error: bits/predefs.h No such file or directory". I wonder it''s a thing related to 32bits and 64bits. How to solve this problem? Thank you. Here are my steps: [ Install prerequisites. ] sudo apt-get install git sudo apt-get install mercurial sudo apt-get install zlib1g-dev sudo apt-get install libncurses5-dev sudo apt-get install python-dev sudo apt-get install libssl-dev pkg-config (These are shipped with ubuntu11.10) sudo apt-get install xorg-dev sudo apt-get install uuid-dev sudo apt-get install libyajl-dev sudo apt-get install libaio-dev sudo apt-get install libglib2.0-dev sudo apt-get install bison sudo apt-get install flex sudo apt-get install gettext sudo apt-get install iasl sudo apt-get install bcc sudo apt-get install markdown sudo apt-get install udev [ Clone the repository. ] hg clone http://xenbits.xensource.com/xen-unstable.hg [ Build it. ] ./configure make world ------------- Regards Wang zhihao _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
George Dunlap
2012-Apr-27 08:55 UTC
Re: How to avoid this error "bits/predefs.h No such file or directory" when compiling XEN?
On Thu, Apr 26, 2012 at 2:09 PM, wang zhihao <accept.acm@gmail.com> wrote:> Hi , All > > I try to compile xen-unstable.hg(25249:a4e7fce6ee2b) from source repo on > ubuntu11.10-amd64. It complains "/usr/include/features.h:323:26 fatal error: > bits/predefs.h No such file or directory". I wonder it''s a thing related to > 32bits and 64bits. How to solve this problem? Thank you.I had the same problem; it appears that tgcbios needs a 32-bit libc to compile in 32 bits (full error message below). This solved it for me: sudo apt-get install libc6-dev-i386 We should probably add that to one of the compile-time checks. Roger, do you have time to add that in? Wang: BTW, in the future it''s helpful to include more of the compilation than just the final error message. -George make -C tcgbios all make[10]: Entering directory `/home/gdunlap/hg/open-source/xen-upstream.hg/tools/firmware/rombios/32bit/tcgbios'' gcc -O1 -fno-omit-frame-pointer -m32 -march=i686 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -D__XEN_TOOLS__ -MMD -MF .tcgbios.o.d -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls -mno-tls-direct-seg-refs -Werror -fno-stack-protector -fno-exceptions -fno-builtin -msoft-float -I/home/gdunlap/hg/open-source/xen-upstream.hg/tools/firmware/rombios/32bit/tcgbios/../../../../../tools/include -I.. -I../.. -c -o tcgbios.o tcgbios.c In file included from /usr/include/stdint.h:26:0, from /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include/stdint.h:3, from ../rombios_compat.h:8, from tcgbios.c:24: /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory compilation terminated.
Ian Campbell
2012-Apr-27 09:03 UTC
Re: How to avoid this error "bits/predefs.h No such file or directory" when compiling XEN?
On Fri, 2012-04-27 at 09:55 +0100, George Dunlap wrote:> On Thu, Apr 26, 2012 at 2:09 PM, wang zhihao <accept.acm@gmail.com> wrote: > > Hi , All > > > > I try to compile xen-unstable.hg(25249:a4e7fce6ee2b) from source repo on > > ubuntu11.10-amd64. It complains "/usr/include/features.h:323:26 fatal error: > > bits/predefs.h No such file or directory". I wonder it''s a thing related to > > 32bits and 64bits. How to solve this problem? Thank you. > > I had the same problem; it appears that tgcbios needs a 32-bit libc to > compile in 32 bits (full error message below). This solved it for me:What is tgcbios?> sudo apt-get install libc6-dev-i386 > > We should probably add that to one of the compile-time checks. Roger, > do you have time to add that in?Also please add it to the dependencies in the README.> > Wang: BTW, in the future it''s helpful to include more of the > compilation than just the final error message. > > -George > > make -C tcgbios all > make[10]: Entering directory > `/home/gdunlap/hg/open-source/xen-upstream.hg/tools/firmware/rombios/32bit/tcgbios'' > gcc -O1 -fno-omit-frame-pointer -m32 -march=i686 -g > -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes > -Wdeclaration-after-statement -Wno-unused-but-set-variable > -D__XEN_TOOLS__ -MMD -MF .tcgbios.o.d -D_LARGEFILE_SOURCE > -D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls > -mno-tls-direct-seg-refs -Werror -fno-stack-protector -fno-exceptions > -fno-builtin -msoft-float > -I/home/gdunlap/hg/open-source/xen-upstream.hg/tools/firmware/rombios/32bit/tcgbios/../../../../../tools/include > -I.. -I../.. -c -o tcgbios.o tcgbios.c > In file included from /usr/include/stdint.h:26:0, > from /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include/stdint.h:3, > from ../rombios_compat.h:8, > from tcgbios.c:24: > /usr/include/features.h:323:26: fatal error: bits/predefs.h: No such > file or directory > compilation terminated. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel