Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 May 2009 14:25:12 GMT
From:      Mak Kolybabi <mak@mogigoma.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/134874: [patch] Port fix games/iourbanterror on amd64
Message-ID:  <200905231425.n4NEPCvA048984@www.freebsd.org>
Resent-Message-ID: <200905231430.n4NEUJ9I093963@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         134874
>Category:       ports
>Synopsis:       [patch] Port fix games/iourbanterror on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 23 14:30:18 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Mak Kolybabi
>Release:        7.2-STABLE
>Organization:
>Environment:
FreeBSD ely.nepharia.org 7.2-STABLE FreeBSD 7.2-STABLE #1: Fri May 22 23:45:21 CDT 2009     root@ely.nepharia.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
After compiling and installing the dedicated server for Urban Terror on an amd64 FreeBSD server, the dedicated server can't start up. The settings used for the server do not appear to alleviate this problem.

This issue does not occur on i386 FreeBSD servers.
>How-To-Repeat:
# cd /usr/ports/games/iorbanterror
# make clean
===>  Cleaning for iourbanterror-2007.12.20_4
# make install
[snip]
# rehash
# ioUrTded +map ut4_abbey
ioQ3 1.35urt freebsd-amd64 May 23 2009
----- FS_Startup -----
Going through search path...

----------------------
8032 files in pk3 files
execing default.cfg
execing q3config.cfg
execing autoexec.cfg
Hunk_Clear: reset the hunk ok
--- Common Initialization Complete ---
Opening IP socket: localhost:27960
Hostname: localhost
Alias: ely.nepharia.org
Alias: ely
IP: 127.0.0.1
Started tty console (use +set ttycon 0 to disable)
------ Server Initialization ------
Server: ut4_abbey
Hunk_Clear: reset the hunk ok
----- FS_Startup -----
Going through search path...

----------------------
16064 files in pk3 files
Loading vm file vm/qagame.qvm...
total 0, hsize 1021, zero 1021, min 0, max 0
parsearg() - expected '%'
-> jmpq *rax
>Fix:
The problem is caused by a single-character error in the virtual machine. At one point a single '%' is intended to be printed, but since it is a special character in C printf-like functions, it doesn't print.

The fix is simply changing the offending '%' to '%%'. There is already a patch for the file containing this error in the port. My attached patch adds another hunk to the pre-existing patch.

Once the attached patch is applied, and the port is recompiled and reinstalled, the dedicated server works perfectly.

Patch attached with submission follows:

--- ./files/patch-code__qcommon__vm_x86_64.c.orig
+++ ./files/patch-code__qcommon__vm_x86_64.c
@@ -1,5 +1,14 @@
 --- ./code/qcommon/vm_x86_64.c.orig	2007-10-09 02:47:22.000000000 -0300
 +++ ./code/qcommon/vm_x86_64.c	2008-03-04 10:45:08.000000000 -0300
+@@ -246,7 +246,7 @@
+ #else
+ #define JMPIARG \
+ 	emit("movq $%lu, %%rax", vm->codeBase+vm->instructionPointers[iarg]); \
+-	emit("jmpq *%rax");
++	emit("jmpq *%%rax");
+ #endif
+  
+ // integer compare and jump
 @@ -534,7 +534,7 @@
  	{
  		compiledOfs = assembler_get_code_size();


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905231425.n4NEPCvA048984>