You are not logged in.

#1 2008-04-02 10:40:52

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

zsnes fails to build

I tried building zsnes a moment ago, and it failed with this output:

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
make: *** [tools/strutil.o] Error 1
==> ERROR: Build Failed.

Offline

#2 2008-04-02 11:43:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: zsnes fails to build

gcc-4.3 cleaned up the C++ header files.  It looks like tools/strutils.h needs an "#include <cstring>" or possibly and "#include <cstdlib>" added to the top.  It will take a while for the PKGBUILDs to all be updated.

Offline

#3 2008-04-02 11:52:34

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: zsnes fails to build

New Error:

tools/depbuild.cpp: In function 'void dependency_calculate_asm(const char*)':
tools/depbuild.cpp:133: error: 'system' was not declared in this scope
tools/depbuild.cpp: At global scope:
tools/depbuild.cpp:186: error: first argument of 'int main(size_t, const char* const*)' should be 'int'
make: *** [tools/depbuild] Error 1

Offline

#4 2008-04-02 12:55:12

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: zsnes fails to build

Add "#include <cstdlib>" to tools/depbuild.cpp

You do realize the zsnes in in extra right...

Last edited by Allan (2008-04-02 12:56:05)

Offline

#5 2008-04-02 13:15:29

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: zsnes fails to build

I'm still getting this error:

tools/depbuild.cpp:187: error: first argument of 'int main(size_t, const char* const*)' should be 'int'
make: *** [tools/depbuild] Error 1

And yes, I know that zsnes is in extra.  I'm doing a build with customized flags.

Offline

#6 2008-04-02 13:39:29

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: zsnes fails to build

As a guess...  find the definition of the main function in depbuild.cpp and change the declaration of int for the first parameter to size_t.

Offline

#7 2008-04-02 19:04:32

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: zsnes fails to build

Thanks, that seems to have worked.

Offline

#8 2009-08-26 14:55:08

ixregardo
Member
Registered: 2009-08-26
Posts: 1

Re: zsnes fails to build

Hi there!
I know this is an old thread, but I came across it just now and I'm having the same problem as Falcata was. I was able to follow you through adding the libraries to strutils and depbuild but the last step, changing the declaration of int to size_t, confused me. Can you clarify what I need to type in place of int main(size_t argc, const char *const *const argv)?
I hope I haven't been rude to bump this post. Thanks a whole lot for any help you can give me.
Best,
Diane

Just in case, here is the error message (in full) that I am getting when I "make"

g++  -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__  -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -march=i386 -O3 -fomit-frame-pointer -s -fno-rtti -o tools/depbuild tools/depbuild.cpp tools/fileutil.o tools/strutil.o
tools/depbuild.cpp: In function 'void dependency_calculate_asm(const char*)':
tools/depbuild.cpp:134: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result
tools/depbuild.cpp: At global scope:
tools/depbuild.cpp:187: error: first argument of 'int main(size_t, const char* const*)' should be 'int'
make: *** [tools/depbuild] Error 1

Offline

#9 2009-09-13 11:24:58

lairyaus
Member
Registered: 2009-09-13
Posts: 1

Re: zsnes fails to build

You are going to kick yourself wink

int main(int argc, const char *const *const argv)

Offline

#10 2009-09-13 11:51:59

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: zsnes fails to build

As per the Forum Etiquette, you should
a) not hijack other people's topics to get your own solved and
b) not kick topics over 6 months old.

If you have a problem, feel free to open a topic yourself and to link to the relevant previous topics. I'm shutting this one down.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB