Bug 265702 - x11-drivers/xf86-video-vesa: Undefined symbol "xf86SlowBcopy"
Summary: x11-drivers/xf86-video-vesa: Undefined symbol "xf86SlowBcopy"
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: Normal Affects Many People
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-08 04:51 UTC by Lena
Modified: 2022-09-05 08:41 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments
existing patch with my addition (2.07 KB, patch)
2022-08-08 15:48 UTC, Lena
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lena 2022-08-08 04:51:22 UTC
FreeBSD 12.3-RELEASE-p5 amd64.
After xorg-server upgrade from -1.20.14 to -21.1.4 using pkg.freebsd.org latest:

ld-elf.so.1: /usr/local/lib/xorg/modules/drivers/vesa_drv.so: Undefined symbol "xf86SlowBcopy"
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Comment 1 Lena 2022-08-08 09:18:56 UTC
The lacking function xf86SlowBcopy should be (but isn't) in the binary
/usr/local/libexec/Xorg installed by port xorg-server-21.1.4 .
`readelf` shows it in the file
/usr/local/bin/Xorg installed by port xorg-server-1.20.14 :

xorg-server-1.20.14:
 $ readelf -a /usr/local/bin/Xorg | grep -i slow
  1137: 0000000000305ff0    13 FUNC    GLOBAL DEFAULT   14 xf86SetReallySlowBcopy
  1644: 0000000000306000   224 FUNC    GLOBAL DEFAULT   14 xf86SlowBcopy
xorg-server-21.1.4 (from package from pkg.freebsd.org latest):
/home/lena/aa/usr/local/libexec $ readelf -a Xorg | grep -i slow
/home/lena/aa/usr/local/libexec $ readelf -a Xorg | grep -i xf86 | head -n 5
   430: 00000000003ecc20   194 FUNC    GLOBAL DEFAULT   14 xf86ClaimPciSlot
   432: 00000000003dd3c0   214 FUNC    GLOBAL DEFAULT   14 xf86RandRSetNewVirtualAndDimensions
   436: 0000000000401970    48 FUNC    GLOBAL DEFAULT   14 xf86_crtc_hide_cursor
   439: 00000000003d0000   126 FUNC    GLOBAL DEFAULT   14 xf86RemoveInputHandler
   443: 000000000046440c     4 OBJECT  GLOBAL DEFAULT   26 xf86AllowMouseOpenFail

xorg-server distfiles contain unchanged source of the xf86SlowBcopy function in
hw/xfree86/os-support/misc
Comment 2 Lena 2022-08-08 15:48:04 UTC
Created attachment 235779 [details]
existing patch with my addition

While upgrading xorg-server from -1.20.14 to -21.1.4, the build
was switched from automake to meson.
In the distfile for xorg-server-21.1.4
in the directory hw/xfree86/os-support
the file Makefile.am contains:

SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS)

(to build subdirectory "misc" containing SlowBcopy unconditionally),
and in the same directory the file meson.build contains:

if host_machine.system() == 'linux'
    srcs_xorg_os_support += [
        'linux/lnx_bell.c',
        'linux/lnx_init.c',
        'linux/lnx_kmod.c',
        'linux/lnx_platform.c',
        'linux/lnx_video.c',
        'misc/SlowBcopy.c',
        'shared/VTsw_usl.c',
    ]

(to build misc/SlowBcopy conditionally: linux only).

The port xorg-server-21.1.4 in the subdirectory "files" contains
patch-hw_xfree86_os-support_meson.build
I wrote an addition to that patch. I'm not sure whether I did that correctly,
but works for me (amd64). I'm attaching the patch with my addition.
Comment 3 Ronald Klop 2022-08-20 12:24:09 UTC
I experienced the same problem with vboxvideo_drv.so.
It resulted in a black screen which made it hard to find the cause. Luckily this issue was at the top of my google search. :-)

Your patch solved it for me.
Thanks.
Comment 4 chris 2022-09-01 14:42:16 UTC
(In reply to Ronald Klop from comment #3)
Does anyone know if there is any progress as far as integrating this fix into the ports tree? Thanks.
Comment 5 Felix Palmen freebsd_committer freebsd_triage 2022-09-01 16:05:36 UTC
(In reply to Lena from comment #2)
Maybe I'm overlooking something... why is this source file only added for x86 archs?
Comment 6 Lena 2022-09-01 16:08:45 UTC
(In reply to Felix Palmen from comment #5)

> why is this source file only added for x86 archs?

Perhaps that's my mistake, and it should be added for all archs.
Just add the string

srcs_xorg_os_support += 'misc/SlowBcopy.c'

without "if", "endif".
Comment 7 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2022-09-03 17:58:00 UTC
See https://reviews.freebsd.org/D36432
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-09-05 08:27:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=06dae48768b46f1d5a62a8a97ab4328aabd7dc3c

commit 06dae48768b46f1d5a62a8a97ab4328aabd7dc3c
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2022-09-03 17:01:42 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2022-09-05 08:25:59 +0000

    x11-servers/xorg-server: add missing xf86SlowBcopy

    PR:             265702
    MFH:            2022Q3
    Differential Revision: https://reviews.freebsd.org/D36432

 x11-servers/xorg-server/Makefile                           |  2 +-
 .../files/patch-hw_xfree86_os-support_meson.build          | 14 +++++++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)