Show: Today's Messages :: Show Polls :: Message Navigator |
mednafen does not build with gcc-4.4 [message #1439] | Wed, 11 March 2009 11:04 | |||
| ||||
Hi, I'm maintaining mednafen packages in RPM Fusion, which is an add-on package repository for Fedora. The development branch of Fedora, rawhide, recently moved to gcc-4.4 and as a result it is now impossible to build mednafen. The build process dies with the following message:
Some explanation is given here, but unfortunately I don't know how to code so I can't fix it myself | ||||
|
Re: mednafen does not build with gcc-4.4 [message #1440 is a reply to message #1439 ] | Wed, 11 March 2009 11:51 | |||
| ||||
You really only need to change line 421. The other stuff is just GCC being increasingly pedantic with each revision. Line 144: fread(dest->data+offset,1,size,ips); -> int shut_up_gcc___nobody_cares = fread(dest->data+offset,1,size,ips); Line 207: fread(tmp->data,1,tmp->size,(FILE *)tz); -> int the_road_to_hell_is_paved_with_good_warning_message_intentions = fread(tmp->data,1,tmp->size,(FILE *)tz); Line 421: scary, GCC was allowing const char* return to be cast to char* ... Also, this might be slightly dangerous: a path of "/home/foobar/.mednafen/file" would return ".mednafen/file". char *ld = strrchr(path, '.'); -> const char *ld = strrchr(path, '.'); Line 579: I have no idea what's going on here ... Line 678: tough one, gzwrite takes unsigned int for length, returns int (which can be < 0 ... why?) for actual write amount. But length is of type uint64; where sizeof(int) is usually < sizeof(uint64). Meh. if(gzwrite(gp, data, length) != length) -> if(gzwrite(gp, data, length) != (int)length) [Updated on: Wed, 11 March 2009 11:58] | ||||
|
Re: mednafen does not build with gcc-4.4 [message #1441 is a reply to message #1439 ] | Wed, 11 March 2009 12:13 | |||
| ||||
OK, that did the trick. Thanks! | ||||
|
Re: mednafen does not build with gcc-4.4 [message #1442 is a reply to message #1439 ] | Wed, 11 March 2009 13:46 | |||
| ||||
Looks like I spoke too soon. It works on x86_64, but not on ppc64:
Here is the full build log. [Updated on: Wed, 11 March 2009 14:36] | ||||
|
Re: mednafen does not build with gcc-4.4 [message #1443 is a reply to message #1442 ] | Wed, 11 March 2009 15:05 | |||
| ||||
Tons of warnings, but the only error there is: {standard input}: Assembler messages: {standard input}:11673: Error: operand out of domain (26 is not a multiple of 4) That looks like a problem with libc or something ... not sure how you'd fix that. | ||||
|
Re: mednafen does not build with gcc-4.4 [message #1445 is a reply to message #1443 ] | Sun, 15 March 2009 13:55 | |||
| ||||
I added an ExcludeArch, if someone comes up with a fix I'll be happy to share. | ||||
|
Previous Topic: | question for developers of mednafen |
Next Topic: | More info on the NeoGeo Pocket |