LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-31-2019, 08:02 PM   #1
dedec0
Member
 
Registered: May 2007
Posts: 891

Rep: Reputation: 31
Thumbs down CPP problem compiling Zsnes 1.51 in Debian (it is distributed as source, for linux)


Zsnes is a Super Nintendo Entertainment System (Snes) emulator. Its version 1.51 is the latest available in its official website, and hosted in http://www.fosshub.com/ZSNES.html. While Windows and DOS have zip files containing executable files, linux is given the source. This is not bad at all, pretty much the opposite. After installing some dependencies my Debian did not have, now there is a surprising compilation error.

I found another thread in LQ about Zsnes compilation problems, but my issue is not that one.

After downloading the source and extracting it, i configured it with this command:

Code:
./configure --prefix="/dev/shm/.r/"
That folder exists, as others inside .r (bin, etc, sbin, ..., which are used for some programs installed in different root folders of the OS. This is something i have done with several programs before, and it does not cause any problem. Libraries installed in /lib, /usr/lib or any other "default" folder are used normally, of course.

But i had to install a few dependencies before configure script succeeded. Specifically, i installed packages libncurses5-dev, libtinfo5, libtinfo and nasm. After configure succeeded, a g++ compilation error resulted. I do not know much CPP, so i prefer to ask help here. See my terminal log showing every said in this paragraph:

Code:
$#     My Bash prompt is 2 lines, where the first one contains date, time, last
$# process exit code, $LOGNAME"@"$HOSTNAME: $PWD "\n $ "
$#     To make reading this log easier, i have added comments like this, and
$# also empty lines before every prompt.

2019.07.31 19:42:32 [  0] me@here: /dev/shm
$ mkdir zsnes; cd zsnes

$# downloaded zsnes151src.tar.bz2 to /dev/shm/zsnes

2019.07.31 19:44:18 [  0] me@here: /dev/shm/zsnes
$ tar xjf zsnes151src.tar.bz2 

2019.07.31 19:44:26 [  0] me@here: /dev/shm/zsnes
$ ls
   0 zsnes_1_51  1,1M zsnes151src.tar.bz2

2019.07.31 19:44:27 [  0] me@here: /dev/shm/zsnes
$ cd zsnes_1_51/

2019.07.31 19:44:29 [  0] me@here: /dev/shm/zsnes
docs/		    src/

2019.07.31 19:44:30 [  0] me@here: /dev/shm/zsnes/zsnes_1_51
$ cd zsnes_1_51/src/

2019.07.31 19:44:32 [  0] me@here: /dev/shm/zsnes/zsnes_1_51/src
$  ls
total 924K
 12K acinclude.m4     0 dos         4,0K Makefile.check  4,0K version.c
4,0K argv.h           0 effects     8,0K Makefile.in        0 video
4,0K asm_call.h    8,0K endmem.asm   20K makefile.ms        0 win
4,0K autogen.sh    4,0K gblhdr.h    4,0K md.psr             0 zip
 28K cfg.psr       4,0K gblvars.h      0 mmlib            28K zloader.c
   0 chips            0 gui            0 net             4,0K zloader.h
 44K config.guess     0 icons       4,0K numconv.h        80K zmovie.c
4,0K config.h.in    28K init.asm    4,0K objfix.c        4,0K zmovie.h
 32K config.sub     68K initc.c      56K parsegen.cpp     16K zpath.c
200K configure     8,0K input.psr   8,0K patch.c         4,0K zpath.h
 12K configure.in  8,0K install-sh  8,0K SConstruct       44K zstate.c
   0 cpu              0 jma            0 tools           4,0K ztime.asm
8,0K debugasm.asm     0 linux        16K ui.c            4,0K ztimec.c
 36K debugger.c    4,0K macros.mac   80K vcache.asm

2019.07.31 19:44:32 [  0] me@here: /dev/shm/zsnes/zsnes_1_51/src
$ ./configure --prefix="/dev/shm/.r/"
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 a BSD-compatible install... /usr/bin/install -c
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 ISO C89... 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... no
configure: error: You need NASM installed to compile ZSNES

$# cd /dev/shm/zsnes; download nasm_2.12.01-1+b1_amd64.deb and (try to)
$# install it with normal user, and install it as root:

2019.07.31 19:50:26 [  0] me@here: /dev/shm/zsnes
$ dpkg -i nasm_2.12.01-1+b1_amd64.deb
dpkg: erro: a operação solicitada requer privilégios de superusuário
2019.07.31 19:50:55 [  2] me@here: /dev/shm/zsnes

$ sudo -s
[sudo] senha para me: 
19:51:04 [  0] root@here: /dev/shm/zsnes
# dpkg -i nasm_2.12.01-1+b1_amd64.deb 
A seleccionar pacote anteriormente não seleccionado nasm.
(Lendo banco de dados ... 186850 ficheiros e directórios actualmente instalados.)
A preparar para desempacotar nasm_2.12.01-1+b1_amd64.deb ...
A descompactar nasm (2.12.01-1+b1) ...
Configurando nasm (2.12.01-1+b1) ...
A processar 'triggers' para man-db (2.7.6.1-2) ...

19:51:10 [  0] root@here: /dev/shm/zsnes
# exit

2019.07.31 19:51:14 [  0] me@here: /dev/shm/zsnes
$ cd /dev/shm/zsnes/zsnes_1_51/src

2019.07.31 19:51:14 [  0] me@here: /dev/shm/zsnes/zsnes_1_51/src
$ ./configure --prefix="/dev/shm/.r/"
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 a BSD-compatible install... /usr/bin/install -c
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 ISO C89... 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 sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking for zlib - version >= 1.2.3... yes
checking for libpng - version >= 1.2.0... yes
checking if you want the zsnes debugger... yes
checking for initscr in -lcurses... no
checking for initscr in -lncurses... no
checking for initscr in -lpdcurses... no
configure: error: A curses library is required to use the debugger

$# Yes, i want to try the debugger... why not?

2019.07.31 19:56:39 [ 130] me@here: /dev/shm/zsnes/zsnes_1_51/src
$ cd /dev/shm/zsnes

$# As root, install all Nasm dependencies

2019.07.31 19:56:41 [  0] me@here: /dev/shm/zsnes
$ sudo -s

19:58:00 [  0] root@here: /dev/shm/zsnes
# dpkg -i libtinfo5_6.0+20161126-1+deb9u2_amd64.deb 
(Lendo banco de dados ... 187111 ficheiros e directórios actualmente instalados.)
A preparar para desempacotar libtinfo5_6.0+20161126-1+deb9u2_amd64.deb ...
A descompactar libtinfo5:amd64 (6.0+20161126-1+deb9u2) sobre (6.0+20161126-1+deb9u2) ...
Configurando libtinfo5:amd64 (6.0+20161126-1+deb9u2) ...
A processar 'triggers' para libc-bin (2.24-11+deb9u1) ...

20:00:54 [  0] root@here: /dev/shm/zsnes
# dpkg -i libtinfo-dev_6.0+20161126-1+deb9u2_amd64.deb 
A seleccionar pacote anteriormente não seleccionado libtinfo-dev:amd64.
(Lendo banco de dados ... 187111 ficheiros e directórios actualmente instalados.)
A preparar para desempacotar libtinfo-dev_6.0+20161126-1+deb9u2_amd64.deb ...
A descompactar libtinfo-dev:amd64 (6.0+20161126-1+deb9u2) ...
Configurando libtinfo-dev:amd64 (6.0+20161126-1+deb9u2) ...

20:01:12 [  0] root@here: /dev/shm/zsnes
# dpkg -i libtinfo5_6.0+20161126-1+deb9u2_amd64.deb 
(Lendo banco de dados ... 187121 ficheiros e directórios actualmente instalados.)
A preparar para desempacotar libtinfo5_6.0+20161126-1+deb9u2_amd64.deb ...
A descompactar libtinfo5:amd64 (6.0+20161126-1+deb9u2) sobre (6.0+20161126-1+deb9u2) ...
Configurando libtinfo5:amd64 (6.0+20161126-1+deb9u2) ...
A processar 'triggers' para libc-bin (2.24-11+deb9u1) ...

20:01:18 [  0] root@here: /dev/shm/zsnes
# dpkg -i libncurses5-dev_6.0+20161126-1+deb9u2_amd64.deb 
(Lendo banco de dados ... 187121 ficheiros e directórios actualmente instalados.)
A preparar para desempacotar libncurses5-dev_6.0+20161126-1+deb9u2_amd64.deb ...
A descompactar libncurses5-dev:amd64 (6.0+20161126-1+deb9u2) sobre (6.0+20161126-1+deb9u2) ...
Configurando libncurses5-dev:amd64 (6.0+20161126-1+deb9u2) ...
A processar 'triggers' para man-db (2.7.6.1-2) ...

20:01:25 [  0] root@here: /dev/shm/zsnes
# exit

2019.07.31 20:01:45 [  0] me@here: /dev/shm/zsnes
$ cd /dev/shm/zsnes/zsnes_1_51/src

2019.07.31 20:01:48 [  0] me@here: /dev/shm/zsnes/zsnes_1_51/src
$ ls
total 940K
 12K acinclude.m4   36K debugger.c  4,0K macros.mac       80K vcache.asm
4,0K argv.h           0 dos         4,0K Makefile.check  4,0K version.c
4,0K asm_call.h       0 effects     8,0K Makefile.in        0 video
4,0K autogen.sh    8,0K endmem.asm   20K makefile.ms        0 win
 28K cfg.psr       4,0K gblhdr.h    4,0K md.psr             0 zip
   0 chips         4,0K gblvars.h      0 mmlib            28K zloader.c
 44K config.guess     0 gui            0 net             4,0K zloader.h
4,0K config.h.in      0 icons       4,0K numconv.h        80K zmovie.c
 16K config.log     28K init.asm    4,0K objfix.c        4,0K zmovie.h
 32K config.sub     68K initc.c      56K parsegen.cpp     16K zpath.c
200K configure     8,0K input.psr   8,0K patch.c         4,0K zpath.h
 12K configure.in  8,0K install-sh  8,0K SConstruct       44K zstate.c
   0 cpu              0 jma            0 tools           4,0K ztime.asm
8,0K debugasm.asm     0 linux        16K ui.c            4,0K ztimec.c

2019.07.31 20:01:50 [  0] me@here: /dev/shm/zsnes/zsnes_1_51/src
$ ./configure --prefix="/dev/shm/.r/"
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 a BSD-compatible install... /usr/bin/install -c
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 ISO C89... 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 sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking for zlib - version >= 1.2.3... yes
checking for libpng - version >= 1.2.0... yes
checking if you want the zsnes debugger... yes
checking for initscr in -lcurses... yes
checking for initscr in -lncurses... yes
checking for initscr in -lpdcurses... no
checking if you want libao support... no
checking how to run the C preprocessor... gcc -E
checking for X... libraries , headers 
checking for glGetError in -lGL... yes
checking for OpenGL... yes
checking for JMA support... yes
checking for cpu info... found
checking if you want gdb friendly executable... no
checking which cpu architecture to optimize for... native
checking if you want crazy optimizations... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/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 v1.51

SDL support                   Version 1.2.15
NASM support                  NASM version 2.12.01
zlib support                  Version 1.2.8
PNG support                   Yes, version 1.6.28
OpenGL support                Yes
JMA support                   Yes
ZSNES debugger                Enabled

The binary will be installed in /dev/shm/.r//bin

Configure complete, now type 'make' and pray.

$# Great! It was fairly easy. (: The rest should be guaranteed, i imagined...

2019.07.31 20:01:54 [  0] me@here: /dev/shm/zsnes/zsnes_1_51/src
$ make
g++  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -D__OPENGL__ -march=native -O3 -fomit-frame-pointer -s -fno-rtti -o tools/fileutil.o -c tools/fileutil.cpp
g++  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -D__OPENGL__ -march=native -O3 -fomit-frame-pointer -s -fno-rtti -o tools/strutil.o -c tools/strutil.cpp
In file included from tools/strutil.cpp:22:0:
tools/strutil.h: In static member function ‘static int ci_char_traits::compare(const char*, const char*, size_t)’:
tools/strutil.h:34:96: error: ‘strncasecmp’ was not declared in this scope
 (const char* s1, const char* s2, size_t n) { return strncasecmp( s1, s2, n ); }
                                                                            ^
Makefile:96: recipe for target 'tools/strutil.o' failed
make: *** [tools/strutil.o] Error 1
2019.07.31 20:02:19 [  2] me@here: /dev/shm/zsnes/zsnes_1_51/src
$

Last edited by dedec0; 07-31-2019 at 08:59 PM.
 
Old 07-31-2019, 08:16 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,927

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Hi,

quick question: why are you setting the install prefix to /dev/shm/.raiz/? /dev is not a normal file system. Normally you'd want prefix to be something like /usr/local or perhaps ~/local.

Another quick question: are you aware that zsnes is already packaged for Debian?
https://packages.debian.org/search?keywords=zsnes

strncasecmp should be in strings.h. Does tools/strutil.cpp "#include <cstrings>"?

Evo2.
 
1 members found this post helpful.
Old 07-31-2019, 09:07 PM   #3
dedec0
Member
 
Registered: May 2007
Posts: 891

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by evo2 View Post
Hi,

quick question: why are you setting the install prefix to [...]? /dev is not a normal file system. Normally you'd want prefix to be something like /usr/local or perhaps ~/local.

Another quick question: are you aware that zsnes is already packaged for Debian?
https://packages.debian.org/search?keywords=zsnes

strncasecmp should be in strings.h. Does tools/strutil.cpp "#include <cstrings>"?

Evo2.
Actually, the path that should be in my script output shown above is "/dev/shm/.r" - edited now.

I use RAM when i want to just play with things, for tests or anything that i do not want to write to any permanent memory - since all of them deteriorate with writes.

Yes, i am aware zsnes is packaged. But why should not i compile it? And more than that, why should not i compile it, if the emulator is distributed for linux only as source?

I will look that strutil.cpp file and reply again...

Last edited by dedec0; 08-01-2019 at 08:49 AM.
 
Old 07-31-2019, 09:22 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,927

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Hi,
Quote:
Originally Posted by dedec0 View Post
Actually, the path that should be in my script output shown above is "/dev/shm/.r" - edited now.

I use RAM when i want to just play with things, for tests or anything that i do not want to write to any permanent memory - since all of them deteriorate with writes.
Ok.
Quote:
Originally Posted by dedec0 View Post
Yes, i am aware zsnes is packaged. But why should not i compile it?
I can't tell you why "you" should not compile it, but I can tell you why most people should not.

Quote:
Originally Posted by dedec0 View Post
And more than that, why should not i compile it, if the emulator is distributed for linux only as source?
It's distributed as binaries too, just not by upstream.
Quote:
Originally Posted by dedec0 View Post
I will look that strutil.cpp file and reply again...
What are you actually trying to achieve here?

Evo2.
 
Old 07-31-2019, 09:30 PM   #5
dedec0
Member
 
Registered: May 2007
Posts: 891

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by evo2 View Post
strncasecmp should be in strings.h. Does tools/strutil.cpp "#include <cstrings>"?
Hello again,

tools/strutil.cpp includes strings.h, which now has a new line,

#include <cstrings>

right below "#include <cctype>". The error changed. It seems we need another library? See:

Code:
2019.07.31 23:18:25 [  0] me@here: ..../zsnes_1_51/src
$   cat tools/strutil.h |grep --context=5 cstrings
#define STRUTIL_H

#include <string>
#include <vector>
#include <cctype>
#include <cstrings>

struct ci_char_traits : public std::char_traits<char>
{
  static bool eq(char c1, char c2) { return tolower(c1) == tolower(c2); }
  static bool ne(char c1, char c2) { return tolower(c1) != tolower(c2); }

2019.07.31 23:20:20 [  0] me@here: ..../zsnes_1_51/src
$ make clean
g++  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -D__OPENGL__ -march=native -O3 -fomit-frame-pointer -s -fno-rtti -o tools/strutil.o -c tools/strutil.cpp
In file included from tools/strutil.cpp:22:0:
tools/strutil.h:28:20: fatal error: cstrings: File or dir not found
 #include <cstrings>
                    ^
compilation terminated.
Makefile:96: recipe for target 'tools/strutil.o' failed
make: *** [tools/strutil.o] Error 1

2019.07.31 23:20:53 [  2] me@here: ..../zsnes_1_51/src
$ make
g++  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -D__OPENGL__ -march=native -O3 -fomit-frame-pointer -s -fno-rtti -o tools/strutil.o -c tools/strutil.cpp
In file included from tools/strutil.cpp:22:0:
tools/strutil.h:28:20: fatal error: cstrings: File or dir not found
 #include <cstrings>
                    ^
compilation terminated.
Makefile:96: recipe for target 'tools/strutil.o' failed
make: *** [tools/strutil.o] Error 1

2019.07.31 23:20:56 [  2] me@here: ..../zsnes_1_51/src
$
Should i manually clean? I found very strange that 'make clean' complained about cstrings file, just like the compilation 'make' does.
 
Old 07-31-2019, 09:40 PM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,927

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Hi,

why are you doing this? You will likelyneed to apply all the same patches that were applied by the Debian package maintainer to get it to compile with the default compiler on Buster.

Evo2.
 
Old 07-31-2019, 09:40 PM   #7
dedec0
Member
 
Registered: May 2007
Posts: 891

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by evo2 View Post
I can't tell you why "you" should not compile it, but I can tell you why most people should not.
I would like to be able to compile it. I am not the kind of person who is completely naive in programming things, although i am not expert in many things.

Quote:
Originally Posted by evo2 View Post
It's distributed as binaries too, just not by upstream.
This is one reason for me discovering how to fix the problem. Is it that simple that original developer(s) did not even care to release a fixed version, since more than a decade ago?

Quote:
Originally Posted by evo2 View Post
What are you actually trying to achieve here?
A running zsnes binary, obtained from the given source code.
 
Old 07-31-2019, 09:58 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,927

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Hi,
Quote:
Originally Posted by dedec0 View Post
This is one reason for me discovering how to fix the problem. Is it that simple that original developer(s) did not even care to release a fixed version, since more than a decade ago?
There have been many changes in libc and g++ in that time. I'm not surprised the devs aren't interested in it any more.
Quote:
Originally Posted by dedec0 View Post
A running zsnes binary, obtained from the given source code.
I don't find it particularly enjoyable trying to get old code to work on modern systems. Perhaps you will.

Evo2.
 
Old 07-31-2019, 10:02 PM   #9
dedec0
Member
 
Registered: May 2007
Posts: 891

Original Poster
Rep: Reputation: 31
zsnes is one of the best two Snes emulators for PC today. I would not call its code old. It is just mature, i think - which is very different. 1.51 is its *latest* version.

(...)

):
 
Old 07-31-2019, 11:17 PM   #10
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,803

Rep: Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287Reputation: 1287
Try <cstring> instead of <cstrings>

Edit: I checked it, it is simply old. What worked in 2006, doesn't work in 2019. That's how C++ is.

You might try to fix these problems one-by-one, here is a start:
Code:
sed -i.bak '1i\
#include <cstring>
' tools/strutil.h

Last edited by NevemTeve; 08-01-2019 at 06:36 AM.
 
1 members found this post helpful.
Old 08-01-2019, 08:47 AM   #11
dedec0
Member
 
Registered: May 2007
Posts: 891

Original Poster
Rep: Reputation: 31
Thumbs down

Quote:
Originally Posted by NevemTeve View Post
Try <cstring> instead of <cstrings>

Edit: I checked it, it is simply old. What worked in 2006, doesn't work in 2019. That's how C++ is.

You might try to fix these problems one-by-one, here is a start:
Code:
sed -i.bak '1i\
#include <cstring>
' tools/strutil.h
Really? What a horrible characteristic of C++. |-: After that starting tip you gave, i am working with other problems that appeared. I will soon post again showing my process.
 
Old 08-01-2019, 02:56 PM   #12
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 9,029

Rep: Reputation: 3898Reputation: 3898Reputation: 3898Reputation: 3898Reputation: 3898Reputation: 3898Reputation: 3898Reputation: 3898Reputation: 3898Reputation: 3898Reputation: 3898
Quote:
Originally Posted by dedec0 View Post
zsnes is one of the best two Snes emulators for PC today.
Excuse me what...

I'm afraid you might have been serious, so let me inform you that that is definitely not true. ZSNES is literally the worst SNES emulator ever written. There is no SNES emulator that's as bad. Not bsnes, Not snes9x, Not higan, and not mednafen. ZSNES cannot even handle the intro to A Link to the Past properly.

It's also 32-bit only. I assume your project already knows about that.

If the reason you're actually trying to use ZSNES is for its lightweight system requirements, then look at what RetroPie uses (hint: not ZSNES).

Quote:
Originally Posted by dedec0 View Post
This is one reason for me discovering how to fix the problem.
Uh, it's been discovered. You start by looking at what patches other distros apply. And then you apply them.

https://git.archlinux.org/svntogit/c...packages/zsnes
https://packages.debian.org/stretch/zsnes
https://software.opensuse.org/package/zsnes

Last edited by dugan; 08-01-2019 at 03:59 PM.
 
1 members found this post helpful.
Old 08-01-2019, 11:32 PM   #13
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,624

Rep: Reputation: 105Reputation: 105
Quote:
Originally Posted by dugan View Post
Excuse me what...

I'm afraid you might have been serious, so let me inform you that that is definitely not true. ZSNES is literally the worst SNES emulator ever written. There is no SNES emulator that's as bad. Not bsnes, Not snes9x, Not higan, and not mednafen. ZSNES cannot even handle the intro to A Link to the Past properly.

It's also 32-bit only. I assume your project already knows about that.

If the reason you're actually trying to use ZSNES is for its lightweight system requirements, then look at what RetroPie uses (hint: not ZSNES).


Uh, it's been discovered. You start by looking at what patches other distros apply. And then you apply them.

https://git.archlinux.org/svntogit/c...packages/zsnes
https://packages.debian.org/stretch/zsnes
https://software.opensuse.org/package/zsnes
Good luck with that if he wanted a compiled from source install then he could add the source line in the sources list and build the package with it. It seems to me he is one of those who prefer to fail and ask questions that have already been answered.
 
Old 08-01-2019, 11:37 PM   #14
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,927

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
I'm just sitting back with my popcorn now ;-)
 
  


Reply

Tags
g++ cpp error


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ preprocessor "/lib/cpp" fails sanity check C++ preprocessor "/lib/cpp" fails san mutetikasikali Linux - Software 3 01-25-2014 06:57 AM
ZSNES compiling error ZakuSage Linux - Software 2 08-15-2005 10:10 AM
Segmentation Fault when compiling ZSNES downinthemine Linux - Software 27 07-19-2004 03:47 AM
debian dpkg cpp depends on cpp error darkleaf Linux - Software 2 06-25-2004 01:47 AM
Now I have gcc/cpp/cpp, but still can't install sfingerh Linux - Software 2 07-30-2002 03:13 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration