Bug 522 - Fglrx 12.6 (beta) sigsegv on xorg startup
: Fglrx 12.6 (beta) sigsegv on xorg startup
Status: CLOSED WONTFIX
Product: AMD Catalyst™Proprietary Display Driver
Classification: Unclassified
Component: X11 Driver
: .archived
: Radeon HD 5000 Series Linux
: low major
Assigned To: nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-01 14:36 CDT by rechapita
Modified: 2013-08-22 13:58 CDT (History)
10 users (show)



Attachments
systeminfo report from my system (331.31 KB, text/plain)
2012-06-01 14:36 CDT, rechapita
Details
binary difference (10.44 KB, application/octet-stream)
2012-06-17 17:07 CDT, Paul Menzel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rechapita 2012-06-01 14:36:07 CDT
Created attachment 472 [details]
systeminfo report from my system

Description of problem: 
On my Debian/testing laptop (ati mobility radeon hd 5730) Xorg fails to start with sigsegv
Here are the pertinent Xorg.0.log lines:

[    30.280] (**) fglrx(0): Depth 24, (--) framebuffer bpp 32
[    30.280] (II) fglrx(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[    30.280] (==) fglrx(0): Default visual is TrueColor
[    30.280] (**) fglrx(0): Option "DPMS" "true"
[    30.281] (==) fglrx(0): RGB weight 888
[    30.281] (II) fglrx(0): Using 8 bits per RGB 
[    30.281] (==) fglrx(0): Buffer Tiling is ON
[    30.283] (II) Loading sub module "fglrxdrm"
[    30.283] (II) LoadModule: "fglrxdrm"
[    30.283] (II) Loading /usr/lib/xorg/modules/linux/libfglrxdrm.so
[    30.283] (II) Module fglrxdrm: vendor="FireGL - AMD Technologies Inc."
[    30.283] 	compiled for 1.4.99.906, module version = 8.98.2
[    30.286] ukiDynamicMajor: found major device number 252
[    30.286] ukiDynamicMajor: found major device number 252
[    30.286] ukiOpenByBusid: Searching for BusID PCI:1:0:0
[    30.286] ukiOpenDevice: node name is /dev/ati/card0
[    30.286] ukiOpenDevice: open result is 12, (OK)
[    30.286] ukiOpenByBusid: ukiOpenMinor returns 12
[    30.286] ukiOpenByBusid: ukiGetBusid reports PCI:1:0:0
[    30.286] (**) fglrx(0): NoAccel = NO
[    30.286] (**) fglrx(0): AMD 2D Acceleration Architecture enabled
[    30.286] (--) fglrx(0): Chipset: "AMD Radeon HD 6570M/5700 Series" (Chipset = 0x68c0)
[    30.286] (--) fglrx(0): (PciSubVendor = 0x1043, PciSubDevice = 0x1c22)
[    30.286] (==) fglrx(0): board vendor info: third party graphics adapter - NOT original AMD
[    30.286] (--) fglrx(0): Linear framebuffer (phys) at 0xc0000000
[    30.286] (--) fglrx(0): MMIO registers at 0xd0020000
[    30.286] (--) fglrx(0): I/O port at 0x0000d000
[    30.286] (==) fglrx(0): ROM-BIOS at 0x000c0000
[    30.356] (II) fglrx(0): AC Adapter is used
[    30.426] 
[    30.426] Backtrace:
[    30.473] 0: /usr/bin/X (xorg_backtrace+0x36) [0x7fbcd5d0e796]
[    30.473] 1: /usr/bin/X (0x7fbcd5b90000+0x1822b9) [0x7fbcd5d122b9]
[    30.473] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fbcd4eb8000+0xf030) [0x7fbcd4ec7030]
[    30.473] 3: /usr/lib/x86_64-linux-gnu/libpciaccess.so.0 (0x7fbcd50d4000+0x5394) [0x7fbcd50d9394]
[    30.473] 4: /usr/lib/xorg/modules/drivers/fglrx_drv.so (0x7fbcd0fad000+0x8032c9) [0x7fbcd17b02c9]
[    30.473] 5: /usr/lib/xorg/modules/drivers/fglrx_drv.so (amd_xs112_int10_xf86ExtendedInitInt10+0xdd) [0x7fbcd17b005d]
[    30.473] 6: /usr/lib/xorg/modules/drivers/fglrx_drv.so (amd_xs112_int10_xf86InitInt10+0xb) [0x7fbcd17af8fb]
[    30.473] 7: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xf86InitInt10+0xd) [0x7fbcd12f597d]
[    30.473] 8: /usr/lib/xorg/modules/drivers/fglrx_drv.so (0x7fbcd0fad000+0x48405c) [0x7fbcd143105c]
[    30.474] 9: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xdl_xs112_PreInitAdapter+0x274) [0x7fbcd1430c34]
[    30.474] 10: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xdl_xs112_atiddxPreInit+0x12ad) [0x7fbcd143231d]
[    30.474] 11: /usr/bin/X (InitOutput+0x8ba) [0x7fbcd5c217ba]
[    30.474] 12: /usr/bin/X (0x7fbcd5b90000+0x41d36) [0x7fbcd5bd1d36]
[    30.474] 13: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xfd) [0x7fbcd3be1ead]
[    30.474] 14: /usr/bin/X (0x7fbcd5b90000+0x421ad) [0x7fbcd5bd21ad]
[    30.474] 
[    30.474] Segmentation fault at address 0xffffffffd64210b2
[    30.474] 
Fatal server error:
[    30.474] Caught signal 11 (Segmentation fault). Server aborting

Steps to reproduce:
1. Install fglrx
2. Reboot

Actual result: 
Xorg crashes

Expected result: 
Xorg starting
Comment 1 utkarshsins 2012-06-01 19:39:18 CDT
Same for me

My Xorg.0.log

