Date: Tue, 23 Aug 2016 06:59:02 +0000 From: bugzilla-noreply@freebsd.org To: x11@FreeBSD.org Subject: [Bug 211418] x11-drivers/xf86-video-vesa: X11 fails to start; vesa_drv.so Undefined symbol "ioBase" Message-ID: <bug-211418-7141-g2Epx5Kbtx@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-211418-7141@https.bugs.freebsd.org/bugzilla/> References: <bug-211418-7141@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211418 --- Comment #1 from Damon Zwolinski <freebsd@g3os.org> --- I'm still stuck but I tried to make some progress on my own. Right now I'm thinking an include is missing or something similar to that. I reinstalled 10.3, changed my /etc/make.conf to: 1 DEVELOPER=3Dyes 2=20 3 WITH_CTF=3D1 4 WITH_DEBUG=3Dyes and rebuilt x11 ports (xorg-server, xauth, xinit, xf86-video-vesa, jwm). I still see the same issue but I at least have debugging symbols now. 1) Does objdump verify that ioBase is in fact defined or not? When I do: cd /usr/local/lib/xorg/modules/drivers objdump --dynamic-syms vesa_drv.so I can see ioBase is undefined=20 122 00000000 D *UND* 00000000 VBEBankSwitch 123 00007c1c g DF .text 0000000c Base _restgpr_30 124 00007b90 g DF .text 0000004c Base _restfpr_14 125 00007bf0 g DF .text 00000038 Base _restgpr_19 126 00000000 D *UND* 00000000 xf86DPMSInit 127 00000000 D *UND* 00000000 miGetDefaultVisualMask 128 00000000 D *UND* 00000000 ioBase 129 00007b1c g DF .text 00000028 Base _savefpr_23 130 00007b2c g DF .text 00000018 Base _savefpr_27 131 00007b58 g DF .text 00000038 Base _savegpr_19 132 00007bc4 g DF .text 00000018 Base _restfpr_27 133 00007c10 g DF .text 00000018 Base _restgpr_27 134 00007cb4 g DF .text 00000024 Base _restgpr_27_x I know a little bit of C but I'm pretty much out of my depth here. I'm guessing that the error message is right and .so really doesn't have ioBase defined or what's calling it needs to know about ioBase but it doesn't.=20 http://www.sourceware.org/binutils/docs/binutils/objdump.html says UND means the symbol is referenced but not defined here. I see it defined in /usr/ports/x11-drivers/xf86-video-vesa/work/xf86-video-vesa-2.3.4/src/vesa.= h: 80 typedef struct _VESARec 81 { 82 vbeInfoPtr pVbe; 83 EntityInfoPtr pEnt; 84 CARD16 major, minor; ... 112 Bool accessEnabled; 113 OptionInfoPtr Options; 114 unsigned long ioBase; 115 Bool ModeSetClearScreen; 116 void *shadow; 117 ShadowUpdateProc update; 118 ShadowWindowProc window; 119 } VESARec, *VESAPtr; and vesa.c includes it. 2) How can I see what loads vesa_drv.so get in gdb? I know I can do ldd to see the libraries a binary links to. So that a conf= ig can be used to set the driver, I know I won't see vesa_drv.so when I look at xorg: $ ldd /usr/local/bin/Xorg /usr/local/bin/Xorg: libcrypto.so.7 =3D> /lib/libcrypto.so.7 (0x41b3b000) libpciaccess.so.0 =3D> /usr/local/lib/libpciaccess.so.0 (0x41cfd000) libdrm.so.2 =3D> /usr/local/lib/libdrm.so.2 (0x41d17000) libpixman-1.so.0 =3D> /usr/local/lib/libpixman-1.so.0 (0x41d28000) libXfont.so.1 =3D> /usr/local/lib/libXfont.so.1 (0x41fa9000) libXau.so.6 =3D> /usr/local/lib/libXau.so.6 (0x4200e000) libxshmfence.so.1 =3D> /usr/local/lib/libxshmfence.so.1 (0x42022000) libXdmcp.so.6 =3D> /usr/local/lib/libXdmcp.so.6 (0x42035000) librpcsvc.so.5 =3D> /usr/lib/librpcsvc.so.5 (0x4204c000) libm.so.5 =3D> /lib/libm.so.5 (0x42065000) libc.so.7 =3D> /lib/libc.so.7 (0x4209b000) libthr.so.3 =3D> /lib/libthr.so.3 (0x42234000) libfreetype.so.6 =3D> /usr/local/lib/libfreetype.so.6 (0x4226b000) libz.so.6 =3D> /lib/libz.so.6 (0x42359000) libfontenc.so.1 =3D> /usr/local/lib/libfontenc.so.1 (0x4237d000) libbz2.so.4 =3D> /usr/lib/libbz2.so.4 (0x42396000) I can't do the reverse though and see what loads a library. I installed gdb 7.10. But I don't see how to step into the code that tries to load vesa_drv.so. I basically get one line of code to execute and that's not helpful at all: # gdb710 --tui --args Xorg -conf /root/xorg.conf.new =20=20 =E2=94=8C=E2=94=80=E2=94=80stubmain.c=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=90 =E2=94=8226 int dix_main(int argc, char *argv[], char *envp[]);=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =E2=94=82 =E2=94=8227=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 =E2=94=82 =E2=94=8228 /*=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =E2=94=82 =E2=94=8229 A default implementation of main, which can be overri= dden by the DDX =E2=94=82 =E2=94=8230 */=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =E2=94=82 =E2=94=8231 int=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =E2=94=82 =E2=94=8232 main(int argc, char *argv[], char *envp[])=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =E2=94=82 =E2=94=8233 {=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =E2=94=82 =E2=94=8234 return dix_main(argc, argv, envp);=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =E2=94=82 =E2=94=8235 }=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =E2=94=82 =20=20 =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=90 =E2=94=820x181c518 <main> stwu r1,-32(r1)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 =E2=94=82 =E2=94=820x181c51c <main+4> mflr r0=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 =E2=94=82 =E2=94=820x181c520 <main+8> stw r31,24(r1)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 =E2=94=82 =E2=94=820x181c524 <main+12> stw r0,36(r1)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 =E2=94=82 =E2=94=820x181c528 <main+16> mr r31,r1=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =E2=94=82 =E2=94=820x181c52c <main+20> stw r3,8(r31)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 =E2=94=82 =E2=94=820x181c530 <main+24> stw r4,12(r31)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 =E2=94=82 =E2=94=820x181c534 <main+28> stw r5,16(r31)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 =E2=94=82 =E2=94=820x181c538 <main+32> lwz r3,8(r31)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 =E2=94=82 =E2=94=820x181c53c <main+36> lwz r4,12(r31)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 =E2=94=82 =E2=94=820x181c540 <main+40> lwz r5,16(r31)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 =E2=94=82=20=20 =20=20 =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=98 exec No process In:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 L?? PC: ??=20 and "show warranty" for details. This GDB was configured as "powerpc-portbld-freebsd10.3". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from Xorg...done. (gdb) start Temporary breakpoint 1 at 0x181c538: file stubmain.c, line 34. Starting program: /usr/local/bin/Xorg -conf /root/xorg.conf.new Temporary breakpoint 1, main (argc=3D3, argv=3D0xffffd840, envp=3D0xffffd85= 0) at stubmain.c:34 (gdb) n [Inferior 1 (process 73001) exited with code 01] (gdb)=20 This video has some things I haven't tried so I'll give that a shot: https://youtu.be/713ay4bZUrw?t=3D43m. 3) I can use truss where I can see the error happen but I'd really like to = see the code: # truss -fo truss-xorg-conf-root-xorg-new Xorg -config /root/xorg.conf.new 478 73041: stat("/usr/local/lib/xorg/modules/drivers/vesa_drv.so",{ mode=3D-rwxr-xr-x ,inode=3D2411937,size=3D92916,blksize=3D32768 }) =3D 0 (0= x0) 479 73041: stat("/usr/local/lib/xorg/modules/drivers/fbdev_drv.so",{ mode=3D-rwxr-xr-x ,inode=3D2412710,size=3D73167,blksize=3D32768 }) =3D 0 (0= x0) 480 73041: getdirentries(0x4,0x42880000,0x1000,0x4287f084) =3D 0 (0x0) 481 73041: close(4) =3D 0 (0x0) 482 73041: write(2,"List of video drivers:\n",23) =3D 23 (0x17) 483 73041: clock_gettime(4,{ 20379.720870973 }) =3D 0 (0x0) 484 73041: write(0,"[ 20379.720] ",13) =3D 13 (0xd) 485 73041: write(0,"List of video drivers:\n",23) =3D 23 (0x17) 486 73041: write(2,"\tvesa\n",6) =3D 6 (0x6) 487 73041: clock_gettime(4,{ 20379.722989227 }) =3D 0 (0x0) 488 73041: write(0,"[ 20379.722] ",13) =3D 13 (0xd) 489 73041: write(0,"\tvesa\n",6) =3D 6 (0x6) 490 73041: write(2,"\tfbdev\n",7) =3D 7 (0x7) 491 73041: clock_gettime(4,{ 20379.724856510 }) =3D 0 (0x0) 492 73041: write(0,"[ 20379.724] ",13) =3D 13 (0xd) 493 73041: write(0,"\tfbdev\n",7) =3D 7 (0x7) 494 73041: write(2,"\tmodesetting\n",13) =3D 13 (0xd) 495 73041: clock_gettime(4,{ 20379.726715322 }) =3D 0 (0x0) 496 73041: write(0,"[ 20379.726] ",13) =3D 13 (0xd) 497 73041: write(0,"\tmodesetting\n",13) =3D 13 (0xd) 498 73041: clock_gettime(4,{ 20379.727474425 }) =3D 0 (0x0) 499 73041: write(0,"[ 20379.727] ",13) =3D 13 (0xd) 500 73041: write(0,"(II) LoadModule: "vesa"",23) =3D 23 (0x17) 501 73041: write(0,"\n",1) =3D 1 (0x1) 502 73041: open("/usr/local/lib/xorg/modules/freebsd/",O_NONBLOCK|O_DIRECTORY|O_CLOEXE= C,01) ERR#2 'No such file or directory' 503 73041: open("/usr/local/lib/xorg/modules/",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,01) = =3D 4 (0x4) 504 73041: fstatfs(4,{ fstypename=3Dufs,mntonname=3D/,mntfromname=3D/dev/ada0s3,fsid=3D57b68b44ee2= d35c7 }) =3D 0 (0x0) 505 73041: getdirentries(0x4,0x42880000,0x1000,0x4287f0b4) =3D 276 (0x114) 506 73041: stat("/usr/local/lib/xorg/modules/drivers/",{ mode=3Ddrwxr-xr-x ,inode=3D2412429,size=3D512,blksize=3D32768 }) =3D 0 (0x0) 507 73041: open("/usr/local/lib/xorg/modules/drivers/",O_NONBLOCK|O_DIRECTORY|O_CLOEXE= C,00) =3D 5 (0x5) 508 73041: fstatfs(5,{ fstypename=3Dufs,mntonname=3D/,mntfromname=3D/dev/ada0s3,fsid=3D57b68b44ee2= d35c7 }) =3D 0 (0x0) 509 73041: getdirentries(0x5,0x42881000,0x1000,0x4287f0e4) =3D 96 (0x60) 510 73041: stat("/usr/local/lib/xorg/modules/drivers/modesetting_drv.so/",0xffffc898) ERR#20 'Not a directory' 511 73041: stat("/usr/local/lib/xorg/modules/drivers/vesa_drv.so/",0xffffc8= 98) ERR#20 'Not a directory' 512 73041: close(5) =3D 0 (0x0) 513 73041: close(4) =3D 0 (0x0) 514 73041: clock_gettime(4,{ 20379.731177120 }) =3D 0 (0x0) 515 73041: write(0,"[ 20379.731] ",13) =3D 13 (0xd) 516 73041: write(0,"(II) Loading /usr/local/lib/xorg"...,61) =3D 61 (0x3d) 517 73041: __sysctl(0xffffcb44,0x2,0x41b30d80,0xffffcb4c,0x0,0x0) =3D 0 (0x= 0) 518 73041: __sysctl(0xffffcb44,0x2,0x41b30e80,0xffffcb4c,0x0,0x0) =3D 0 (0x= 0) 519 73041: __sysctl(0xffffcb44,0x2,0x41b30f80,0xffffcb4c,0x0,0x0) =3D 0 (0x= 0) 520 73041: __sysctl(0xffffcb44,0x2,0x41b31080,0xffffcb4c,0x0,0x0) =3D 0 (0x= 0) 521 73041: __sysctl(0xffffcb44,0x2,0x41b31180,0xffffcb4c,0x0,0x0) =3D 0 (0x= 0) 522 73041: openat(AT_FDCWD,"/usr/local/lib/xorg/modules/drivers/vesa_drv.so",O_CLOEXEC= ,00) =3D 4 (0x4) 523 73041: fstat(4,{ mode=3D-rwxr-xr-x ,inode=3D2411937,size=3D92916,blksiz= e=3D32768 }) =3D 0 (0x0) 524 73041: mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,4,0x0) =3D 1102221312 (0x41b29000) 525 73041: mmap(0x0,102400,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0= ) =3D 1111265280 (0x423c9000) 526 73041: mmap(0x423c9000,36864,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|= MAP_PREFAULT_READ,4,0x0) =3D 1111265280 (0x423c9000) 527 73041: mmap(0x423e1000,4096,PROT_READ|PROT_WRITE|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|M= AP_PREFAULT_READ,4,0x8000) =3D 1111363584 (0x423e1000) 528 73041: munmap(0x41b29000,4096) =3D 0 (0x0) 529 73041: close(4) =3D 0 (0x0) 530 73041: munmap(0x423c9000,102400) =3D 0 (0x0) 531 73041: clock_gettime(4,{ 20379.735593770 }) =3D 0 (0x0) 532 73041: write(0,"[ 20379.735] ",13) =3D 13 (0xd) 533 73041: write(0,"(EE) Failed to load /usr/local/l"...,144) =3D 144 (0x90) 534 73041: clock_gettime(4,{ 20379.736342239 }) =3D 0 (0x0) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211418-7141-g2Epx5Kbtx>