Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Dec 2010 10:01:15 +0300
From:      Anonymous <swell.k@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/153437: [patch] emulators/dgen-sdl: mark BROKEN on non-i386 archs
Message-ID:  <86y67e72v8.fsf@gmail.com>
Resent-Message-ID: <201012250710.oBP7A9T0084235@freefall.freebsd.org>

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

>Number:         153437
>Category:       ports
>Synopsis:       [patch] emulators/dgen-sdl: mark BROKEN on non-i386 archs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 25 07:10:08 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
>Description:
MZ80 (not asm version) doesn't seem to work on at least amd64.

While here...
- move nasm dependency to i386 as it isn't used otherwise
- add more mirrors and homepage (source: freshmeat/wikipedia)
- remove ^M (carriage return) from sources to ease local patching
>How-To-Repeat:
$ fgrep -lr $(printf \\r) $(make -V WRKSRC)
WRKSRC/dgen-sdl-1.23/save.cpp
WRKSRC/dgen-sdl-1.23/myfm.cpp
WRKSRC/dgen-sdl-1.23/mz80.h
WRKSRC/dgen-sdl-1.23/mem.cpp
WRKSRC/dgen-sdl-1.23/mz80/makez80.c
WRKSRC/dgen-sdl-1.23/mz80/mz80.txt

$ gdb --args dgen atp.tennis.bin
[New LWP 103295]
[New Thread 808007400 (LWP 103295/initial thread)]
[New Thread 808008800 (LWP 106140/dgen)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 808007400 (LWP 103295/initial thread)]
0x0000000000000001 in ?? ()
Current language:  auto; currently c

(gdb) bt
#0  0x0000000000000001 in ?? ()
#1  0x000000000048fe9f in mz80exec (dwCycles=1016) at zz80.c:14960
#2  0x0000000000404efd in md::run_to_odo_z80 (this=0x7ffffffed540, odo_to=1016) at mdfr.cpp:41
#3  0x0000000000405166 in md::one_frame_musa (this=0x7ffffffed540, bm=0x6e6960, retpal=0x0, sndi=0x6e6980) at mdfr.cpp:168
#4  0x0000000000405335 in md::one_frame (this=0x7ffffffed540, bm=0x6e6960, retpal=0x0, sndi=0x6e6980) at mdfr.cpp:215
#5  0x000000000040f974 in main (argc=2, argv=0x7ffffffee458) at main.cpp:463

(gdb) info thr
  3 Thread 808008800 (LWP 106140/dgen)  0x000000080b49a8cc in write () at write.S:3
* 2 Thread 808007400 (LWP 103295/initial thread)  0x0000000000000001 in ?? ()
Current language:  auto; currently asm

(gdb) thr 3
[Switching to thread 3 (Thread 808008800 (LWP 106140/dgen))]#0  0x000000080b49a8cc in write () at write.S:3
3       write.S: No such file or directory.
        in write.S

(gdb) bt
#0  0x000000080b49a8cc in write () at write.S:3
#1  0x0000000804c49750 in __write (fd=9, buf=0x808240800, nbytes=2048) at /usr/src/lib/libthr/thread/thr_syscalls.c:741
#2  0x0000000806ef7c7a in DSP_PlayAudio (this=0x80829d280) at ./src/audio/dsp/SDL_dspaudio.c:135
#3  0x0000000806ec41a8 in SDL_RunAudio (audiop=0x80829d280) at ./src/audio/SDL_audio.c:249
#4  0x0000000806ed1145 in SDL_RunThread (data=0x80828aa20) at ./src/thread/SDL_thread.c:204
#5  0x0000000806f1af89 in RunThread (data=<value optimized out>) at ./src/thread/pthread/SDL_systhread.c:47
#6  0x0000000804c47854 in thread_start (curthread=0x808008800) at /usr/src/lib/libthr/thread/thr_create.c:273
#7  0x0000000000000000 in ?? ()
Error accessing memory address 0x7fffffbff000: Bad address.
>Fix:
--- a.diff begins here ---
Index: emulators/dgen-sdl/Makefile
===================================================================
RCS file: /a/.cvsup/ports/emulators/dgen-sdl/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- emulators/dgen-sdl/Makefile	18 Jun 2008 07:24:39 -0000	1.21
+++ emulators/dgen-sdl/Makefile	25 Dec 2010 06:50:39 -0000
@@ -9,13 +9,14 @@ PORTNAME=	dgen-sdl
 PORTVERSION=	1.23
 PORTREVISION=	4
 CATEGORIES=	emulators
-MASTER_SITES=	http://src4.narod.ru/
+MASTER_SITES=	SF/dgen/dgen/sdl-${PORTVERSION} \
+		http://tamentis.com/projects/dgen/files/ \
+		http://src4.narod.ru/
 
 MAINTAINER=	spam@rm-rf.kiev.ua
 COMMENT=	A wonderful Sega Genesis/MegaDrive emulator
 
-BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
-
+USE_DOS2UNIX=	yes
 USE_SDL=	sdl
 USE_GL=		yes
 GNU_CONFIGURE=	yes
@@ -23,4 +24,12 @@ GNU_CONFIGURE=	yes
 MAN1=		dgen.1 tobin.1
 MAN5=		dgenrc.5
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == i386
+BUILD_DEPENDS+=	nasm:${PORTSDIR}/devel/nasm
+.else
+BROKEN=		mz80 (zz80) segfaults on non-i386
+.endif
+
+.include <bsd.port.post.mk>
Index: emulators/dgen-sdl/pkg-descr
===================================================================
RCS file: /a/.cvsup/ports/emulators/dgen-sdl/pkg-descr,v
retrieving revision 1.3
diff -u -p -r1.3 pkg-descr
--- emulators/dgen-sdl/pkg-descr	18 Jun 2008 07:24:39 -0000	1.3
+++ emulators/dgen-sdl/pkg-descr	25 Dec 2010 05:35:29 -0000
@@ -1 +1,3 @@
 DGen is a wonderful Sega Genesis/MegaDrive emulator.
+
+WWW: http://tamentis.com/projects/dgen/
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



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