[    25.485] 
X.Org X Server 1.12.1.902 (1.12.2 RC 2)
Release Date: 2012-05-19
[    25.485] X Protocol Version 11, Revision 0
[    25.485] Build Operating System: Linux 3.2.0-2-amd64 x86_64 Debian
[    25.485] Current Operating System: Linux nameremoved 3.2.0-1-amd64 #1 SMP Fri Feb 17 05:17:36 UTC 2012 x86_64
[    25.485] Kernel command line: BOOT_IMAGE=/vmlinuz-3.2.0-1-amd64 root=UUID=4ece6190-3341-42e1-91f5-c18ab8a695d5 ro splash quiet pcie_aspm=force
[    25.485] Build Date: 20 May 2012  08:57:17AM
[    25.485] xorg-server 2:1.12.1.902-1 (Cyril Brulebois <kibi@debian.org>) 
[    25.485] Current version of pixman: 0.24.4
[    25.485] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    25.485] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    25.485] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jun  2 05:56:38 2012
[    25.519] (==) Using config file: "/etc/X11/xorg.conf"
[    25.519] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    25.575] (==) ServerLayout "aticonfig Layout"
[    25.575] (**) |-->Screen "aticonfig-Screen[0]-0" (0)
[    25.575] (**) |   |-->Monitor "aticonfig-Monitor[0]-0"
[    25.601] (**) |   |-->Device "aticonfig-Device[0]-0"
[    25.601] (==) Automatically adding devices
[    25.601] (==) Automatically enabling devices
[    25.675] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    25.675] 	Entry deleted from font path.
[    25.760] (WW) The directory "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" does not exist.
[    25.760] 	Entry deleted from font path.
[    25.760] (==) FontPath set to:
	/usr/share/fonts/X11/misc,
	/usr/share/fonts/X11/100dpi/:unscaled,
	/usr/share/fonts/X11/75dpi/:unscaled,
	/usr/share/fonts/X11/Type1,
	/usr/share/fonts/X11/100dpi,
	/usr/share/fonts/X11/75dpi,
	built-ins
[    25.760] (==) ModulePath set to "/usr/lib/xorg/modules"
[    25.760] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[    25.760] (II) Loader magic: 0x7f5aec638ae0
[    25.760] (II) Module ABI versions:
[    25.760] 	X.Org ANSI C Emulation: 0.4
[    25.760] 	X.Org Video Driver: 12.0
[    25.760] 	X.Org XInput driver : 16.0
[    25.760] 	X.Org Server Extension : 6.0
[    25.762] (--) PCI:*(0:2:0:0) 1002:68c0:1028:02fe rev 0, Mem @ 0xd0000000/268435456, 0xcfee0000/131072, I/O @ 0x00002000/256, BIOS @ 0x????????/131072
[    25.762] (II) Open ACPI successful (/var/run/acpid.socket)
[    25.762] (II) "extmod" will be loaded by default.
[    25.762] (II) "dbe" will be loaded by default.
[    25.762] (II) "glx" will be loaded by default.
[    25.762] (II) "record" will be loaded by default.
[    25.762] (II) "dri" will be loaded by default.
[    25.762] (II) "dri2" will be loaded by default.
[    25.762] (II) LoadModule: "extmod"
[    25.773] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
[    25.798] (II) Module extmod: vendor="X.Org Foundation"
[    25.798] 	compiled for 1.12.1.902, module version = 1.0.0
[    25.798] 	Module class: X.Org Server Extension
[    25.798] 	ABI class: X.Org Server Extension, version 6.0
[    25.798] (II) Loading extension SELinux
[    25.798] (II) Loading extension MIT-SCREEN-SAVER
[    25.798] (II) Loading extension XFree86-VidModeExtension
[    25.798] (II) Loading extension XFree86-DGA
[    25.798] (II) Loading extension DPMS
[    25.798] (II) Loading extension XVideo
[    25.798] (II) Loading extension XVideo-MotionCompensation
[    25.798] (II) Loading extension X-Resource
[    25.798] (II) LoadModule: "dbe"
[    25.798] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
[    25.798] (II) Module dbe: vendor="X.Org Foundation"
[    25.798] 	compiled for 1.12.1.902, module version = 1.0.0
[    25.798] 	Module class: X.Org Server Extension
[    25.798] 	ABI class: X.Org Server Extension, version 6.0
[    25.798] (II) Loading extension DOUBLE-BUFFER
[    25.798] (II) LoadModule: "glx"
[    25.799] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    25.876] (II) Module glx: vendor="Advanced Micro Devices, Inc."
[    25.876] 	compiled for 6.9.0, module version = 1.0.0
[    25.877] (II) Loading extension GLX
[    25.877] (II) LoadModule: "record"
[    25.877] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
[    25.878] (II) Module record: vendor="X.Org Foundation"
[    25.878] 	compiled for 1.12.1.902, module version = 1.13.0
[    25.878] 	Module class: X.Org Server Extension
[    25.878] 	ABI class: X.Org Server Extension, version 6.0
[    25.878] (II) Loading extension RECORD
[    25.878] (II) LoadModule: "dri"
[    25.878] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[    25.887] (II) Module dri: vendor="X.Org Foundation"
[    25.887] 	compiled for 1.12.1.902, module version = 1.0.0
[    25.887] 	ABI class: X.Org Server Extension, version 6.0
[    25.887] (II) Loading extension XFree86-DRI
[    25.887] (II) LoadModule: "dri2"
[    25.887] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[    25.888] (II) Module dri2: vendor="X.Org Foundation"
[    25.888] 	compiled for 1.12.1.902, module version = 1.2.0
[    25.888] 	ABI class: X.Org Server Extension, version 6.0
[    25.888] (II) Loading extension DRI2
[    25.888] (II) LoadModule: "fglrx"
[    25.888] (II) Loading /usr/lib/xorg/modules/drivers/fglrx_drv.so
[    26.192] (II) Module fglrx: vendor="FireGL - AMD Technologies Inc."
[    26.192] 	compiled for 1.4.99.906, module version = 8.98.2
[    26.192] 	Module class: X.Org Video Driver
[    26.192] (II) Loading sub module "fglrxdrm"
[    26.192] (II) LoadModule: "fglrxdrm"
[    26.192] (II) Loading /usr/lib/xorg/modules/linux/libfglrxdrm.so
[    26.287] (II) Module fglrxdrm: vendor="FireGL - AMD Technologies Inc."
[    26.287] 	compiled for 1.4.99.906, module version = 8.98.2
[    26.287] (II) AMD Proprietary Linux Driver Version Identifier:8.98.2
[    26.287] (II) AMD Proprietary Linux Driver Release Identifier: UNSUPPORTED-8.98                     
[    26.287] (II) AMD Proprietary Linux Driver Build Date: May 22 2012 21:15:05
[    26.287] (++) using VT number 7

