zsnes on ubuntu intrepid crash
Moderator: ZSNES Mods
Hi guys,
I can also verify that ZSNES 1.51b compiles on Intrepid beta Live CD using gcc-4.3, but crashes with a buffer overflow when executed. Did notice a few warnings when compiling, will post those soon (regarding -march). Compiling with gcc-4.1 did work however. I compiled with the following options:
I am compiling on the 32-bit version of Intrepid and can post more details if needed, just need to reboot to the Live CD again. Noticed a LOT of things wrong with the Intrepid Beta btw, hopefully Ubuntu gets it's act together before release.
ZSNES runs just perfectly on my Debian Lenny x86_64 setup right now, just trying to make a package for the Ubuntu users who have been messaging me. Apologize in advance for stupidity on my part, thanks a lot BTW!
P.S. Hi FranMichaels, nice to see you outside of Ubuntu Forums
EDIT: Official binary in the Ubuntu repos crashed with buffer overflow also, no surprise there. Using binary from Hardy or ones I compiled on Hardy works fine I do believe, back to the Live CD for more testing.
Someone on the Ubuntu Forums suggested this was the cause:
https://wiki.ubuntu.com/CompilerFlags
Beyond my level of knowledge...
I can also verify that ZSNES 1.51b compiles on Intrepid beta Live CD using gcc-4.3, but crashes with a buffer overflow when executed. Did notice a few warnings when compiling, will post those soon (regarding -march). Compiling with gcc-4.1 did work however. I compiled with the following options:
Code: Select all
$ export CC='gcc-4.1'
./configure --enable-libao --enable-release --disable-cpucheck force_arch=i586
ZSNES runs just perfectly on my Debian Lenny x86_64 setup right now, just trying to make a package for the Ubuntu users who have been messaging me. Apologize in advance for stupidity on my part, thanks a lot BTW!
P.S. Hi FranMichaels, nice to see you outside of Ubuntu Forums

EDIT: Official binary in the Ubuntu repos crashed with buffer overflow also, no surprise there. Using binary from Hardy or ones I compiled on Hardy works fine I do believe, back to the Live CD for more testing.
Someone on the Ubuntu Forums suggested this was the cause:
https://wiki.ubuntu.com/CompilerFlags
Beyond my level of knowledge...
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
i586... ?
*sigh*
*sigh*
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
From my understanding, if I was compiling for release, I was *supposed* to compile for a i586 target.
In docs/install.txt
http://pastebin.com/m3e443548
The compile output:
http://pastebin.com/m39c9e688
LDD output:
http://pastebin.com/m1ec4f5ef
The buffer overflow error:
http://pastebin.com/m291d853e
Difference when using GCC 4.3.2 and GCC 4.1 with no force_arch:
http://pastebin.com/m3019363a
http://pastebin.com/m2939f1ed
So is it something seriously fsked up with Ubuntu's GCC package, or is it my own damn fault? Since it is possible to compile and run zsnes on intrepid, I don't think this is a huge deal, just something to be aware of.
In docs/install.txt
As for compiling for 64-bit users, I looked at the GCC 4.3 Docs, and couldn't find the x86-64 option anymore as well. They have generic (says there is no -march=generic options), core2, and amdfam10/barcelona.Compiling for official builds:
...
SDL - Package Maintainers: ./configure --enable-release --disable-cpucheck force_arch=i586
SDL - Personal: ./configure --enable-release
Note this is important to remove certain debug messages, as well
as provide heavy optimization (which could take up to an hour
to compile). It also ensures the builds will work with CPUs
matching i586 or higher.
...
If you are providing an SDL package for a particular arch
greater than i586, replace force_arch=i586 with the proper
one.
dfreer wrote:Should the binaries I compile intended for 64-bit users have a specific force_arch?configure: WARNING: If you intend to distribute this binary, make sure you use force_arch and set to i586 (or whichever CPU Arch you intend for)
EDIT: This is the output of my ./configure using GCC 4.3.2:Nach wrote:Yes. Which one however is a good question. I think you should do force_arch=x86-64. Strangely though I no longer see x86-64 in the documentation for GCC.
http://pastebin.com/m3e443548
The compile output:
http://pastebin.com/m39c9e688
LDD output:
http://pastebin.com/m1ec4f5ef
The buffer overflow error:
http://pastebin.com/m291d853e
Difference when using GCC 4.3.2 and GCC 4.1 with no force_arch:
http://pastebin.com/m3019363a
http://pastebin.com/m2939f1ed
So is it something seriously fsked up with Ubuntu's GCC package, or is it my own damn fault? Since it is possible to compile and run zsnes on intrepid, I don't think this is a huge deal, just something to be aware of.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Setting to i586 is only if you plan to distribute the resulting binary and cannot assume any special instruction set beyond the typical mmx stuff.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
I *am* planning on distributing the binary, in 32-bit/64-bit debian packages for Intrepid, sorry if I didn't make that clear. I'm not nearly qualified to do so, but I didn't like the binaries pre-packaged in the Ubuntu repos (not run with --enable-libao), and was already packaging pSX and some 32-bit libs.grinvader wrote:Setting to i586 is only if you plan to distribute the resulting binary and cannot assume any special instruction set beyond the typical mmx stuff.
Even if I force_arch to my architecture (for an Intel Core 2 Duo T7200 it should be core2 I think), the above problems with 4.3.2 still occur (buffer overflow when executing). I also installed a 32-bit chroot in my Debian Lenny, with GCC 4.3.2 you get similiar warning messages when compiling, but not the checking for cpu info/archopt error, and the resulting binary runs fine.
-
- New Member
- Posts: 4
- Joined: Fri Aug 08, 2008 5:10 am
- Contact:
Hi dfreer. I ended up using the binaries posted by Nach, they work fine. Nice that you are packing something up though.
I tried bsnes, too much for my laptop, snes9x is too clunky. ZSNES for me all the way, plus using it for 10 or so years on multiple platforms it grew on me (and I love making cheats with the thing...)
Can't wait to try the next release whenever it comes out, even though I'm a gtk person (maybe there will be multiple gui's if people care enough, worked for mupen64plus...)
I tried bsnes, too much for my laptop, snes9x is too clunky. ZSNES for me all the way, plus using it for 10 or so years on multiple platforms it grew on me (and I love making cheats with the thing...)
Can't wait to try the next release whenever it comes out, even though I'm a gtk person (maybe there will be multiple gui's if people care enough, worked for mupen64plus...)
Let him choose out of my files, his projects to accomplish.
-- Shakespeare, "Coriolanus"
-- Shakespeare, "Coriolanus"