Bug 353821 - [PATCH][IA64] xen build err, PAGE_SIZE and PAGE_SHIFT are undeclared
Summary: [PATCH][IA64] xen build err, PAGE_SIZE and PAGE_SHIFT are undeclared
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: xen
Version: rawhide
Hardware: ia64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Xen Maintainance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: fedora-ia64 418441
TreeView+ depends on / blocked
 
Reported: 2007-10-26 10:02 UTC by Zhan, Yi
Modified: 2008-03-05 21:22 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-03-05 21:22:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
fix the build error "PAGE_SIZE and PAGE_SHIFT are undeclared" (854 bytes, patch)
2007-10-26 10:02 UTC, Zhan, Yi
no flags Details | Diff

Description Zhan, Yi 2007-10-26 10:02:36 UTC
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.

Comment 1 Zhan, Yi 2007-10-26 10:02:36 UTC
Created attachment 238751 [details]
fix the build error "PAGE_SIZE and PAGE_SHIFT are undeclared"

Comment 2 Prarit Bhargava 2007-10-26 13:37:35 UTC
Adding Jarod and Aron.

P.

Comment 3 Doug Chapman 2008-03-05 21:22:49 UTC
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.



Note You need to log in before you can comment on or make changes to this bug.