Cannot install ZSENES in Linux

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

Moderator: ZSNES Mods

Post Reply
trucmuche04
New Member
Posts: 3
Joined: Sun Dec 05, 2010 10:18 pm

Cannot install ZSENES in Linux

Post by trucmuche04 »

Hey everyone,

I'm running openSUSE 11.3 and i'm having problems installing zses. i've followed the install.txt instructions and made sure i installed all the required packages.

here's what happens when I type the "make" command:
samuel@linux:~/Zsnes/src> make
g++ -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DNCURSES -D__OPENGL__ -march=native -O3 -fomit-frame-pointer -s -fno-rtti -o parsegen parsegen.cpp -lz
parsegen.cpp: In function ‘char* get_token(char*, const char*)’:
parsegen.cpp:131:38: error: ‘strchr’ was not declared in this scope
parsegen.cpp:140:41: error: ‘strchr’ was not declared in this scope
parsegen.cpp: In function ‘variable::ctype variable::GetCType(const char*)’:
parsegen.cpp:425:42: error: ‘strcmp’ was not declared in this scope
parsegen.cpp: In function ‘const char* convert_asm_type(const char*, bool)’:
parsegen.cpp:615:28: error: ‘strcasecmp’ was not declared in this scope
parsegen.cpp:644:69: error: ‘strlen’ was not declared in this scope
parsegen.cpp:644:70: error: ‘strncmp’ was not declared in this scope
parsegen.cpp: In function ‘void handle_directive(const char*, const char*)’:
parsegen.cpp:1369:40: error: ‘strcasecmp’ was not declared in this scope
parsegen.cpp: In function ‘char* get_comment(char)’:
parsegen.cpp:1500:39: error: ‘strlen’ was not declared in this scope
parsegen.cpp: In function ‘void output_header_conditional(std::ostream&, const char*, const char*)’:
parsegen.cpp:1519:42: error: ‘strcasecmp’ was not declared in this scope
parsegen.cpp: In function ‘void parser_generate(std::istream&, std::ostream&, std::ostream&, const std::string&)’:
parsegen.cpp:1552:74: error: ‘strlen’ was not declared in this scope
parsegen.cpp:1577:36: error: ‘strcasecmp’ was not declared in this scope
parsegen.cpp:1584:93: error: ‘strncasecmp’ was not declared in this scope
parsegen.cpp:1595:33: error: ‘strchr’ was not declared in this scope
parsegen.cpp:1667:94: error: ‘strncmp’ was not declared in this scope
parsegen.cpp:1675:21: error: ‘strcmp’ was not declared in this scope
parsegen.cpp: At global scope:
parsegen.cpp:1825:5: warning: first argument of ‘int main(size_t, const char* const*)’ should be ‘int’
parsegen.cpp: In function ‘int main(size_t, const char* const*)’:
parsegen.cpp:1833:42: error: ‘strncmp’ was not declared in this scope
parsegen.cpp:1837:49: error: ‘strcmp’ was not declared in this scope
make: *** [parsegen] Erreur 1
samuel@linux:~/Zsnes/src>
I appreciate your insight!

Sam
badinsults
"Your thread will be crushed."
Posts: 1236
Joined: Wed Jul 28, 2004 1:49 am
Location: Not in Winnipeg
Contact:

Re: Cannot install ZSENES in Linux

Post by badinsults »

I have to say, you spelled of "zsnes" was wrong twice, with two different spellings. That must be some kind of record.


Secondly, it looks like you are missing some dependencies, in particular glibc.
<pagefault> i'd break up with my wife if she said FF8 was awesome
Gil_Hamilton
Buzzkill Gil
Posts: 4294
Joined: Wed Jan 12, 2005 7:14 pm

Re: Cannot install ZSENES in Linux

Post by Gil_Hamilton »

badinsults wrote:I have to say, you spelled of "zsnes" was wrong twice, with two different spellings. That must be some kind of record.
They're also both novel mis-spellings, instead of the usual zee-nes.
Squall_Leonhart wrote:
You have your 2s, 4s, 8s, 16s, 32s, 64s, and 128s(crash course in binary counting!). But no 1s.
DirectInput represents all bits, not just powers of 2 in an axis.
KHDownloads
badinsults
"Your thread will be crushed."
Posts: 1236
Joined: Wed Jul 28, 2004 1:49 am
Location: Not in Winnipeg
Contact:

Re: Cannot install ZSENES in Linux

Post by badinsults »

Gil_Hamilton wrote:
badinsults wrote:I have to say, you spelled of "zsnes" was wrong twice, with two different spellings. That must be some kind of record.
They're also both novel mis-spellings, instead of the usual zee-nes.
This is a Canadian emulator. It is pronounced "zed-nes"!
<pagefault> i'd break up with my wife if she said FF8 was awesome
Agozer
16-bit Corpse | Nyoron~
Posts: 3534
Joined: Sun Aug 01, 2004 7:14 pm
Location: Nokia Land

Re: Cannot install ZSENES in Linux

Post by Agozer »

I take it that Canadians (the British too?) pronounce the letter Z as "Zed" and Americans as "Zee", yes? I'm a sucker for these things.
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
Johan_H
Starzinger Addict
Posts: 998
Joined: Tue Aug 17, 2004 1:14 pm
Location: Sweden
Contact:

Re: Cannot install ZSENES in Linux

Post by Johan_H »

