Bug 287374 - games/yquake2: No video output; .so loaded from incorrect directory
Summary: games/yquake2: No video output; .so loaded from incorrect directory
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-08 05:41 UTC by Alastair Hogge
Modified: 2025-06-09 03:34 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (shamaz.mazum)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alastair Hogge 2025-06-08 05:41:26 UTC
Hello,

I was looking at updating games/yquake2, tho I first thought I should see if the current version in the Ports tree loads. It does load, however, there is no video output, just the usual messages recorded at stdout. The Port currently uses:

> .include "${.CURDIR}/../quake2-data/Makefile.include"

I do not understand how this is meant to work, because yquake2, and from memory, every other Quake 2 port, build its own shared library, game.so. In the case of yquake2, game.so is installed in ${PREFIX}/lib/yquake2/baseq2/game.so, and the video shared libraries are in ${PREFIX}/lib/yquake2/

Using ktrace, and kdump reveals some interesting data:

> $ grep -A1 game.so yquake2.kdump
>        "Loading library: game.so
>        "
> --
>  33163 yquake2  NAMI  "/usr/local/home/agh/.yq2/baseq2/game.so"
>  33163 yquake2  RET   open -1 errno 2 No such file or directory
> --
>  33163 yquake2  NAMI  "/usr/local/home/agh/.yq2/baseq2/game.so"
>  33163 yquake2  RET   open -1 errno 2 No such file or directory
> --
>  33163 yquake2  NAMI  "/usr/local/bin/baseq2/game.so"
>  33163 yquake2  RET   open -1 errno 2 No such file or directory
> --
>  33163 yquake2  NAMI  "/tmp/baseq2/game.so"
>  33163 yquake2  RET   open -1 errno 2 No such file or directory
> --
>  33163 yquake2  NAMI  "/usr/local/share/quake2/baseq2/game.so"
>  33163 yquake2  RET   open 52/0x34
> --
> 33163 yquake2  NAMI  "/usr/local/share/quake2/baseq2/game.so"
> 33163 yquake2  RET   open 52/0x34

I do not think the above is correct, yquake2 should be loading game.so from /usr/local/lib/yquake2/baseq2/game.so

The game does not even search for the video libraries:

> $ grep -A1 ref_ yquake2.kdump

Return no hits.
Comment 1 Alastair Hogge 2025-06-08 06:19:18 UTC
The Port also does not install the map fixes in ${WRKSRC}/stuff/mapfixes/. There is also ${WRKSRC}/stuff/models/crosshair.
Comment 2 Alastair Hogge 2025-06-08 08:57:12 UTC
So interchanging the game.so between yquake and quake2-data makes no difference, as expressed in games/quake2-data/Makefile.include, however, the video still does not load.
Comment 3 shamaz.mazum 2025-06-09 03:25:01 UTC
Hi! Seems like I am a maintainer of this port ;)

Can you try newer version from here?

https://github.com/shamazmazum/freebsd-ports/tree/master/games/yquake2

> root@vonbraun:~ # dtrace -n 'syscall::open:entry /execname == "yquake2"/ {printf ("%s", copyinstr(arg0));}' -n 'syscall::open:return /execname == "yquake2"/ {printf ("%i", arg0);}' | grep -A1 ref
dtrace: description 'syscall::open:entry ' matched 2 probes
dtrace: description 'syscall::open:return ' matched 2 probes
  3 103466                       open:entry /usr/local/lib/yquake2/ref_vk.so
  3 103467                      open:return 13

(Vulkan ref is an additional port in that repo)
Comment 4 shamaz.mazum 2025-06-09 03:34:34 UTC
(In reply to shamaz.mazum from comment #3)

It works fine with the default OpenGL renderer, of course