ZSNES 64Bit stuff

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

Fentekreel
New Member
Posts: 7
Joined: Sat Nov 20, 2004 5:38 am
Location: Pittsburgh

posability

Post by Fentekreel »

I'm pretty new to the linux scene but i'll look into it. (Yasm) and see what it is. I would like to say good job on zsnes. Its been an awsome emulator!
Fentekreel
New Member
Posts: 7
Joined: Sat Nov 20, 2004 5:38 am
Location: Pittsburgh

Amd 64 compiliation issues

Post by Fentekreel »

I was wondering about NASM i have a 64x version that came with the red had Isntall discs. Why wouldn't this version work? Is there a compiile time switch that i can pass for the compatability?
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Studying the output, I don't think it's a problem with NASM here. Seems like GCC needs an option passed to it.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Fentekreel
New Member
Posts: 7
Joined: Sat Nov 20, 2004 5:38 am
Location: Pittsburgh

gcc switches

Post by Fentekreel »

well i've found this for gcc
<A href = "http://gcc.gnu.org/onlinedocs/gcc-3.4.3 ... tions.html" >Gcc x86-64 flags</A>

though i do not know how to pass it when i compile zsnes
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

HTML doesn't work here, but whatever.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
adventure_of_link
Locksmith of Hyrule
Posts: 3634
Joined: Sun Aug 08, 2004 7:49 am
Location: 255.255.255.255
Contact:

Post by adventure_of_link »

