Red Hat Bugzilla – Bug 353821
[PATCH][IA64] xen build err, PAGE_SIZE and PAGE_SHIFT are undeclared
Last modified: 2008-03-05 16:22:49 EST
Description of problem:
When rebuilding from the latest srpm, we got the following error and build failed:
/usr/src/redhat/BUILD/xen-3.1.0-src/tools/ioemu/hw/xen_machine_fv.c: In function
'PAGE_SIZE' undeclared (first use in this function)
(Each undeclared identifier is reported only once
for each function it appears in.)
'PAGE_SHIFT' undeclared (first use in this function)
'i' undeclared (first use in this function)
There are two problems in the file xen_machine_fv.c, which was added by the
patch xen-pvfb-01-qemu-fv-machine.patch :
1. A simple one, the variable 'i' is undeclared.
2. PAGE_SIZE and PAGE_SHIFT are undeclared.
I have worked out a patch to solve them. Since the /usr/src/include/asm/page.h
in IA64 is just dummy and I can't find any header file which defines the two
macros both in glibc_headers and kernel_headers, I have to use the getpagesize()
from <unistd.h> to get the page_size and then use ffs() from <strings.h> to get
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. rpmbuild --rebuild xen-3.1.0-12.fc8.src.rpm
build error as described above
The two marcos could be found both in /usr/include/asm/page.h and
/usr/include/sys/user.h. But in IA64, they are not there.
Created attachment 238751 [details]
fix the build error "PAGE_SIZE and PAGE_SHIFT are undeclared"
Adding Jarod and Aron.
xen still doesn't build but this is no longer the issue. We have a new BZ open
for the current error. We no longer see this particular issue.