The program dumped core, and I tried to get a backtrace. But it didn't have debugging symbols. So I compiled it from ports with debugging turned on. But when I compiled it for my system, it started up with no trouble at all. I did notice what the problem may be. Although I have the CPUTYPE on my system set to ivibridge, I see this snippet of output during compilation: "-march=ivybridge -g -fstack-protector-strong -fno-strict-aliasing -fPIE -march=native". As you can see, whether this is the fault of the port or PCSX2's own build system, -march=native is being passed during compilation. So the prebuilt package was most likely built for the native CPU of the machine it was built on rather than generic amd64. So obviously it won't be compatible for all systems.
(In reply to Patrick McMunn from comment #0) Please provide outputs from the commands below. freebsd-version -kru ; uname -aKU pkg -vv | grep -e url -e enabled -e priority
Created attachment 242991 [details] Patch for pcsx2 Rely on our framework and if undefined set lowest common denominator. Might be worth considering adding a small message that PCSX2 should be recompiled with CPUTYPE defined for best performance.
Created attachment 242992 [details] Patch for pcsx2 v2 Fix typo in comments
(In reply to Graham Perrin from comment #1) 14.0-CURRENT 14.0-CURRENT 14.0-CURRENT FreeBSD op7010.local 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-c079bcbc6: Mon Jun 26 11:16:14 CDT 2023 root@op7010.local:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400092 1400092 url : "pkg+http://pkg.FreeBSD.org/FreeBSD:14:amd64/latest", enabled : yes, priority : 0,
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=10076c84866711af04e6c1425cdc6085ac936bfe commit 10076c84866711af04e6c1425cdc6085ac936bfe Author: Daniel Engberg <diizzy@FreeBSD.org> AuthorDate: 2023-06-27 10:08:02 +0000 Commit: Ganael LAPLANCHE <martymac@FreeBSD.org> CommitDate: 2023-06-27 10:13:32 +0000 emulators/pcsx2: Fix SIGILL crash Do not pass -march=native as that can bring pre-built packages with instructions not supported by end users and lead to a SIGILL crash. If CPUTYPE is not defined, set arch to the oldest CPU that supports SSE 4.1 (penryn), else let the build system try to build with whatever is set. Add a message indicating that the port should be rebuilt with CPUTYPE defined for best performance. While here, use zstd from ports (now detected). PR: 272192 Reported by: Patrick McMunn <doctorwhoguy@gmail.com> emulators/pcsx2/Makefile | 17 +++++++++++++---- emulators/pcsx2/Makefile.tuples | 1 - emulators/pcsx2/distinfo | 2 -- .../pcsx2/files/extra-patch-no-march-minimum-req (new) | 11 +++++++++++ emulators/pcsx2/files/extra-patch-no-march-native (new) | 11 +++++++++++ emulators/pcsx2/pkg-message (new) | 7 +++++++ 6 files changed, 42 insertions(+), 7 deletions(-)
Hello Patrick, Graham and Daniel, Thanks a lot for your report and help. I've committed the fix as well as a message indicating that PCSX2 should probably be recompiled with CPUTYPE defined. Cheers, Ganael.