Author Topic: HuC on Mac OS X  (Read 1502 times)

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: HuC on Mac OS X
« Reply #30 on: July 31, 2012, 12:55:51 PM »
-Werror should be removed from the build process... it turns warnings into errors and can break compilation, even if the resulting binary is technically correct or the warnings are insignificant (such as uninitialized variables and the like).

Ah, didn't even see it there.  I speed-readed through that crap.

yeah.  if you turn off the warnings as errors horse shit, it should just work.


on your Mac.

heh.  get it.
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

nodtveidt

  • Guest
Re: HuC on Mac OS X
« Reply #31 on: July 31, 2012, 02:29:11 PM »

FellipeBr

  • Newbie
  • *
  • Posts: 18
Re: HuC on Mac OS X
« Reply #32 on: July 31, 2012, 02:48:36 PM »
if I remove the -Werror it compiles fine, but then it gives me the Segmentation Fault 11 error on the build of a game.

FellipeBr

  • Newbie
  • *
  • Posts: 18
Re: HuC on Mac OS X
« Reply #33 on: July 31, 2012, 02:53:40 PM »
My env variable is set like this:

PCE_INCLUDE=/Volumes/Iceshard/PCEngine/Compiler/include/pce/
I think it's okay because it can grab the huc.h file ok.

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: HuC on Mac OS X
« Reply #34 on: July 31, 2012, 03:50:55 PM »
well, that's interesting.  It segfaults even with the base-source code, unmodified.

are you on a 64-bit OS?  I wonder if that's causing some kind of retarded issue.
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

FellipeBr

  • Newbie
  • *
  • Posts: 18
Re: HuC on Mac OS X
« Reply #35 on: July 31, 2012, 03:53:27 PM »
Yup, 64 bit here...
It looks like the problem is when it calls the parse() function in main.c

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: HuC on Mac OS X
« Reply #36 on: August 01, 2012, 07:38:04 AM »
parse() itself is a pretty straightfoward routine. Shouldn't be a problem there.
But, it calls blanks() and gch() ( I think that's what they're called )
Both of those routines have problems. Whoever wrote that code wasn't very careful
about their use of promotion from char to int....
Which is probably part of the seg fault error.

Put some printf()'s in the code; call fflush(stdout) after them so they get forced out.
If you can figure out how far it gets, you'll be able to find and probably fix the problem.

And check for an updated gcc version. There is a sequence of the 4.2 series that has problems.

nodtveidt

  • Guest
Re: HuC on Mac OS X
« Reply #37 on: August 01, 2012, 01:09:39 PM »
I'm not surprised that 4.2.x is being used by default... OSX is apparently BSD-based, and the BSD lines have pretty much stuck with 4.2.x due to newer versions adopting the horrible GPL 3.0.