xf86-video-vmware-13.4.0-2 fails on Xorg startup with: undefined symbol: vgaHWGetIndex
<!--
Please read our Bug reporting guidelines before opening a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
If you want to help catching more bugs upfront, consider joining the Arch Testing Team:
https://wiki.archlinux.org/title/Arch_Testing_Team
-->
# Description:
<!-- Describe the bug in full detail. -->
When latest package `xf86-video-vmware-13.4.0-2` is installed the X-server will corrupt screen (terminal and menu mostly invisible).
In /var/log/Xorg.0.log there is following error message:
```
(EE) Failed to load /usr/lib/xorg/modules/drivers/vmware_drv.so: /usr/lib/xorg/modules/drivers/vmware_drv.so: undefined symbol: vgaHWGetIndex
(EE) Failed to load module "vmware" (loader failed, 0)
```
When downgrading to previous release `xf86-video-vmware-13.4.0-1` - the vmware_drv.so loads properly and X-server works
without problems - tested under VirtualBox with VMSVGA+3D emulation and by other users under VMware workstation - please
see my post https://bbs.archlinux.org/viewtopic.php?id=294591 for details
# Additional info:
* package version(s):
- `xf86-video-vmware-13.4.0-2` X-server reports error to Xorg.0.log + screen become corrupted
- `xf86-video-vmware-13.4.0-1` works without problem.
* config and/or log files:
- following error is reported on X-server startup to /var/log/Xorg.0.log
```
[ 5.346] (EE) Failed to load /usr/lib/xorg/modules/drivers/vmware_drv.so: /usr/lib/xorg/modules/drivers/vmware_drv.so: undefined symbol: vgaHWGetIndex
[ 5.346] (EE) Failed to load module "vmware" (loader failed, 0)
```
* link to upstream bug report, if any:
- I created post on https://bbs.archlinux.org/viewtopic.php?id=294591 and waited until got feedback that more users are affected.
# Steps to reproduce:
<!-- Describe how to reproduce the bug step by step including the commands -->
1. Start X-Window under VMware SVGA emulation using any of:
- VirtualBox 7.x configured with `VMSVGA` display
- VMware Workstation (paid product)
2. When latest package `xf86-video-vmware-13.4.0-2` is used the X-server will report above error to Xorg.0.log and
switch to `modeset` driver - that will cause various issue - corrupted screen etc...
3. Downgrading to previous version `xf86-video-vmware-13.4.0-1` will fix problem.
Here is example diff from `inxi -G` that shows what changes on GPU configuration:
```diff
< Display: server: X.org v: 1.21.1.12 with: Xwayland v: 23.2.5 driver: X: loaded: vmware
< unloaded: modesetting,vesa dri: vmwgfx gpu: vmwgfx tty: 113x24
---
> Display: server: X.org v: 1.21.1.12 with: Xwayland v: 23.2.5 driver: X: loaded: modesetting
> unloaded: vesa failed: vmware dri: vmwgfx gpu: vmwgfx tty: 113x24
```
Where:
- original version is from working - release-1 driver (notice `loaded: vmware` - as expected)
- new version is from problematic - release-2 driver (notice `loaded: modesetting` - this fallback driver causes
many rendering issues and makes X-Window basically unusable.
Possible problem:
- I have noticed following substitution in https://gitlab.archlinux.org/archlinux/packaging/packages/xf86-video-vmware/-/commit/8cb228e3fbd29add560aa4dbbf962f7b18a575a1
```shell
export LDFLAGS=${LDFLAGS/-Wl,,-z,now}
```
- notice that there are two commas (`,,` after `-Wl`). I think that it should be with single comma (at least that matches my `/etc/makepkg.conf`):
```shell
export LDFLAGS=${LDFLAGS/-Wl,-z,now}
```
Here is how `LDFLAGS` are set on my machine:
```shell
$ pacman -Qo /etc/makepkg.conf
/etc/makepkg.conf is owned by pacman 6.1.0-3
$ grep -A1 LDFLAGS /etc/makepkg.conf
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
-Wl,-z,pack-relative-relocs"
```
issue