This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 353821 - [PATCH][IA64] xen build err, PAGE_SIZE and PAGE_SHIFT are undeclared
[PATCH][IA64] xen build err, PAGE_SIZE and PAGE_SHIFT are undeclared
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: xen (Show other bugs)
rawhide
ia64 Linux
low Severity medium
: ---
: ---
Assigned To: Xen Maintainance List
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks: fedora-ia64 418441
  Show dependency treegraph
 
Reported: 2007-10-26 06:02 EDT by Zhan, Yi
Modified: 2008-03-05 16:22 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-05 16:22:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Zhan, Yi 2007-10-26 06:02:36 EDT
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 06:02:36 EDT
Created attachment 238751 [details]
fix the build error "PAGE_SIZE and PAGE_SHIFT are undeclared"
Comment 2 Prarit Bhargava 2007-10-26 09:37:35 EDT
Adding Jarod and Aron.

P.
Comment 3 Doug Chapman 2008-03-05 16:22:49 EST
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.