And this is how his line of HTML should be written:
<A href="http://gcc.gnu.org/onlinedocs/gcc-3.4.3 ... .html">Gcc x86-64 flags</A>
No Spaces, except for his hyper link name and the "A Href." 8)
EDIT: Turns out Magus` disabled the HTML option. (see the next few posts below this) I'm leaving the HTML up, though.
Last edited by adventure_of_link on Wed Dec 22, 2004 6:20 pm, edited 2 times in total.
<Nach> so why don't the two of you get your own room and leave us alone with this stupidity of yours?
NSRT here.
Kushan
New Member
Posts: 9
Joined: Sat Nov 13, 2004 1:44 am

Post by Kushan »

Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Post by Agozer »

adventure_of_link wrote:Technically Agozer, it does work. You have to go into your profile and edit it. And this is how his line of HTML should be written:
<A href="http://gcc.gnu.org/onlinedocs/gcc-3.4.3 ... .html">Gcc x86-64 flags</A>
No Spaces, except for his hyper link name and the "A Href." 8)
I know I know, but I think that the whole feature has been disable from this board, even though you can "enable" it in your profile.

But what would I know.
whicker: franpa is grammatically correct, and he still gets ripped on?
sweener2001: Grammatically correct this one time? sure. every other time? no. does that give him a right? not really.
Image
Noxious Ninja
Dark Wind
Posts: 1271
Joined: Thu Jul 29, 2004 8:58 pm
Location: Texas
Contact:

Post by Noxious Ninja »

Agozer wrote:I know I know, but I think that the whole feature has been disable from this board, even though you can "enable" it in your profile.

But what would I know.
The "Always allow HTML" option seems to do absolutely nothing. I think it only works if HTML support is enabled board-wide.
[u][url=http://bash.org/?577451]#577451[/url][/u]
Clements
Randomness
Posts: 1172
Joined: Wed Jul 28, 2004 4:01 pm
Location: UK
Contact:

Post by Clements »

If HTML was enabled, onload redirects to goat.cx would be possible. So it isn't.
whicker
Trooper
Posts: 479
Joined: Sat Nov 27, 2004 4:33 am

Post by whicker »

Clements wrote:If HTML was enabled, onload redirects to goat.cx would be possible. So it isn't.
...plus the inevitable table breaking and color changes.
Fentekreel
New Member
Posts: 7
Joined: Sat Nov 20, 2004 5:38 am
Location: Pittsburgh

amd64 compile

Post by Fentekreel »

I still cannot get zsnes to compile on a unix 64 bit environment
....


any suggestions...
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

No idea since I don't have a 64-bit processor... Anyone with one can you please give me insight into this?
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

pagefault wrote:No idea since I don't have a 64-bit processor... Anyone with one can you please give me insight into this?
I don't have one, but from what I gather, the GCC for 64bit expects a different object format.

Perhaps passing GCC the -m32 param would fix that.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

Probably... Someone do it and see if it works?
WolfWings
Hazed
Posts: 52
Joined: Wed Nov 02, 2005 1:31 pm

Post by WolfWings »

-m32 would be a band-aid, as that tells GCC to compile 32-bit versions of programs despite running on a 64-bit processor.

I'm currently running an Athlon-64 laptop with Linux (Gentoo in fact, no huge surprise there I don't think) and working at getting the latest WIP to compile with as few changes or 'custom' options as possible and will report on my progress and steps required shortly.
Last edited by WolfWings on Tue Aug 01, 2006 6:13 pm, edited 1 time in total.
[img]http://wolfwings.us/sigs/WolfWings.jpg[/img]
jorgenmz
New Member
Posts: 4
Joined: Wed Nov 23, 2005 7:41 am
Location: México

compiling on linux...

Post by jorgenmz »

Not a skilled programmer myself but I have a 64bit machine and could try to help.

Just downloaded the latest WIP and installed Nasm. I have a different error than Fentekreel, on ./autoconf.sh I get:

Code: Select all

jorge@linux:~/_VOL-SUSE/Zsnes/tcvs/zsnes/src> ./autogen.sh
Generating build information using aclocal and autoconf...
/usr/share/aclocal/progsreiserfs.m4:13: warning: underquoted definition of AC_CHECK_LIBREISERFS
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for nasm... nasm
checking for a BSD-compatible install... /usr/bin/install -c
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking for zlib - version >= 1.1.0... yes
checking for libpng - version >= 1.2.0... yes
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11R6/lib64, headers /usr/X11R6/include
checking for glGetError in -lGL... yes
checking for OpenGL... yes
checking if you want gdb friendly executable... no
checking if you want crazy optimizations... no
checking for cpu info... not found
checking which cpu architecture to optimize for... guessing x86-64
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether sys/types.h defines makedev... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h


ZSNES vpre1.43

SDL support                   Version 1.2.8
NASM support                  NASM version 0.98.39 compiled on Jan 15 2005
ZLib support                  Version 1.2.3
PNG support                   Yes, version 1.2.8
OpenGL support                Yes

The binary will be installed in /usr/local/bin

Configure complete, now type 'make' and pray.
So I 'make' and apparently the gods didn't listen because I get:

Code: Select all

jorge@linux:~/_VOL-SUSE/Zsnes/tcvs/zsnes/src> make
g++  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_REENTRANT  -D__OPENGL__ -O3 -fomit-frame-pointer -s -march=x86-64 -fno-rtti -o parsegen parsegen.cpp
gcc  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_REENTRANT  -D__OPENGL__ -O3 -fomit-frame-pointer -s -march=x86-64 -o cfgload.o -c cfgload.c
./parsegen -D__UNIXSDL__ temppsr.c cfgparse.psr
gcc -I. -O1 -o cfgparse.o -c temppsr.c
rm -f temppsr.c
nasm  -w-orphan-labels -D__UNIXSDL__ -f elf -DELF -D__OPENGL__ -O1 -o endmem.o endmem.asm
objcopy --input-target elf32-i386 --output-target elf64-x86-64 endmem.o endmem.o
nasm  -w-orphan-labels -D__UNIXSDL__ -f elf -DELF -D__OPENGL__ -O1 -o init.o init.asm
objcopy --input-target elf32-i386 --output-target elf64-x86-64 init.o init.o
gcc  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_REENTRANT  -D__OPENGL__ -O3 -fomit-frame-pointer -s -march=x86-64 -o initc.o -c initc.c
{standard input}: Assembler messages:
{standard input}:5077: Error: suffix or operands invalid for `push'
{standard input}:5078: Error: suffix or operands invalid for `push'
{standard input}:5079: Error: suffix or operands invalid for `push'
{standard input}:5080: Error: suffix or operands invalid for `push'
{standard input}:5081: Error: suffix or operands invalid for `push'
{standard input}:5082: Error: suffix or operands invalid for `push'
{standard input}:5083: Error: suffix or operands invalid for `push'
{standard input}:5084: Error: suffix or operands invalid for `push'
{standard input}:5086: Error: suffix or operands invalid for `pop'
{standard input}:5087: Error: suffix or operands invalid for `pop'
{standard input}:5088: Error: suffix or operands invalid for `pop'
{standard input}:5089: Error: suffix or operands invalid for `pop'
{standard input}:5090: Error: suffix or operands invalid for `pop'
{standard input}:5091: Error: suffix or operands invalid for `pop'
{standard input}:5092: Error: suffix or operands invalid for `pop'
{standard input}:5093: Error: suffix or operands invalid for `pop'
{standard input}:5127: Error: suffix or operands invalid for `push'
{standard input}:5128: Error: suffix or operands invalid for `push'
{standard input}:5129: Error: suffix or operands invalid for `push'
{standard input}:5130: Error: suffix or operands invalid for `push'
{standard input}:5131: Error: suffix or operands invalid for `push'
{standard input}:5132: Error: suffix or operands invalid for `push'
{standard input}:5133: Error: suffix or operands invalid for `push'
{standard input}:5134: Error: suffix or operands invalid for `push'
{standard input}:5136: Error: suffix or operands invalid for `pop'
{standard input}:5137: Error: suffix or operands invalid for `pop'
{standard input}:5138: Error: suffix or operands invalid for `pop'
{standard input}:5139: Error: suffix or operands invalid for `pop'
{standard input}:5140: Error: suffix or operands invalid for `pop'
{standard input}:5141: Error: suffix or operands invalid for `pop'
{standard input}:5142: Error: suffix or operands invalid for `pop'
{standard input}:5143: Error: suffix or operands invalid for `pop'
{standard input}:5145: Error: suffix or operands invalid for `push'
{standard input}:5146: Error: suffix or operands invalid for `push'
{standard input}:5147: Error: suffix or operands invalid for `push'
{standard input}:5148: Error: suffix or operands invalid for `push'
{standard input}:5149: Error: suffix or operands invalid for `push'
{standard input}:5150: Error: suffix or operands invalid for `push'
{standard input}:5151: Error: suffix or operands invalid for `push'
{standard input}:5152: Error: suffix or operands invalid for `push'
{standard input}:5154: Error: suffix or operands invalid for `pop'
{standard input}:5155: Error: suffix or operands invalid for `pop'
{standard input}:5156: Error: suffix or operands invalid for `pop'
{standard input}:5157: Error: suffix or operands invalid for `pop'
{standard input}:5158: Error: suffix or operands invalid for `pop'
{standard input}:5159: Error: suffix or operands invalid for `pop'
{standard input}:5160: Error: suffix or operands invalid for `pop'
{standard input}:5161: Error: suffix or operands invalid for `pop'
{standard input}:5172: Error: suffix or operands invalid for `push'
{standard input}:5173: Error: suffix or operands invalid for `push'
{standard input}:5174: Error: suffix or operands invalid for `push'
{standard input}:5175: Error: suffix or operands invalid for `push'
{standard input}:5176: Error: suffix or operands invalid for `push'
{standard input}:5177: Error: suffix or operands invalid for `push'
{standard input}:5178: Error: suffix or operands invalid for `push'
{standard input}:5179: Error: suffix or operands invalid for `push'
{standard input}:5181: Error: suffix or operands invalid for `pop'
{standard input}:5182: Error: suffix or operands invalid for `pop'
{standard input}:5183: Error: suffix or operands invalid for `pop'
{standard input}:5184: Error: suffix or operands invalid for `pop'
{standard input}:5185: Error: suffix or operands invalid for `pop'
{standard input}:5186: Error: suffix or operands invalid for `pop'
{standard input}:5187: Error: suffix or operands invalid for `pop'
{standard input}:5188: Error: suffix or operands invalid for `pop'
{standard input}:5198: Error: suffix or operands invalid for `push'
{standard input}:5199: Error: suffix or operands invalid for `push'
{standard input}:5200: Error: suffix or operands invalid for `push'
{standard input}:5201: Error: suffix or operands invalid for `push'
{standard input}:5202: Error: suffix or operands invalid for `push'
{standard input}:5203: Error: suffix or operands invalid for `push'
{standard input}:5204: Error: suffix or operands invalid for `push'
{standard input}:5205: Error: suffix or operands invalid for `push'
{standard input}:5207: Error: suffix or operands invalid for `pop'
{standard input}:5208: Error: suffix or operands invalid for `pop'
{standard input}:5209: Error: suffix or operands invalid for `pop'
{standard input}:5210: Error: suffix or operands invalid for `pop'
{standard input}:5211: Error: suffix or operands invalid for `pop'
{standard input}:5212: Error: suffix or operands invalid for `pop'
{standard input}:5213: Error: suffix or operands invalid for `pop'
{standard input}:5214: Error: suffix or operands invalid for `pop'
{standard input}:5635: Error: suffix or operands invalid for `push'
{standard input}:5636: Error: suffix or operands invalid for `push'
{standard input}:5637: Error: suffix or operands invalid for `push'
{standard input}:5638: Error: suffix or operands invalid for `push'
{standard input}:5639: Error: suffix or operands invalid for `push'
{standard input}:5640: Error: suffix or operands invalid for `push'
{standard input}:5641: Error: suffix or operands invalid for `push'
{standard input}:5642: Error: suffix or operands invalid for `push'
{standard input}:5644: Error: suffix or operands invalid for `pop'
{standard input}:5645: Error: suffix or operands invalid for `pop'
{standard input}:5646: Error: suffix or operands invalid for `pop'
{standard input}:5647: Error: suffix or operands invalid for `pop'
{standard input}:5648: Error: suffix or operands invalid for `pop'
{standard input}:5649: Error: suffix or operands invalid for `pop'
{standard input}:5650: Error: suffix or operands invalid for `pop'
{standard input}:5651: Error: suffix or operands invalid for `pop'
{standard input}:5656: Error: suffix or operands invalid for `push'
{standard input}:5657: Error: suffix or operands invalid for `push'
{standard input}:5658: Error: suffix or operands invalid for `push'
{standard input}:5659: Error: suffix or operands invalid for `push'
{standard input}:5660: Error: suffix or operands invalid for `push'
{standard input}:5661: Error: suffix or operands invalid for `push'
{standard input}:5662: Error: suffix or operands invalid for `push'
{standard input}:5663: Error: suffix or operands invalid for `push'
{standard input}:5665: Error: suffix or operands invalid for `pop'
{standard input}:5666: Error: suffix or operands invalid for `pop'
{standard input}:5667: Error: suffix or operands invalid for `pop'
{standard input}:5668: Error: suffix or operands invalid for `pop'
{standard input}:5669: Error: suffix or operands invalid for `pop'
{standard input}:5670: Error: suffix or operands invalid for `pop'
{standard input}:5671: Error: suffix or operands invalid for `pop'
{standard input}:5672: Error: suffix or operands invalid for `pop'
make: *** [initc.o] Error 1
So it may be Nasm indeed. I don't have much time now but I'll try and install and use Yasm instead.
If I can be of any help please tell me what to do and I'll try it.

I'm using Suse 10.0

btw: I've been using your emu since looong time ago and never had the chance to tell you how great it has become, thank you!!


edit: I just noticed that install.txt says to 'gmake' it (I don't know the difference between 'make' and 'gmake', sorry). Same error, anyway:

Code: Select all

jorge@linux:~/_VOL-SUSE/Zsnes/tcvs/zsnes/src> gmake
gcc  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_REENTRANT  -D__OPENGL__ -O3 -fomit-frame-pointer -s -march=x86-64 -o initc.o -c initc.c
{standard input}: Assembler messages:
{standard input}:5077: Error: suffix or operands invalid for `push'
{standard input}:5078: Error: suffix or operands invalid for `push'
{standard input}:5079: Error: suffix or operands invalid for `push'
...
make: *** [initc.o] Error 1
WolfWings
Hazed
Posts: 52
Joined: Wed Nov 02, 2005 1:31 pm