[    26.289] (WW) Falling back to old probe method for fglrx
[    26.392] (II) Loading PCS database from /etc/ati/amdpcsdb
[    26.408] (WW) Unsupported ASIC ID 1002:9403:0000:0000 in control file
[    26.408] (WW) Unsupported ASIC ID 1002:9403:0000:0000 in control file
[    26.408] (WW) Unsupported ASIC ID 1002:9400:0000:0000 in control file
[    26.408] (WW) Unsupported ASIC ID 1002:9400:0000:0000 in control file
[    26.408] (II) AMD ASIC control file status: R4 S0 B208 N312 T207
[    26.408] (--) Chipset Supported AMD Graphics Processor (0x68C0) found
[    26.432] (WW) fglrx: No matching Device section for instance (BusID PCI:0@2:0:1) found
[    26.433] (II) AMD Video driver is running on a device belonging to a group targeted for this release
[    26.453] (II) AMD Video driver is unsigned
[    26.453] (II) fglrx(0): pEnt->device->identifier=0x7f5aec8490a0
[    26.453] (II) fglrx(0): === [xdl_xs112_atiddxPreInit] === begin
[    26.453] (II) Loading sub module "vgahw"
[    26.453] (II) LoadModule: "vgahw"
[    26.453] (II) Loading /usr/lib/xorg/modules/libvgahw.so
[    26.478] (II) Module vgahw: vendor="X.Org Foundation"
[    26.478] 	compiled for 1.12.1.902, module version = 0.1.0
[    26.478] 	ABI class: X.Org Video Driver, version 12.0
[    26.478] (**) fglrx(0): Depth 24, (--) framebuffer bpp 32
[    26.478] (II) fglrx(0): Pixel depth = 24 bits stored in 4 bytes (32 bpp pixmaps)
[    26.478] (==) fglrx(0): Default visual is TrueColor
[    26.478] (**) fglrx(0): Option "DPMS" "true"
[    26.478] (==) fglrx(0): RGB weight 888
[    26.478] (II) fglrx(0): Using 8 bits per RGB 
[    26.478] (==) fglrx(0): Buffer Tiling is ON
[    26.499] (II) Loading sub module "fglrxdrm"
[    26.499] (II) LoadModule: "fglrxdrm"
[    26.499] (II) Loading /usr/lib/xorg/modules/linux/libfglrxdrm.so
[    26.499] (II) Module fglrxdrm: vendor="FireGL - AMD Technologies Inc."
[    26.499] 	compiled for 1.4.99.906, module version = 8.98.2
[    26.500] ukiDynamicMajor: found major device number 250
[    26.500] ukiDynamicMajor: found major device number 250
[    26.500] ukiOpenByBusid: Searching for BusID PCI:2:0:0
[    26.500] ukiOpenDevice: node name is /dev/ati/card0
[    26.500] ukiOpenDevice: open result is 12, (OK)
[    26.500] ukiOpenByBusid: ukiOpenMinor returns 12
[    26.500] ukiOpenByBusid: ukiGetBusid reports PCI:2:0:0
[    26.501] (**) fglrx(0): NoAccel = NO
[    26.501] (**) fglrx(0): AMD 2D Acceleration Architecture enabled
[    26.501] (--) fglrx(0): Chipset: "AMD Radeon HD 6570M/5700 Series" (Chipset = 0x68c0)
[    26.501] (--) fglrx(0): (PciSubVendor = 0x1028, PciSubDevice = 0x02fe)
[    26.501] (==) fglrx(0): board vendor info: third party graphics adapter - NOT original AMD
[    26.501] (--) fglrx(0): Linear framebuffer (phys) at 0xd0000000
[    26.501] (--) fglrx(0): MMIO registers at 0xcfee0000
[    26.501] (--) fglrx(0): I/O port at 0x00002000
[    26.501] (==) fglrx(0): ROM-BIOS at 0x000c0000
[    26.509] (II) fglrx(0): ATIF platform detected
[    26.509] (II) fglrx(0): AC Adapter is used
[    26.525] 
[    26.525] Backtrace:
[    26.568] 0: /usr/bin/X (xorg_backtrace+0x36) [0x7f5aec3ce796]
[    26.568] 1: /usr/bin/X (0x7f5aec250000+0x1822b9) [0x7f5aec3d22b9]
[    26.568] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f5aeb578000+0xf030) [0x7f5aeb587030]
[    26.568] 3: /usr/lib/x86_64-linux-gnu/libpciaccess.so.0 (0x7f5aeb794000+0x5394) [0x7f5aeb799394]
[    26.568] 4: /usr/lib/xorg/modules/drivers/fglrx_drv.so (0x7f5ae766d000+0x8032c9) [0x7f5ae7e702c9]
[    26.569] 5: /usr/lib/xorg/modules/drivers/fglrx_drv.so (amd_xs112_int10_xf86ExtendedInitInt10+0xdd) [0x7f5ae7e7005d]
[    26.569] 6: /usr/lib/xorg/modules/drivers/fglrx_drv.so (amd_xs112_int10_xf86InitInt10+0xb) [0x7f5ae7e6f8fb]
[    26.569] 7: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xf86InitInt10+0xd) [0x7f5ae79b597d]
[    26.569] 8: /usr/lib/xorg/modules/drivers/fglrx_drv.so (0x7f5ae766d000+0x48405c) [0x7f5ae7af105c]
[    26.569] 9: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xdl_xs112_PreInitAdapter+0x274) [0x7f5ae7af0c34]
[    26.569] 10: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xdl_xs112_atiddxPreInit+0x12ad) [0x7f5ae7af231d]
[    26.569] 11: /usr/bin/X (InitOutput+0x8ba) [0x7f5aec2e17ba]
[    26.569] 12: /usr/bin/X (0x7f5aec250000+0x41d36) [0x7f5aec291d36]
[    26.569] 13: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xfd) [0x7f5aea2a1ead]
[    26.569] 14: /usr/bin/X (0x7f5aec250000+0x421ad) [0x7f5aec2921ad]
[    26.569] 
[    26.569] Segmentation fault at address 0xffffffffec84ebf2
[    26.569] 
Fatal server error:
[    26.569] Caught signal 11 (Segmentation fault). Server aborting
[    26.569] 
[    26.569] 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    26.569] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    26.569] 
[    26.576] Server terminated with error (1). Closing log file.
Comment 2 Ganesh Hegde 2012-06-02 07:08:55 CDT
can confirm this bug on Ubuntu 12.04 with xserver 1.12 as well... please provide a hotfix for this
Comment 3 Paweł Chmielowski 2012-06-02 14:39:46 CDT
I also see this same crash, and did a bit of debugging. It looks like fglrx driver on 64-bit systems stores only lower 32-bit of pointers when passing (pci_device *) to function from libpciaccess library like pci_device_map_legacy (upper 32-bits just contains garbage in that function call). I hacked libpciaccess to "fix" those pointers and i got this driver to work, so hopefully only that is wrong.
Comment 4 eleyinafei 2012-06-07 00:43:13 CDT
(In reply to comment #3)
> I also see this same crash, and did a bit of debugging. It looks like fglrx
> driver on 64-bit systems stores only lower 32-bit of pointers when passing
> (pci_device *) to function from libpciaccess library like pci_device_map_legacy
> (upper 32-bits just contains garbage in that function call). I hacked
> libpciaccess to "fix" those pointers and i got this driver to work, so
> hopefully only that is wrong.

I would very much appreciate it if you could elaborate on the steps you took to fix or patch the pointers.
Comment 5 Paweł Chmielowski 2012-06-07 06:30:04 CDT
(In reply to comment #4)
> I would very much appreciate it if you could elaborate on the steps you took to
> fix or patch the pointers.

It is just really ugly hack for libpciaccess: http://pastebin.com/swpDj4FD
Comment 6 eleyinafei 2012-06-07 18:30:12 CDT
(In reply to comment #5)
> (In reply to comment #4)
> > I would very much appreciate it if you could elaborate on the steps you took to
> > fix or patch the pointers.
> 
> It is just really ugly hack for libpciaccess: http://pastebin.com/swpDj4FD

Thanks a lot for the paste.bin.  I was wondering if you could explain a little more for a noob like me. I looked through what you had written.  I don't quire understand how to define FIX_DEV for myself since I don't know the pci_device_find_by_slot and I assume it'll be different for each system.  Could you please elaborate on how you found this?  I used lspci but it gives me this 01:00.0 which i assume to be pci_device_find_by_slot(0, 1, 0, 0) but how do i find out the register (0xffffffff00000000) and (0xffffffff).  Thanks again for taking the time.

- Ife
Comment 7 eleyinafei 2012-06-07 18:36:26 CDT
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > I would very much appreciate it if you could elaborate on the steps you took to
> > > fix or patch the pointers.
> > 
> > It is just really ugly hack for libpciaccess: http://pastebin.com/swpDj4FD
> 
> Thanks a lot for the paste.bin.  I was wondering if you could explain a little
> more for a noob like me. I looked through what you had written.  I don't quire
> understand how to define FIX_DEV for myself since I don't know the
> pci_device_find_by_slot and I assume it'll be different for each system.  Could
> you please elaborate on how you found this?  I used lspci but it gives me this
> 01:00.0 which i assume to be pci_device_find_by_slot(0, 1, 0, 0) but how do i
> find out the register (0xffffffff00000000) and (0xffffffff).  Thanks again for
> taking the time.
> 
> - Ife

Okay, I pulled this of lshw:
           *-display
                description: VGA compatible controller
                product: Madison [Radeon HD 5000M Series]
                vendor: Hynix Semiconductor (Hyundai Electronics)
                physical id: 0
                bus info: pci@0000:01:00.0
                version: 00
                width: 64 bits
                clock: 33MHz
                capabilities: vga_controller bus_master cap_list rom
                configuration: driver=fglrx_pci latency=0
                resources: irq:46 memory:c0000000-cfffffff memory:d8000000-d801ffff ioport:6000(size=256) memory:d8040000-d805ffff

how do i use it?  :-)
Comment 8 Paweł Chmielowski 2012-06-07 19:11:28 CDT
You shouldn't need to change anything in that patch, pci_device_find_by_slot is there only to get upper 32 bits from address of array where pci_device structures are stored. Just try to apply that patch to libpciaccess source, recompile, install and check if that works for you.
Comment 9 eleyinafei 2012-06-07 21:57:18 CDT
(In reply to comment #8)
> You shouldn't need to change anything in that patch, pci_device_find_by_slot is
> there only to get upper 32 bits from address of array where pci_device
> structures are stored. Just try to apply that patch to libpciaccess source,
> recompile, install and check if that works for you.

Thanks again.  I did apply the patch and recompiled.  However, I'm not getting .so files to build for libpciaccess.  Even when building from latest git source.  Builds fine though with no errors.  So am I not needing the .so files then or am I missing some build flags?
Comment 10 eleyinafei 2012-06-07 23:08:49 CDT
(In reply to comment #8)
> You shouldn't need to change anything in that patch, pci_device_find_by_slot is
> there only to get upper 32 bits from address of array where pci_device
> structures are stored. Just try to apply that patch to libpciaccess source,
> recompile, install and check if that works for you.

Thank you so so much Pawel.  I had to do a sudo make install and everything is working great.  I appreciate all your patience and help and thanks for sharing the patch too.  Have a good evening.
Comment 11 Manuel 2012-06-11 06:14:29 CDT
Thanks for the patch, Pawel. 
I was able to fix the same problem with a slight modification: My AMD Zacate E350 uses BusID 0:1:0 while the patch specifies 1:0:0 for the graphics device, and I had to manually copy the installed .so file to the /usr/lib/x84_64-linux-gnu folder (Debian multiarch specific). 
It's an ugly patch but it works for the time being. Hope the driver will be fixed sonn.
Comment 12 Paul Menzel 2012-06-17 17:07:27 CDT
Created attachment 501 [details]
binary difference

Paweł, thank you for your patch. Unfortunately I could not get it to work. Here is what I did.

I have the following integrated graphic chip <http://www.asrock.com/mb/overview.asp?Model=E350M1>.

        $ lspci # ASRock E350M1
        00:01.0 VGA compatible controller [0300]: ATI Technologies Inc Device [1002:9802]
        […]

Then I rebuild the Debian package.

        $ sudo aptitude install devscripts
        $ sudo aptitude build-dep libpciaccess0
        $ debcheckout libpciaccess0
        $ cd libpciaccess0
        $ # copy <http://pastebin.com/swpDj4FD> to file fglrx.patch
        $ vim fglrx.patch # change `pci_device_find_by_slot(0, 1, 0, 0)` to `pci_device_find_by_slot(0, 0, 1, 0)`
        $ patch -p1 < fglrx.patch
        $ dch # add entry to Debian changelog
        $ git commit -a
        $ dpkg-buildpackage -us -uc -B
        $ dpkg -i ../libpciaccess0….deb

But unfortunately after a restart the X server still crashes.

Comparing the old and the self-build libraries

        $ bsdiff \
        extracted/path/usr/lib/amd64-linux-gnu/libpciaccess.so.0.11.1 \
        /usr/lib/amd64-linux-gnu/libpciaccess.so.0.11.1
        binary.diff
        
I got the attached binary diff.

Can you point out my mistake please?
Comment 13 Paweł Chmielowski 2012-06-18 09:28:00 CDT
I don't see anything wrong with your scenario, maybe you have different copy of libpciaccess library in you system, and xserver uses it?
Comment 14 Paul Menzel 2012-06-18 10:41:42 CDT
(In reply to comment #13)
> I don't see anything wrong with your scenario, maybe you have different copy of
> libpciaccess library in you system, and xserver uses it?

I only used the package manager to install the patched libraries so the patched one should be used.

$ ldd /usr/bin/Xorg 
        linux-vdso.so.1 =>  (0x00007fff573ed000)
        libudev.so.0 => /lib/x86_64-linux-gnu/libudev.so.0 (0x00007f0dbcc4f000)
        libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007f0dbc9d1000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0dbc7cc000)
        libpciaccess.so.0 => /usr/lib/x86_64-linux-gnu/libpciaccess.so.0 (0x00007f0dbc5c2000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0dbc3a6000)
        libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f0dbc11f000)
        libXfont.so.1 => /usr/lib/libXfont.so.1 (0x00007f0dbbee2000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f0dbbcdf000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f0dbbad9000)
        libaudit.so.0 => /lib/libaudit.so.0 (0x00007f0dbb8c1000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0dbb63f000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0dbb436000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0dbb0af000)
        libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f0dbaeac000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0dbd278000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0dbac94000)
        libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f0dba9f5000)
        libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f0dba7e5000)
        libfontenc.so.1 => /usr/lib/x86_64-linux-gnu/libfontenc.so.1 (0x00007f0dba5dd000)
$ ls -lh /usr/lib/x86_64-linux-gnu/libpciaccess.so.0{,.11.1}
lrwxrwxrwx 1 root root  22 Jun 17 15:21 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0 -> libpciaccess.so.0.11.1
-rw-r--r-- 1 root root 39K Jun 17 15:21 /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.1

Very strange.
Comment 15 Paul Menzel 2012-06-18 10:45:23 CDT
(In reply to comment #14)
> (In reply to comment #13)
> > I don't see anything wrong with your scenario, maybe you have different copy of
> > libpciaccess library in you system, and xserver uses it?
> 
> I only used the package manager to install the patched libraries so the patched
> one should be used.
> 
> $ ldd /usr/bin/Xorg 
>         linux-vdso.so.1 =>  (0x00007fff573ed000)
>         libudev.so.0 => /lib/x86_64-linux-gnu/libudev.so.0 (0x00007f0dbcc4f000)
>         libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11
> (0x00007f0dbc9d1000)
>         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0dbc7cc000)
>         libpciaccess.so.0 => /usr/lib/x86_64-linux-gnu/libpciaccess.so.0
> (0x00007f0dbc5c2000)
>         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> (0x00007f0dbc3a6000)
>         libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0
> (0x00007f0dbc11f000)
>         libXfont.so.1 => /usr/lib/libXfont.so.1 (0x00007f0dbbee2000)
>         libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6
> (0x00007f0dbbcdf000)
>         libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
> (0x00007f0dbbad9000)
>         libaudit.so.0 => /lib/libaudit.so.0 (0x00007f0dbb8c1000)
>         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0dbb63f000)
>         librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0dbb436000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0dbb0af000)
>         libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0
> (0x00007f0dbaeac000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007f0dbd278000)
>         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0dbac94000)
>         libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6
> (0x00007f0dba9f5000)
>         libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0
> (0x00007f0dba7e5000)
>         libfontenc.so.1 => /usr/lib/x86_64-linux-gnu/libfontenc.so.1
> (0x00007f0dba5dd000)
> $ ls -lh /usr/lib/x86_64-linux-gnu/libpciaccess.so.0{,.11.1}
> lrwxrwxrwx 1 root root  22 Jun 17 15:21
> /usr/lib/x86_64-linux-gnu/libpciaccess.so.0 -> libpciaccess.so.0.11.1
> -rw-r--r-- 1 root root 39K Jun 17 15:21
> /usr/lib/x86_64-linux-gnu/libpciaccess.so.0.11.1
> 
> Very strange.

