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 'xen_init_fv': /usr/src/redhat/BUILD/xen-3.1.0-src/tools/ioemu/hw/xen_machine_fv.c:225: error: 'PAGE_SIZE' undeclared (first use in this function) /usr/src/redhat/BUILD/xen-3.1.0-src/tools/ioemu/hw/xen_machine_fv.c:225: error: (Each undeclared identifier is reported only once /usr/src/redhat/BUILD/xen-3.1.0-src/tools/ioemu/hw/xen_machine_fv.c:225: error: for each function it appears in.) /usr/src/redhat/BUILD/xen-3.1.0-src/tools/ioemu/hw/xen_machine_fv.c:235: error: 'PAGE_SHIFT' undeclared (first use in this function) /usr/src/redhat/BUILD/xen-3.1.0-src/tools/ioemu/hw/xen_machine_fv.c:245: error: '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 the page_shift. Version-Release number of selected component (if applicable): xen-3.1.0-12.fc8.src.rpm How reproducible: always Steps to Reproduce: 1. rpmbuild --rebuild xen-3.1.0-12.fc8.src.rpm 2. 3. Actual results: build error as described above Expected results: build cleanly Additional info: patch attached 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. P.
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.