xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* How to avoid this error "bits/predefs.h No such file or directory" when compiling XEN?
@ 2012-04-26 13:09 wang zhihao
  2012-04-27  8:55 ` George Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: wang zhihao @ 2012-04-26 13:09 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1126 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 6423 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] 3+ messages in thread

* Re: How to avoid this error "bits/predefs.h No such file or directory" when compiling XEN?
  2012-04-26 13:09 How to avoid this error "bits/predefs.h No such file or directory" when compiling XEN? wang zhihao
@ 2012-04-27  8:55 ` George Dunlap
  2012-04-27  9:03   ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: George Dunlap @ 2012-04-27  8:55 UTC (permalink / raw)
  To: wang zhihao, Roger Pau Monné; +Cc: xen-devel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to avoid this error "bits/predefs.h No such file or directory" when compiling XEN?
  2012-04-27  8:55 ` George Dunlap
@ 2012-04-27  9:03   ` Ian Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2012-04-27  9:03 UTC (permalink / raw)
  To: George Dunlap; +Cc: wang zhihao, xen-devel, Roger Pau Monne

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-27  9:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-26 13:09 How to avoid this error "bits/predefs.h No such file or directory" when compiling XEN? wang zhihao
2012-04-27  8:55 ` George Dunlap
2012-04-27  9:03   ` Ian Campbell

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).