Looking at thebacktrace it looks a bit different though now.

[     6.091] Backtrace:
[     6.093] 0: /usr/bin/X11/X (xorg_backtrace+0x36) [0x7f124070d796]
[     6.093] 1: /usr/bin/X11/X (0x7f124058f000+0x1822b9) [0x7f12407112b9]
[     6.093] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f123f8b6000+0xf030) [0x7f123f8c5030]
[     6.093] 3: /usr/lib/x86_64-linux-gnu/libpciaccess.so.0 (0x7f123fad2000+0x5fd0) [0x7f123fad7fd0]
[     6.093] 4: /usr/lib/x86_64-linux-gnu/libpciaccess.so.0 (pci_legacy_open_io+0x8f) [0x7f123fad617f]
[     6.093] 5: /usr/lib/xorg/modules/libvgahw.so (vgaHWSetStdFuncs+0x167) [0x7f123b69c7e7]
[     6.094] 6: /usr/lib/xorg/modules/drivers/fglrx_drv.so (xdl_xs112_atiddxPreInit+0x3c1) [0x7f123be2f431]
[     6.094] 7: /usr/bin/X11/X (InitOutput+0x8ba) [0x7f12406207ba]
[     6.094] 8: /usr/bin/X11/X (0x7f124058f000+0x41d36) [0x7f12405d0d36]
[     6.094] 9: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xfd) [0x7f123e5e0ead]
[     6.094] 10: /usr/bin/X11/X (0x7f124058f000+0x421ad) [0x7f12405d11ad]
[     6.094]
[     6.094] Segmentation fault at address 0x41fdc742
[     6.094] 
Fatal server error:
[     6.094] Caught signal 11 (Segmentation fault). Server aborting
Comment 16 Paul Menzel 2012-06-18 16:39:45 CDT
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #13)
> > > I don't see anything wrong with your scenario, maybe you have different copy of
> > > libpciaccess library in you system, and xserver uses it?
> > 
> > I only used the package manager to install the patched libraries so the patched
> > one should be used.

