LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Error compiling Zsnes... (https://www.linuxquestions.org/questions/linux-software-2/error-compiling-zsnes-651702/)

BallsOfSteel 06-25-2008 09:00 PM

Error compiling Zsnes...
 
Hey,

I'm trying to compile and install Zsnes 1.51 and I'm coming across an error. The error occurs at the end. I'm not exactly sure why I'm encountering the error.

Code:

[Elwood@localhost src]$ sudo sh ./autogen.sh && gmake && gmake install
Generating build information using aclocal and autoconf...
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-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.13
NASM support                  NASM version 2.01 compiled on Feb 20 2008
zlib support                  Version 1.2.3
PNG support                  Yes, version 1.2.29
OpenGL support                Yes
JMA support                  Yes
ZSNES debugger                Enabled

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

Configure complete, now type 'make' and pray.

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:23:
tools/strutil.h: In static member function ‘static int ci_char_traits::compare(const char*, const char*, size_t)’:
tools/strutil.h:34: error: ‘strncasecmp’ was not declared in this scope
gmake: *** [tools/strutil.o] Error 1

All help is much appreciated.

Thanks,

Brandon

knudfl 06-26-2008 03:29 PM

Which distro are you using ?? Linux "name" and "version" ??
Just an idea : Add it to your profile here at LQ.

Zsnes 1.51 compiles with no errors or warnings.
(gcc 4.1.1, NASM version 0.98.39)

Rgds

BallsOfSteel 06-26-2008 10:17 PM

I'm running Fedora 9 on a Gateway M-152S laptop

Brandon

knudfl 06-27-2008 10:25 AM

Zsnes 1.51 compiles fine with gcc-4.2.3, g++-4.2.3 too,
but not with gcc-4.3, g++-4.3 .

The options are ..1) Rewrite the software to be up to date with 4.3
..2) Compile on another distro or a live distro e.g. PCLinuxOS2007.

..3) Install gcc/gcc-c++ version 4.1.1 or 4.2.3 and change the linking
in /usr/bin to the needed versions. (I find linking to be the easiest
way, instead of pointing to a specific compiler (in the Makefile))

..4) I can try mailing you my result, the binary "zsnes" from Mandriva
2008.1 compiled with 4.2.3 , if you add this option to your profile at
LQ. The file is 3.2 MB. It may work in Fedora 9.

Rgds

BallsOfSteel 06-27-2008 12:48 PM

I'm not exactly sure which version of gcc I have as I am not home right now nor do I have my laptop with me. I edited my profile to allow email. So, go right on ahead and try emailing it over to me and I'll give it a whirl.

Thanks,

Brandon

BallsOfSteel 06-28-2008 03:22 PM

SOLVED! Thanks Knud.

Brandon


All times are GMT -5. The time now is 11:49 AM.