Yeah...

Post by WolfWings »

...converting to YASM doesn't really fix the error. I'm untangling things to try to figure out what's breaking where in the 64-bit compile. Right now the code is trying to 'simulate' a 32-bit "PushAll" operation with 32-bit pushes, but the assembler isn't accepting the code apparently.
Last edited by WolfWings on Tue Aug 01, 2006 6:13 pm, edited 1 time in total.
[img]http://wolfwings.us/sigs/WolfWings.jpg[/img]
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Re: compiling on linux...

Post by grinvader »

jorgenmz wrote:

Code: Select all

checking for cpu info... not found
checking which cpu architecture to optimize for... guessing x86-64
This is using latest source ?
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Aerdan
Winter Knight
Posts: 467
Joined: Mon Aug 16, 2004 10:16 pm
Contact:

Post by Aerdan »

It is not nasm's fault that gcc breaks on initc.c.

Anyhow, yasm is broken in Linux, please don't try to use it.
jorgenmz
New Member
Posts: 4
Joined: Wed Nov 23, 2005 7:41 am
Location: México

Re: compiling on linux...

Post by jorgenmz »

grinvader wrote:
jorgenmz wrote:

Code: Select all

checking for cpu info... not found
checking which cpu architecture to optimize for... guessing x86-64
This is using latest source ?
Yes, latest 11-09 wip from Ipher's site
Aerdan wrote:Anyhow, yasm is broken in Linux, please don't try to use it.
Ok! If testing needs to be done I would be glad to help.
crache
New Member
Posts: 3
Joined: Thu Dec 16, 2004 8:23 pm
Contact:

Post by crache »

I'm running AMD64 linux and would like to see a resolution. I am willing to help out in any way short of shipping my pc to you guys (=. It's a sempron but runs 64bit code. I'm in no way a programmer but I can find my way around and definetly can follow instructions.

http://www.x86-64.org/documentation/assembly
Just throwing this in, in case it happens to be useful to anyone.

I'm actually writing this from windows ATM, as I haven't installed Linux yet on this 64bit system. (Going to do that tonight.) I used to use gentoo, however I'm going to try out OpenSuse. Gentoo may help us yet though (they say that their zsnes "package" supports x86-64).

From looking at their build script, you need to have gcc compiled with SE=multilib FEATURES=-sandbox, and it outputs in 32 bit code.

Code: Select all

  08 May 2005; Herbie Hopkins <herbs@gentoo.org> zsnes-1.42.ebuild:
  Stable on amd64.

  14 Jul 2004; Travis Tilley <lv@gentoo.org> zsnes-1.37_pre20040508.ebuild:
  added preliminary amd64 support

zsnes-1.42.ebuild

Code: Select all

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.42.ebuild,v 1.8 2005/05/08 17:10:14 herbs Exp $

inherit eutils flag-o-matic games

DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly"
HOMEPAGE="http://www.zsnes.com/ http://ipherswipsite.com/zsnes/"
SRC_URI="mirror://sourceforge/zsnes/${PN}${PV//.}src.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-* amd64 x86"
IUSE="opengl png"