[…]

> Looking at thebacktrace it looks a bit different though now.
> 
> [     6.091] Backtrace:
> [     6.093] 0: /usr/bin/X11/X (xorg_backtrace+0x36) [0x7f124070d796]
> [     6.093] 1: /usr/bin/X11/X (0x7f124058f000+0x1822b9) [0x7f12407112b9]
> [     6.093] 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f123f8b6000+0xf030)
> [0x7f123f8c5030]
> [     6.093] 3: /usr/lib/x86_64-linux-gnu/libpciaccess.so.0
> (0x7f123fad2000+0x5fd0) [0x7f123fad7fd0]
> [     6.093] 4: /usr/lib/x86_64-linux-gnu/libpciaccess.so.0
> (pci_legacy_open_io+0x8f) [0x7f123fad617f]
> [     6.093] 5: /usr/lib/xorg/modules/libvgahw.so (vgaHWSetStdFuncs+0x167)
> [0x7f123b69c7e7]
> [     6.094] 6: /usr/lib/xorg/modules/drivers/fglrx_drv.so
> (xdl_xs112_atiddxPreInit+0x3c1) [0x7f123be2f431]
> [     6.094] 7: /usr/bin/X11/X (InitOutput+0x8ba) [0x7f12406207ba]
> [     6.094] 8: /usr/bin/X11/X (0x7f124058f000+0x41d36) [0x7f12405d0d36]
> [     6.094] 9: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xfd)
> [0x7f123e5e0ead]
> [     6.094] 10: /usr/bin/X11/X (0x7f124058f000+0x421ad) [0x7f12405d11ad]
> [     6.094]
> [     6.094] Segmentation fault at address 0x41fdc742
> [     6.094] 
> Fatal server error:
> [     6.094] Caught signal 11 (Segmentation fault). Server aborting

