The program crashes during startup, complaining that we use the ... .. "Wrong JPEG library version: library is 90, caller expects 80"
Same problem here under 12.1-RELEASE on an iMac 14,2, either with pkg and port install. OS: FreeBSD macbsd 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC amd64
Spoke to the upstream developers on irc and was given the following advice: 14:06 < VulcanRidr> I have a question. I am trying to install ufoai 2.5_9 on FreeBSD 12.1p7. Game installs fine, but when I try to start it, it quits with the error, "Wrong JPEG library version: library is 90, caller expects 80" Is there a fix available for this? 14:11 < Soliton> the error means the game was built with version 80 but gets executed with version 90. 14:11 < Soliton> rebuild the game or install the older lib version. 14:12 < Soliton> (or run in a way that the older lib version is actually used.) 14:16 < VulcanRidr> So if I recompile from source, it will pick up the new version? 14:18 < Soliton> i have no clue how your os works but that sounds like a sane assumption. I have the source, will have a go at compiling and report my results.
Created attachment 217016 [details] log of attempted make
I believe the Makefile is geared toward linux, since it has thing like CC = gcc, CXX = g++, and so forth. Believe we need a FreeBSD-specific Makefile.
(In reply to storm16 from comment #3) This is FreeBSD, not Linux. FreBSD make works with FreeBSD Makefile. If you got a Makefile with GNU syntax, then you need to use gmake instead of make.
(In reply to storm16 from comment #4) The FreeBSD Makefiles are in /usr/ports/
(In reply to storm16 from comment #3) Just compiled 2.6 from git source (had to disable ufo2map and testall at configure and slightly edit src/tools/radiant/radiant/exec.cpp) After launching the compiled ufo binary, it shows the splash screen and then it quits with the familiar error message: Music: track changed from to van_theme. executing autoexec.cfg "version" is "UFO: Alien Invasion 2.6-dev AMD64 Aug 5 2020 FreeBSD DEBUG" Wrong JPEG library version: library is 90, caller expects 80
So, at least we have something. Can you please post ldd output for the game binary?
Sorry, I forgot abouth this PR completely. The problem is trivial - it bundles its own version of jpeg. I'm testing the fix right now.
Created attachment 217041 [details] Patch - Fix detection of system jpeg by adding USES=localbase, this fixes crash on game start due to libraries conflict - Make sure that bundled (ancient and likely vulnerable) third party libraries are not used by removing most of them - Add missing depends - Portlint nits - Modernize options handling - Silence patching - Simplify radiant data installation - Fix absolute symlink
(In reply to Dmitry Marakasov from comment #10) So download ufoai.patch, and patch -p1 /usr/ports/games/ufoai/Makefile < ufoai.patch make install clean Is this the right process? Because I think I missed a step. When I did it, it stopped and asked: ===> Applying distribution patches for ufoai-2.5_10 ===> Applying FreeBSD patches for ufoai-2.5_10 from /usr/ports/games/ufoai/files File to patch: What did I miss?
> What did I miss? There was an empty file left in files/ after patching. You need to either remove it or patch with -E.
A commit references this bug: Author: amdmi3 Date: Fri Aug 7 20:22:47 UTC 2020 New revision: 544349 URL: https://svnweb.freebsd.org/changeset/ports/544349 Log: - Fix detection of system jpeg by adding USES=localbase, this fixes crash on game start due to libraries conflict - Fix build failure on 12.x i386 related to linking with OpenAL - Remove most bundled third party librarues ti ensure they are not used - Add missing depends - Portlint nits - Modernize options handling - Silence patching - Simplify radiant data installation - Fix absolute symlink PR: 242612 Reported by: peter.kien@posteo.org, attila.kover@guardian.co.uk, storm16@gmail.com Approved by: maintainer timeout (m.tsatsenko@gmail.com, 8 months) Changes: head/games/ufoai/Makefile head/games/ufoai/files/patch-src__libs__vorbis__config.h head/games/ufoai/pkg-plist