Bug 14091 - xserver build failures on ia64/fedora
Summary: xserver build failures on ia64/fedora
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: IA64 (Itanium) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-15 16:50 UTC by Doug Chapman
Modified: 2008-03-19 07:26 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch to revert ia64 specific PCI probe code (3.56 KB, patch)
2008-03-04 21:11 UTC, Doug Chapman
no flags Details | Splinter Review

Description Doug Chapman 2008-01-15 16:50:02 UTC
Building from the latest git on fedora fails on ia64.  I will go back and try to find the most recent git rev that built cleanly.  I know that it was building cleanly on fedora as of xorg-server-1.3.0.0.


Based on the errors I expect this build issue could be reproduced on RHEL5 or likely any other ia64 linux distro (I will verify this).  I did some brief digging and found that some of the ia64 specific code was removed.

For example the whole chunk of code that contained ia64linuxPciInit() is missing from hw/xfree86/os-support/bus/linuxPci.c.  oddly I cannot find a commit in the git tree that removed it.



460gxPCI.c:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Verify460GXBus'

460gxPCI.c: In function 'Control460GXBridge':

460gxPCI.c:84: error: 'pciConfigPtr' undeclared (first use in this function)

460gxPCI.c:84: error: (Each undeclared identifier is reported only once

460gxPCI.c:84: error: for each function it appears in.)

460gxPCI.c:84: error: expected ';' before 'pPCI'

460gxPCI.c:89: error: 'pPCI' undeclared (first use in this function)

460gxPCI.c:89: warning: implicit declaration of function 'Verify460GXBus'

460gxPCI.c:89: warning: nested extern declaration of 'Verify460GXBus'

460gxPCI.c:91: warning: implicit declaration of function 'pciReadByte'

460gxPCI.c:91: warning: nested extern declaration of 'pciReadByte'

460gxPCI.c:96: warning: implicit declaration of function 'pciWriteByte'

460gxPCI.c:96: warning: nested extern declaration of 'pciWriteByte'

460gxPCI.c: In function 'Get460GXBridgeBuses':

460gxPCI.c:130: error: 'pciConfigPtr' undeclared (first use in this function)

460gxPCI.c:130: error: expected ';' before 'pPCI'

460gxPCI.c:135: error: 'pPCI' undeclared (first use in this function)

460gxPCI.c: In function 'Get460GXBridgeResources':

460gxPCI.c:156: error: 'pciConfigPtr' undeclared (first use in this function)

460gxPCI.c:156: error: expected ';' before 'pPCI'

460gxPCI.c:164: error: 'pPCI' undeclared (first use in this function)

460gxPCI.c: In function 'xorgProbe460GX':

460gxPCI.c:221: warning: implicit declaration of function 'pciReadLong'

460gxPCI.c:221: warning: nested extern declaration of 'pciReadLong'

460gxPCI.c: In function 'xf86PreScan460GX':

460gxPCI.c:281: warning: implicit declaration of function 'pciReadWord'

460gxPCI.c:281: warning: nested extern declaration of 'pciReadWord'

460gxPCI.c: In function 'xf86PostScan460GX':

460gxPCI.c:364: error: 'pciConfigPtr' undeclared (first use in this function)

460gxPCI.c:364: error: expected ';' before 'pPCI'

460gxPCI.c:373: error: 'pciBusFuncs_t' has no member named 'pciControlBridge'

460gxPCI.c:374: error: 'pciBusFuncs_t' has no member named 'pciGetBridgeBuses'

460gxPCI.c:375: error: 'pciBusFuncs_t' has no member named 'pciGetBridgeResources'

460gxPCI.c:383: error: 'ppPCI' undeclared (first use in this function)

460gxPCI.c:383: error: too many arguments to function 'xf86scanpci'

460gxPCI.c:384: error: 'pPCI' undeclared (first use in this function)

460gxPCI.c:390: error: too many arguments to function 'xf86scanpci'
Comment 1 Peter Hutterer 2008-01-15 17:11:57 UTC
(In reply to comment #0)
> For example the whole chunk of code that contained ia64linuxPciInit() is
> missing from hw/xfree86/os-support/bus/linuxPci.c.  oddly I cannot find a
> commit in the git tree that removed it.

just a random guess but did you update libpciaccess? this may be the solution.
Comment 2 Doug Chapman 2008-01-15 17:22:38 UTC
I will look at libpciaccess... but I still think there is something funny going on with the git tree.

The patch that removed ia64linuxPciInit() from hw/xfree86/os-support/bus/linuxPci.c is this commit:

commit 46f55f5dead5d70cdff30531d80a72f6be042315
Author: Ian Romanick <idr@localhost.localdomain>
Date:   Wed Jun 7 14:09:02 2006 -0700

    Initial batch of changes for PCI rework.  All future changes will be
    tracked individually.


however, looking at the patch it does not actually remove that chunk of the
file explicitly.  It does however remove a bunch of code just before the ia64
stuff.  Somehow the patch removed everything from there to the end of the file.

Comment 3 Doug Chapman 2008-01-15 18:01:14 UTC
I did a git pull of the latest libpciaccess and built against that.  The xserver build fails with the same errors.

I will see about fixing up hw/xfree86/os-support/bus/linuxPci.c tomorrow and see if that fixes things.  I tried that a few days ago and ran into other issues but those other issues may have been related to libpciaccess.

thanks,

- Doug
Comment 4 Doug Chapman 2008-01-23 08:18:37 UTC
I manually patched up hw/xfree86/os-support/bus/linuxPci.c to add back in the removed ia64 code however I didn't have any success.  It appears the PCI rework breaks ia64.  I am going to see if I can get one of our ia64 experts at HP to investigate.
Comment 5 Doug Chapman 2008-03-04 21:11:30 UTC
Created attachment 14850 [details] [review]
patch to revert ia64 specific PCI probe code

The problem here is ia64 used to have a bunch of arch specific PCI code.  It appears that is no longer needed with the new libpci changes.  This patch reverts those ia64 specific changes (which no longer build).  I have tested these changes on an HP rx4640 w/ATI radeon card (along with 1 fix for the radeon driver which I will submit in a separate BZ).

With this patch there are still a few no longer needed files left lying around which I have not removed.  I am going to confirm those really are not needed in any other configurations before submitting a patch to clean up the final bit.
Comment 6 Julien Cristau 2008-03-19 07:26:47 UTC
On Tue, Mar  4, 2008 at 21:11:31 -0800, bugzilla-daemon@freedesktop.org wrote:

> --- Comment #5 from Doug Chapman <doug.chapman@hp.com>  2008-03-04 21:11:30 PST ---
> Created an attachment (id=14850)
>  --> (http://bugs.freedesktop.org/attachment.cgi?id=14850)
> patch to revert ia64 specific PCI probe code
> 
the patch has been applied by ajax as
f7abe05b3306ed9a6f2cf5e3e45ed524d725d029 in master and
db26f32d0d0e2d6d11129ddfe46931308e536206 in server-1.5-branch, so i'm
closing this bug.

Thanks,
Julien


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.