Turns out I forgot to adapt the PCI ID in `src/common_io.c`. Now it works. I am sorry for the noise and Paweł thank you very much!
Comment 17 rechapita 2012-06-29 19:09:44 CDT
issue is still pressent on 12.6 final
Comment 18 Paul Menzel 2012-06-30 02:39:05 CDT
(In reply to comment #17)
> issue is still pressent on 12.6 final

I can confirme this too after upgrading the Debian package to 12.6 final and removing the libpciaccess0 hack. With the libpciaccess0 hack the X server does not crash anymore.
Comment 19 Guillermo Marcus 2012-07-06 08:27:25 CDT
I can confirm this. Debian wheezy with 12.6 final does not work (segfaults), with the patch it does work.
Comment 20 Carlos Torrealba 2012-07-22 12:39:49 CDT
Hi I'm new, I read a bit like applying this patch but something is wrong, this is what I'm doing:
Download the source-0.13.1 libpciaccess
Download the patch from pastebin
I copy the patch in the folder libpciaccess-0-13-1/src/
run $ patch < swpDj4FD.txt
result:
(Stripping trailing CRs from patch.)
patching file common_interface.c
(Stripping trailing CRs from patch.)
patching file common_io.c
patch unexpectedly ends in middle of line
Hunk # 4 succeeded at 133 with fuzz 2.

My system is:
Debian Wheezy
Kernel 3.2.0-2-amd64
I would appreciate any help.
Comment 21 Paul Menzel 2012-07-22 13:17:23 CDT
(In reply to comment #20)
> Hi I'm new, I read a bit like applying this patch but something is wrong, this
> is what I'm doing:

[…]

> I would appreciate any help.

Since you are using Debian please follow the steps as outlined in Debian bug report 677667 [1].

If you encounter any errors please *paste* exactly what commands you executed and what the result was.

Good luck!


[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677667#30
Comment 22 Carlos Torrealba 2012-07-22 19:18:14 CDT
(In reply to comment #21)
> (In reply to comment #20)
> > Hi I'm new, I read a bit like applying this patch but something is wrong, this
> > is what I'm doing:
> 
> […]
> 
> > I would appreciate any help.
> 
> Since you are using Debian please follow the steps as outlined in Debian bug
> report 677667 [1].
> 
> If you encounter any errors please *paste* exactly what commands you executed
> and what the result was.
> 
> Good luck!
> 
> 
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677667#30

Thank you very much friend, the patch was installed correctly by following the steps shown in the link [1].

For my particular case did not need to change the "pci_device_find_by_slot",and understanding the message "Stripping trailing CRs from patch" is not a mistake, and can be ignored.

I leave a little recipe that worked for me:
Uninstall all traces of the proprietary driver.
Compiling the "libpciaccess0" [1]
Install the proprietary driver
Reboot

Thanks for everything =)
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677667#30

PD: Sorry for my bad English this post was written using google translator XD
Comment 23 András Jónyer 2013-05-17 03:35:45 CDT
Hi!
I have tried patch libpciaccess package. I could apply the patch, but when I typed the last command "dpkg-buildpackage -us -uc -B", the system starts the compiling, then exit with errors. Here is my output:

$ dpkg-buildpackage  -us -uc -B
dpkg-buildpackage: source package libpciaccess
dpkg-buildpackage: source version 0.13.1-2
dpkg-buildpackage: source changed by Jónyer András <andris@Shellby>
dpkg-buildpackage: host architecture i386
 dpkg-source --before-build libpciaccess0
 debian/rules clean
dh clean --with autoreconf,quilt --builddirectory=build/ --parallel
   dh_testdir -O--builddirectory=build/ -O--parallel
   dh_auto_clean -O--builddirectory=build/ -O--parallel
   dh_autoreconf_clean -O--builddirectory=build/ -O--parallel
   dh_quilt_unpatch -O--builddirectory=build/ -O--parallel
Removing patch FreeBSD-implement-map_legacy-and-legacy_io.patch
Restoring src/freebsd_pci.c

No patches applied
   dh_clean -O--builddirectory=build/ -O--parallel
 debian/rules build
dh build --with autoreconf,quilt --builddirectory=build/ --parallel
   dh_testdir -O--builddirectory=build/ -O--parallel
   dh_autoreconf -O--builddirectory=build/ -O--parallel
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
configure.ac:32: installing `./missing'
scanpci/Makefile.am: installing `./depcomp'
   dh_quilt_patch -O--builddirectory=build/ -O--parallel
Applying patch FreeBSD-implement-map_legacy-and-legacy_io.patch
patching file src/freebsd_pci.c

Now at patch FreeBSD-implement-map_legacy-and-legacy_io.patch
   debian/rules override_dh_auto_configure
make[1]: Entering directory `/home/andris/Asztal/lib/libpciaccess0'
dh_auto_configure -- \
		--with-pciids-path=\${prefix}/share/misc \
		--with-zlib \
		CFLAGS="-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 805306365
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc option to accept ISO C99... -std=gnu99
checking whether __clang__ is declared... no
checking whether __INTEL_COMPILER is declared... no
checking whether __SUNPRO_C is declared... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking if gcc -std=gnu99 supports -Werror=unknown-warning-option... no
checking if gcc -std=gnu99 supports -Werror=unused-command-line-argument... no
checking if gcc -std=gnu99 supports-Wall... yes
checking if gcc -std=gnu99 supports-Wpointer-arith... yes
checking if gcc -std=gnu99 supports-Wmissing-declarations... yes
checking if gcc -std=gnu99 supports-Wformat=2... yes
checking if gcc -std=gnu99 supports-Wstrict-prototypes... yes
checking if gcc -std=gnu99 supports-Wmissing-prototypes... yes
checking if gcc -std=gnu99 supports-Wnested-externs... yes
checking if gcc -std=gnu99 supports-Wbad-function-cast... yes
checking if gcc -std=gnu99 supports-Wold-style-definition... yes
checking if gcc -std=gnu99 supports-Wdeclaration-after-statement... yes
checking if gcc -std=gnu99 supports-Wunused... yes
checking if gcc -std=gnu99 supports-Wuninitialized... yes
checking if gcc -std=gnu99 supports-Wshadow... yes
checking if gcc -std=gnu99 supports-Wcast-qual... yes
checking if gcc -std=gnu99 supports-Wmissing-noreturn... yes
checking if gcc -std=gnu99 supports-Wmissing-format-attribute... yes
checking if gcc -std=gnu99 supports-Wredundant-decls... yes
checking if gcc -std=gnu99 supports-Werror=implicit... yes
checking if gcc -std=gnu99 supports-Werror=nonnull... yes
checking if gcc -std=gnu99 supports-Werror=init-self... yes
checking if gcc -std=gnu99 supports-Werror=main... yes
checking if gcc -std=gnu99 supports-Werror=missing-braces... yes
checking if gcc -std=gnu99 supports-Werror=sequence-point... yes
checking if gcc -std=gnu99 supports-Werror=return-type... yes
checking if gcc -std=gnu99 supports-Werror=trigraphs... yes
checking if gcc -std=gnu99 supports-Werror=array-bounds... yes
checking if gcc -std=gnu99 supports-Werror=write-strings... yes
checking if gcc -std=gnu99 supports-Werror=address... yes
checking if gcc -std=gnu99 supports-Werror=int-to-pointer-cast... yes
checking if gcc -std=gnu99 supports-Werror=pointer-to-int-cast... yes
checking if gcc -std=gnu99 supports-pedantic... yes
checking if gcc -std=gnu99 supports-Werror... yes
checking if gcc -std=gnu99 supports-Werror=attributes... yes
checking whether make supports nested variables... yes
checking for gzopen in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking asm/mtrr.h usability... yes
checking asm/mtrr.h presence... yes
checking for asm/mtrr.h... yes
checking for struct pci_io.pi_sel.pc_domain... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating man/Makefile
config.status: creating src/Makefile
config.status: creating scanpci/Makefile
config.status: creating pciaccess.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Leaving directory `/home/andris/Asztal/lib/libpciaccess0'
   dh_auto_build -O--builddirectory=build/ -O--parallel
make[1]: Entering directory `/home/andris/Asztal/lib/libpciaccess0/build'
make  all-recursive
make[2]: Entering directory `/home/andris/Asztal/lib/libpciaccess0/build'
Making all in include
make[3]: Entering directory `/home/andris/Asztal/lib/libpciaccess0/build/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/andris/Asztal/lib/libpciaccess0/build/include'
Making all in man
make[3]: Entering directory `/home/andris/Asztal/lib/libpciaccess0/build/man'
  GEN    scanpci.1
make[3]: Leaving directory `/home/andris/Asztal/lib/libpciaccess0/build/man'
Making all in src
make[3]: Entering directory `/home/andris/Asztal/lib/libpciaccess0/build/src'
  CC     common_bridge.lo
  CC     common_iterator.lo
  CC     common_init.lo
../../src/common_init.c: In function 'pci_system_cleanup':
../../src/common_init.c:101:3: warning: 'pci_device_unmap_region' is deprecated (declared at ../../include/pciaccess.h:88) [-Wdeprecated-declarations]
../../src/common_init.c:104:12: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
../../src/common_init.c:105:12: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
  CC     common_interface.lo
../../src/common_interface.c: In function 'pci_device_read_rom':
../../src/common_interface.c:109:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:109:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_is_boot_vga':
../../src/common_interface.c:126:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:126:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_has_kernel_driver':
../../src/common_interface.c:142:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:142:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_probe':
../../src/common_interface.c:167:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:167:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_map_region':
../../src/common_interface.c:196:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:196:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_map_range':
../../src/common_interface.c:263:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:263:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c:264:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
../../src/common_interface.c: In function 'pci_device_unmap_region':
../../src/common_interface.c:359:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:359:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_unmap_range':
../../src/common_interface.c:421:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:421:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c:422:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
../../src/common_interface.c: In function 'pci_device_cfg_read':
../../src/common_interface.c:497:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:497:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_cfg_read_u8':
../../src/common_interface.c:509:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:509:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c:510:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
../../src/common_interface.c: In function 'pci_device_cfg_read_u16':
../../src/common_interface.c:525:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:525:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c:526:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
../../src/common_interface.c: In function 'pci_device_cfg_read_u32':
../../src/common_interface.c:542:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:542:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c:543:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
../../src/common_interface.c: In function 'pci_device_cfg_write':
../../src/common_interface.c:588:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:588:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_cfg_write_u8':
../../src/common_interface.c:600:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:600:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c:601:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
../../src/common_interface.c: In function 'pci_device_cfg_write_u16':
../../src/common_interface.c:618:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:618:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c:619:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
../../src/common_interface.c: In function 'pci_device_cfg_write_u32':
../../src/common_interface.c:636:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:636:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c:637:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
../../src/common_interface.c: In function 'pci_device_cfg_write_bits':
../../src/common_interface.c:655:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:655:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_enable':
../../src/common_interface.c:674:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:674:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_map_legacy':
../../src/common_interface.c:701:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:701:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
../../src/common_interface.c: In function 'pci_device_unmap_legacy':
../../src/common_interface.c:721:3: warning: cast from function call of type 'struct pci_device *' to non-matching type 'unsigned int' [-Wbad-function-cast]
../../src/common_interface.c:721:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
cc1: some warnings being treated as errors
make[3]: *** [common_interface.lo] Error 1
make[3]: Leaving directory `/home/andris/Asztal/lib/libpciaccess0/build/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/andris/Asztal/lib/libpciaccess0/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/andris/Asztal/lib/libpciaccess0/build'
dh_auto_build: make -j1 returned exit code 2
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2


How can I fix these errors?

Thanks, for your help!

Andrew
Comment 24 Michael Cronenworth 2013-08-14 11:05:57 CDT
This message is a reminder that your bug is marked as Catalyst 12.6.

The current legacy Catalyst version is 13.1.
The current Catalyst version is 13.4.
The current Catalyst beta version is 13.8.

Approximately 7 days from now the Bugzilla administrator will be removing the 12.6 version. At that time your bug will be CLOSED as WONTFIX.

Bug Reporter: Thank you for reporting this issue. However, the Bugzilla administrator provides this as a unofficial, free service to AMD customers, and I like to keep my systems neat and tidy. If you would like to keep your bug from being closed, please try a new Catalyst version and update the 'version' field if the issue still occurs.

If you are unable to update the version, please make a comment and someone will change it for you.
Comment 25 Michael Cronenworth 2013-08-22 13:57:26 CDT
This bug is being closed due to the 'version' being 12.6 after 7 days of the previous closure notice.

Thank you for your bug report.