RDEPEND=">=media-libs/libsdl-1.2.0
	>=sys-libs/zlib-1.1
	amd64? ( app-emulation/emul-linux-x86-sdl )
	opengl? ( virtual/opengl )
	png? ( media-libs/libpng )"
DEPEND="${RDEPEND}
	>=dev-lang/nasm-0.98
	sys-devel/automake
	>=sys-devel/autoconf-2.58"

S="${WORKDIR}/${PN}_${PV//./_}"

pkg_setup() {
	use amd64 || return 0
	if has_m32 ; then
		export ABI=x86
	else
		eerror "Your compiler seems to be unable to compile 32bit code."
		eerror "Make sure you compile gcc with:"
		echo
		eerror "    USE=multilib FEATURES=-sandbox"
		die "Cannot produce 32bit code"
	fi
	games_pkg_setup
}

src_unpack() {
	unpack ${A}
	cd "${S}"/src
	cp "icons/48x48x32.png" "${T}/zsnes.png"
	epatch "${FILESDIR}"/${PV}-configure.patch
	aclocal && autoconf || die "autotools failed"
}

src_compile() {
	cd src
	egamesconf \
		$(use_enable png libpng) \
		$(use_enable opengl) \
		|| die
	emake || die "emake failed"
}

src_install() {
	dogamesbin src/zsnes || die "dogamesbin failed"
	newman src/linux/zsnes.1 zsnes.6
	dodoc docs/{*.txt,README.LINUX}
	dohtml -r docs/Linux/*
	make_desktop_entry zsnes ZSNES zsnes.png
	doicon "${T}/zsnes.png"
	prepgamesdirs
}


1.42-configure.patch

Code: Select all

--- configure.in.orig	2005-01-23 17:17:21.000000000 -0500
+++ configure.in	2005-01-23 17:17:38.000000000 -0500
@@ -15,8 +15,6 @@
 dnl Mingw, because it doesnt have a standard file tree. Maybe if ming do this
 dnl else do -I/usr/include. Or some shit. You figure it out.
 
-LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/lib"
-
 dnl -- Same thing here.
 
 AC_CANONICAL_SYSTEM
@@ -84,7 +82,9 @@
 CFLAGS="$CFLAGS -I$opengl_prefix/include"
 LDFLAGS-"$LDFLAGS -L$opengl_prefix/lib"
 fi
+if test x$x_libraries != x; then
 LDFLAGS="$LDFLAGS -L$x_libraries"
+fi
 AC_CHECK_LIB(GL, glGetError,found_opengl="yes",,)
 if test x$found_opengl = xyes; then
         echo checking for OpenGL... yes
@@ -118,36 +118,10 @@
 else
 	AC_MSG_RESULT(no)
 	
-	CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer -fexpensive-optimizations -s"
 	NFLAGS="$NFLAGS -O1"
 	ZSNESEXE="zsnes"
 fi
 
-AC_MSG_CHECKING(which processor class to optimize for)
-if test x$debug != xyes; then
-	case "$target" in
-		i486-*-*)
-			CFLAGS="$CFLAGS -march=i486"
-			AC_MSG_RESULT(486)
-			;;
-		i586-*-*)
-			CFLAGS="$CFLAGS -march=pentium"
-			AC_MSG_RESULT(586)
-			;;
-		i686-*-*)
-			CFLAGS="$CFLAGS -march=pentiumpro"
-			dnl CFLAGS="$CFLAGS -march=pentium3 -mmmx -msse -mfpmath=sse,387"
-			AC_MSG_RESULT(686)
-			;;
-		*)
-			AC_MSG_RESULT(386)
-			AC_MSG_WARN(*** This is probably not what you want use --target)
-			;;
-	esac
-else
-	AC_MSG_RESULT(no optimization because debug enabled)
-fi
-
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_MAJOR
I will probably get on irc once the linux system is up.[/code]
franpa
Gecko snack
Posts: 2374
Joined: Sun Aug 21, 2005 11:06 am
Location: Australia, QLD
Contact:

Post by franpa »

a couple a months ago i asked why you cant have the framrate displayed while having afr disabled but i think i never got a response.

and yes it was in its own thread

well now it has been so YAY!!!
safaribans
Rookie
Posts: 15
Joined: Mon Jan 09, 2006 2:22 pm

compile error

Post by safaribans »

HI, guys. Anyway, I'm happy to help too (I've got zsnes running in a chroot in the meantime). I'm running ubuntu dapper amd64 (testing), so some errors here might not be relevant, but there are a bunch of errors at the bottom regarding x86_64_32. This is straight from the cvs repo, as I try to compile it once a week or so and hope it will make. I'm glad the old push and pop errors are gone! :)

/usr/bin/ld: init.o: bad relocation section name `.rel.text'
/usr/bin/ld: ui.o: bad relocation section name `.rel.text'
/usr/bin/ld: vcache.o: bad relocation section name `.rel.text'
/usr/bin/ld: chips/sfxproc.o: bad relocation section name `.rel.text'
/usr/bin/ld: chips/fxemu2.o: bad relocation section name `.rel.text'
/usr/bin/ld: chips/dsp1proc.o: bad relocation section name `.rel.text'
/usr/bin/ld: chips/fxemu2c.o: bad relocation section name `.rel.text'
/usr/bin/ld: chips/fxtable.o: bad relocation section name `.rel.text'
/usr/bin/ld: chips/sa1proc.o: bad relocation section name `.rel.text'
/usr/bin/ld: chips/sa1regs.o: bad relocation section name `.rel.text'
/usr/bin/ld: chips/st10proc.o: bad relocation section name `.rel.text'
/usr/bin/ld: chips/dsp4proc.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/dma.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/dsp.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/dspproc.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/execute.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/irq.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/memory.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/stable.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/table.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/tableb.o: bad relocation section name `.rel.text'
/usr/bin/ld: cpu/tablec.o: bad relocation section name `.rel.text'
/usr/bin/ld: linux/copyvwin.o: bad relocation section name `.rel.text'
/usr/bin/ld: linux/sdlintrf.o: bad relocation section name `.rel.text'
/usr/bin/ld: dos/debug.o: bad relocation section name `.rel.text'
/usr/bin/ld: dos/joy.o: bad relocation section name `.rel.text'
/usr/bin/ld: dos/vesa2.o: bad relocation section name `.rel.text'
/usr/bin/ld: dos/initvid.o: bad relocation section name `.rel.text'
/usr/bin/ld: gui/gui.o: bad relocation section name `.rel.text'
/usr/bin/ld: gui/menu.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/makev16b.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/makev16t.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/makevid.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/mode716.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/mode716b.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/mode716d.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/mode716e.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/mode716t.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/mode7.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/mode7ext.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/newg162.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/newgfx16.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/newgfx2.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/newgfx.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/m716text.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/procvid.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/sw_draw.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/hq2x16.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/hq2x32.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/hq3x16.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/hq3x32.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/hq4x16.o: bad relocation section name `.rel.text'
/usr/bin/ld: video/hq4x32.o: bad relocation section name `.rel.text'
init.o: In function `init.2digits':init.asm:(.text+0x18c): relocation truncated to fit: R_X86_64_32 against symbol `fnamest' defined in COMMON section in uic.o
init.o: In function `init.enddigits':init.asm:(.text+0x1b3): relocation truncated to fit: R_X86_64_32 against symbol `fnamest' defined in COMMON section in uic.o
vcache.o: In function `cachesprites.nextobject':vcache.asm:(.text+0x573e): relocation truncated to fit: R_X86_64_32 against symbol `oamram' defined in .data section in cpu/table.o
chips/sa1regs.o: In function `IRamRead':chips/sa1regs.asm:(.text+0x1e4b): relocation truncated to fit: R_X86_64_32 against `.data'
chips/sa1regs.o: In function `IRamWrite':chips/sa1regs.asm:(.text+0x1e52): relocation truncated to fit: R_X86_64_32 against `.data'
chips/sa1regs.o: In function `IRamWrite2':chips/sa1regs.asm:(.text+0x1e59): relocation truncated to fit: R_X86_64_32 against `.data'
cpu/dspproc.o: In function `ProcessSoundBuffer.pitchmod':cpu/dspproc.asm:(.text+0x6acd): relocation truncated to fit: R_X86_64_32 against symbol `DSPMem' defined in .data section in cpu/dsp.o
cpu/execute.o: In function `reexecuteb2.dma':cpu/execute.asm:(.text+0x26e): relocation truncated to fit: R_X86_64_32 against symbol `dmadata' defined in .data section in cpu/table.o
cpu/execute.o: In function `cpuover.anothercheat':cpu/execute.asm:(.text+0x16a7): relocation truncated to fit: R_X86_64_32 against symbol `cheatdata' defined in .bss section in gui/gui.o
cpu/memory.o: In function `regaccessbankr8.regs':cpu/memory.asm:(.text+0x1efc): relocation truncated to fit: R_X86_64_32 against symbol `regptra' defined in .bss section in ui.o
cpu/memory.o: In function `regaccessbankr16.regs':cpu/memory.asm:(.text+0x2029): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
make: *** [zsnes] Error 1

thanks for a great emulator guys. Every machine I touch gets a copy of zsnes. :)
jorgenmz
New Member
Posts: 4
Joined: Wed Nov 23, 2005 7:41 am
Location: México

Re: compile error

Post by jorgenmz »

safaribans wrote:

Code: Select all

/usr/bin/ld: init.o: bad relocation section name `.rel.text'
/usr/bin/ld: ui.o: bad relocation section name `.rel.text'
/usr/bin/ld: vcache.o: bad relocation section name `.rel.text' 
...
cpu/memory.o: In function `regaccessbankr16.regs':
cpu/memory.asm:(.text+0x2029): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
make: *** [zsnes] Error 1

Yup, same case here. Using the 05 jan WIP.
Post Reply