ZSNES board Forum Index ZSNES board
ZSNES and other SNES related stuff
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Fixed in svn] zsnes 1.51 fails to compile with gcc 4.2.0

 
Post new topic   Reply to topic    ZSNES board Forum Index -> Bug Reports/Feature Requests
View previous topic :: View next topic  
Author Message
ivanovic
New Member


Joined: 22 Jul 2007
Posts: 2

PostPosted: Sun Jul 22, 2007 9:02 pm    Post subject: [Fixed in svn] zsnes 1.51 fails to compile with gcc 4.2.0 Reply with quote

I am running gentoo and not able to compile using gcc 4.2.0, when reporting it at the gentoo tracker, they told me that it is a bug that has to be fixed by you. As reference here the link to the bug in the gentoo tracker:
http://bugs.gentoo.org/show_bug.cgi?id=186111

And in short to rephrase:
Code:
tools/fileutil.cpp:0: warning: -fprefetch-loop-arrays not supported for this
target (try -march switches)
tools/fileutil.cpp:1: warning: -fprefetch-loop-arrays not supported for this
target (try -march switches)
tools/strutil.cpp:0: warning: -fprefetch-loop-arrays not supported for this
target (try -march switches)
tools/strutil.cpp:1: warning: -fprefetch-loop-arrays not supported for this
target (try -march switches)
i686-pc-linux-gnu-g++  -march=nocona -O2 -pipe -g -I. -D__UNIXSDL__
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -D__OPENGL__ -march=i386 -O3
-fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr  -D__RELEASE__
-fno-rtti -o tools/depbuild tools/depbuild.cpp tools/fileutil.o tools/strutil.o
tools/depbuild.cpp:1: warning: -fprefetch-loop-arrays not supported for this
target (try -march switches)
/var/tmp/portage/games-emulation/zsnes-1.51-r1/temp/ccCLCDvf.o: In function
`__exchange_and_add':
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h:51:
undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h:51:
undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h:51:
undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h:51:
undefined reference to `__sync_fetch_and_add_4'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4/ext/atomicity.h:51:
undefined reference to `__sync_fetch_and_add_4'
/var/tmp/portage/games-emulation/zsnes-1.51-r1/temp/ccCLCDvf.o:/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/include/g++-v4/bits/basic_string.h:288:
more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld returned 1 exit status
make: *** [tools/depbuild] Error 1

These are my systemwide settings:

CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -g"
CHOST="i686-pc-linux-gnu"
Portage 2.1.3_rc8 (default-linux/x86/2007.0, gcc-4.2.0, glibc-2.6-r0, 2.6.22
i686)

The comment from a gentoo dev (including a hint to where the problem in your codebase lies):
Quote:
tools/archopt.c does not work under gcc 4.2 and we have not time to fix it.
use custom-cflags or don't use one of the most buggest gcc ever (4.2)
please open a bug upstream or reopen this bug with a patch


I hope that bug is soon fixed in svn and the fix included in a release.


Last edited by ivanovic on Sun Jul 22, 2007 10:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
ivanovic
New Member


Joined: 22 Jul 2007
Posts: 2

PostPosted: Sun Jul 22, 2007 10:40 pm    Post subject: Reply with quote

Okay, I just tested svn with the ebuild linked here (gentoo forums) because the one linked in this forum gives me a "file not found" error. Now to the more important part:

With this ebuild svn builds fine with gcc 4.2.0. So the problem I reported is already fixed in svn, thanks.

And now a little request:
Maybe a new release would be nice so that other fellow gcc 4.2.0 users can build zsnes without having to bother with getting the svn version and making it work.
Back to top
View user's profile Send private message
Deathlike2
ZSNES Developer
ZSNES Developer


Joined: 28 Dec 2004
Posts: 6982

PostPosted: Sun Jul 22, 2007 11:55 pm    Post subject: Reply with quote

ivanovic wrote:
And now a little request:
Maybe a new release would be nice so that other fellow gcc 4.2.0 users can build zsnes without having to bother with getting the svn version and making it work.


With the current state of the code, that isn't happening anytime soon.

Besides, the latest compilers have their own bugs to deal with and it is irresponsible to blame ZSNES when the compiler is as fault (you clearly did not interpret the comment properly when he suggests that 4.2.x is buggy).

Latest version != best or good.
_________________
Continuing FF4 Research...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ZSNES board Forum Index -> Bug Reports/Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group