Bug 426333

Summary: [kernel-headers] Compiles using the macro 'NBPG' fail as PAGE_SIZE is not defined in /usr/include/asm/page.h
Product: [Fedora] Fedora Reporter: Zhan, Yi <yi.zhan>
Component: mono-debuggerAssignee: Paul F. Johnson <paul>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: rawhide Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-08 19:28:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 163350    

Description Zhan, Yi 2007-12-20 07:00:47 UTC
Description of problem:

The issue only happens on ia64 platform. The header file /usr/include/asm/user.h
has '#define NBPG PAGE_SIZE', but the definition of PAGE_SIZE is unavailable. In
fact, the file /usr/include/asm/page.h contains nothing other than comments.
This leads to compilation errors when building packages using NBPG or PAGE_SIZE
such as xen and mono-debugger.

Is there a clean way to put PAGE_SIZE and PAGE_SHIFT to the header file? Not
sure if the values decided by CONFIG_PAGE_SIZE could be used here.

Version-Release number of selected component (if applicable):
kernel-2.6.23.1-42.fc8.src.rpm
kernel-headers-2.6.23.1-42.fc8.ia64.rpm
(http://free.linux.hp.com/Fedora-ia64/Everything/8/ia64/os/Packages/kernel-headers-2.6.23.1-42.fc8.ia64.rpm)

How reproducible:
100%

Steps to Reproduce:
1.Complies a file which include <asm/user.h> and use the macro NBPG.
2.
3.
  
Actual results:


Expected results:


Additional info:
Actually some package (mono-debugger) include <sys/user.h> to use NBPG. But
since the definitions in <sys/user.h> are provided by kernel-headers, I report
the issue here.

Comment 1 Doug Chapman 2008-03-05 22:52:27 UTC
this is actually a bug in mono-debugger itself.

using the PAGE_SIZE macro is not portable and not the right way to get the size
of a page.  It should use getpagesize() instead.

reassigning to mono-debugger.


Comment 2 Bug Zapper 2008-05-14 04:13:15 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Paul F. Johnson 2008-10-08 19:28:18 UTC
This is fixed in the current version - I'm trying to get mdebugger 0.6 into f9 currently