I'm pretty sure the "zee" is exclusive to the United States.
Though they make up I'm guessing more than half of all native English speakers, so it might be the most common pronunciation after all?
Last edited by Johan_H on Tue Dec 07, 2010 2:08 am, edited 1 time in total.
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Re: Cannot install ZSENES in Linux

Post by paulguy »

Zed es en ee es sounds pretty wrong. Zee es en ee es sounds right in that it kinda flows, and all the words kinda have similar sounds.
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae
trucmuche04
New Member
Posts: 3
Joined: Sun Dec 05, 2010 10:18 pm

Re: Cannot install ZSENES in Linux

Post by trucmuche04 »

badinsults wrote:I have to say, you spelled of "zsnes" was wrong twice, with two different spellings. That must be some kind of record.


Secondly, it looks like you are missing some dependencies, in particular glibc.
When looking at my software manager, I see that I currently have glibc, glibc-devel, glibc-locale (all 2.11.2-3.3.1) and linux-glibc-devel 2.6.32-3.3 installed.

Other variant of glibc that aren't installed are -i18ndata, -info, -obsolete, -profile, -html. Is it that I have to install one of those or is it that the ones I have installed are sufficient and that you misdiagnosed my problem?

I promise to entertain this community with more typos if i get useful help!

Thanks

A Zed-ness fan (that's how I always called it)
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Re: Cannot install ZSENES in Linux

Post by grinvader »

trucmuche04 wrote:Zed-ness
¬_¬
皆黙って俺について来い!!

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
DataPath
Lurker
Posts: 128
Joined: Wed Jul 28, 2004 1:35 am
Contact:

Re: Cannot install ZSENES in Linux

Post by DataPath »

trucmuche04 wrote:When looking at my software manager, I see that I currently have glibc, glibc-devel, glibc-locale (all 2.11.2-3.3.1) and linux-glibc-devel 2.6.32-3.3 installed.

Other variant of glibc that aren't installed are -i18ndata, -info, -obsolete, -profile, -html. Is it that I have to install one of those or is it that the ones I have installed are sufficient and that you misdiagnosed my problem?
Are you missing a few lines from your source?

Code: Select all

#include <cstdlib>
#include <cstring>
I'm guessing this is code being ported from Windows, because under some circumstances, msvc will auto-include certain headers. You also probably need to do something else in order to get strcasecmp.
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Re: Cannot install ZSENES in Linux

Post by kode54 »

MSVC does not auto include any headers. The problem may be that the relevant development headers for those libraries are not installed. Binary distributions usually separate the binary modules from the development headers and linker modules when packaging things, since it saves some disk space and bandwidth, since you don't need the development stuff to run precompiled binaries.
Gonzo
Regular
Posts: 280
Joined: Wed Sep 22, 2004 3:46 am
Location: Tromaville

Re: Cannot install ZSENES in Linux

Post by Gonzo »

Johan_H wrote:I'm pretty sure the "zee" is exclusive to the United States.
Though they make up I'm guessing more than half of all native English speakers, so it might be the most common pronunciation after all?
Nope, Australia too. I think due to something like 70 to 80 percent of the content of Australian television coming from America, it's pretty much intrenched over here too. I have from time to time seen older people correcting younger people(my older sister works in a school, and it's one of her pet peeves). I personally prefer "zee" because I like the sound better. And whenever I hear "Zed" all I can think is, "Zed's dead baby, Zed's dead."
trucmuche04
New Member
Posts: 3
Joined: Sun Dec 05, 2010 10:18 pm

Re: Cannot install ZSENES in Linux

Post by trucmuche04 »

Ok for future reference, here is all I had to do to finally install ZSNES properly

1. Uncompress the downloaded file to a folder and read up all relevant .txt files (readme, install, etc) and install the required dependencies.

2. Go to to /src/tools/strutil.h and add following line of code
#include <strings.h>
3. In the same folder, go to depbuild.cpp and add the following line of code :
#include <cstdlib>
then find the int main function and make it look like this (basically just change the first argument to 'int'):
int main (int argc, const char *const *const argv)
4. Then go back to /src and open parsegen.cpp file and add the following lines :
#include <cstdlib>
#include <cstring>
and do the same modification as previous on the int main function.

5. Then you can run the configure and make command as described in the install.txt file

6. Finally, just typing make install won't work since you need root privilege. Instead, type
sudo make install
It'll ask for root password and then install.

At that point, you should be able to run zsnes by running the zsnes executable.

Now as a final comment... in my books, a program that needs to have lines of code rewritten is not a program that's ready. I've been using Zedness for many years and I've never had to go through any loops and bends in order to install it successfully although I admit it is my first linux install. Now, is that simply the nature of linux or is it bad programming on the part of the zsnes team? In any case, I've installed other program in linux and the installation was as seamless as a windows install. I don't think we should have to go beyond the instructions provided within the readme/install file in order to run zsnes.

That being said, I still want to thank the zsnes team for making snes emulation possible for I think this program is great in all other regards.

Thanks for all the other for their help.
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Re: Cannot install ZSENES in Linux

Post by kode54 »

trucmuche04 wrote:2. Go to to /src/tools/strutil.h and add following line of code
#include <strings.h>
You mean string.h, right?
Jonas Quinn
ZSNES Developer
ZSNES Developer
Posts: 115
Joined: Thu Jul 29, 2004 9:51 pm
Location: Germany

Re: Cannot install ZSENES in Linux

Post by Jonas Quinn »

Starting with GCC 4.3 some C++ include stuff was changed. This version should work with it.
Post Reply