Mac OSX 3.2 Won't load

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Derakon
    Prophet
    • Dec 2009
    • 8820

    #16
    Looks like somewhere along the line the OSX build stopped being PPC compatible. Unfortunate.

    In the meantime you might try an older version. The game hasn't changed that much.

    Comment

    • fxm
      Rookie
      • Dec 2011
      • 7

      #17
      Originally posted by Derakon
      Looks like somewhere along the line the OSX build stopped being PPC compatible. Unfortunate.

      In the meantime you might try an older version. The game hasn't changed that much.
      I'm doing all of this on a PPC G5 running OS X 10.5.8. The version of Xcode (v 3.1.3) is supposed to be the last one for PPC. So you are saying the it's a problem with the source code, and not what I am trying, correct?

      Oh well, as you say, older versions still work fine. I've been playing 3.1 for a few years, now. I've never gotten 3.2 to work on PPC either. Could you please make note on the downloads page that the last PPC compatible release seems to be 3.1?

      I saw this in another thread about a similar problem with 3.2:

      "The devs seem to have a lead on the problem having to do with Stack Protection code (go to the ticket to get the gory details). But I was able to find a temporary solution by compiling from source on my machine, after removing the -arch i386 flag. So until the bug is fixed, one can try that as a temporary fix."

      Could you tell me how I might "remove the - arch i386 flag" and try compiling again?

      Thanks for your help.

      Comment

      • Derakon
        Prophet
        • Dec 2009
        • 8820

        #18
        Ah, yes, that might well do it. The "-arch i386" stuff is telling the computer to try compiling for Intel processors, and I wouldn't be surprised if the PPC computer can't do that. What you want to do is open the src/Makefile.osx file and change this line:
        Code:
        ARCH = -arch i386 -arch ppc
        to be this:
        Code:
        ARCH = -arch ppc
        Hope that works!

        Comment

        • fxm
          Rookie
          • Dec 2011
          • 7

          #19
          Originally posted by Derakon
          Ah, yes, that might well do it. The "-arch i386" stuff is telling the computer to try compiling for Intel processors, and I wouldn't be surprised if the PPC computer can't do that. What you want to do is open the src/Makefile.osx file and change this line:
          Code:
          ARCH = -arch i386 -arch ppc
          to be this:
          Code:
          ARCH = -arch ppc
          Hope that works!
          Ah-ha! Much closer!

          Now I'm just getting a few pages of undefined symbols errors:

          Undefined symbols:
          "_Rand_div", referenced from:
          _play_sound in main-crb.o
          "_pause_line", referenced from:
          _CommandCommand in main-crb.o
          ...

          I was still getting "architecture" errors until I edited out a few other i386 commands in Makefile.osx. Now it just seems to be undefined symbols in src/main-crb.o. That file doesn't even exist until the compile creates it.

          Any other tips to get past this hurdle? I think I'm learning quite a bit just from poking around the source files.

          Thanks!

          Comment

          • myshkin
            Angband Devteam member
            • Apr 2007
            • 327

            #20
            Originally posted by fxm
            Ah-ha! Much closer!

            Now I'm just getting a few pages of undefined symbols errors:

            Undefined symbols:
            "_Rand_div", referenced from:
            _play_sound in main-crb.o
            "_pause_line", referenced from:
            _CommandCommand in main-crb.o
            ...
            Hm, did you run make -f Makefile.osx clean after your edits? It looks as if not all the objects built properly.

            I don't know what else you edited, but I think you'll need to change the stanza starting with $(EXE).o: $(OBJS) to something like

            Code:
            $(EXE).o: $(OBJS)
                    $(LD) -r -arch ppc -o $@ $(OBJS)
            Note that the whitespace in front of the second line must be a tab.

            Comment

            • fxm
              Rookie
              • Dec 2011
              • 7

              #21
              Originally posted by myshkin
              Hm, did you run make -f Makefile.osx clean after your edits? It looks as if not all the objects built properly.

              I don't know what else you edited, but I think you'll need to change the stanza starting with $(EXE).o: $(OBJS) to something like

              Code:
              $(EXE).o: $(OBJS)
                      $(LD) -r -arch ppc -o $@ $(OBJS)
              Note that the whitespace in front of the second line must be a tab.
              I may be in over my head, but here's what I did. I started with a cleanly unpacked source directory, modified the Makefile.osx as follows:

              I changed this:

              ARCH = -arch i386 -arch ppc

              to this:

              ARCH = -arch ppc


              and I changed this:

              $(EXE).o: $(OBJS)
              $(LD) -r -arch ppc -o $@.ppc $(OBJS)
              $(LD) -r -arch i386 -o $@.i386 $(OBJS)
              lipo -arch ppc $@.ppc -arch i386 $@.i386 -create -output angband.o

              $(EXE): $(EXE).o $(OSX_OBJS)
              $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(EXE).o $(OSX_OBJS) $(LIBS)

              ppc: $(OBJS)
              $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(OBJS) $(LIBS)

              borg: $(OBJS) $(BOBJS)
              $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(OBJS) $(BOBJS) $(LIBS)

              #
              # Clean up old junk
              #

              clean:
              -rm -f $(OBJS) $(EXE) $(EXE).o.ppc $(EXE).o.i386 $(EXE).o $(OSX_OBJS)


              to this:


              $(EXE).o: $(OBJS)
              $(LD) -r -arch ppc -o $@.ppc $(OBJS)
              lipo -arch ppc $@.ppc -create -output angband.o

              $(EXE): $(EXE).o $(OSX_OBJS)
              $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(EXE).o $(OSX_OBJS) $(LIBS)

              ppc: $(OBJS)
              $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(OBJS) $(LIBS)

              borg: $(OBJS) $(BOBJS)
              $(CC) $(CFLAGS) $(LDFLAGS) -o $(EXE) $(OBJS) $(BOBJS) $(LIBS)

              #
              # Clean up old junk
              #

              clean:
              -rm -f $(OBJS) $(EXE) $(EXE).o.ppc $(EXE).o $(OSX_OBJS)



              But I'm still getting pages of:
              ld warning: in attack.o, file is not of required architecture
              ld warning: in birth.o, file is not of required architecture
              ...

              and

              Undefined symbols:
              "_Rand_div", referenced from:
              _play_sound in main-crb.o
              "_pause_line", referenced from:
              _CommandCommand in main-crb.o
              ...

              I think this may be beyond my limited skills at the moment. If there's anything else you'd like me to try, or if you would like me to test anything you compile, I'd be happy to give it a go.

              Thanks.

              Comment

              • myshkin
                Angband Devteam member
                • Apr 2007
                • 327

                #22
                Originally posted by fxm
                But I'm still getting pages of:
                ld warning: in attack.o, file is not of required architecture
                ld warning: in birth.o, file is not of required architecture
                ...

                and

                Undefined symbols:
                "_Rand_div", referenced from:
                _play_sound in main-crb.o
                "_pause_line", referenced from:
                _CommandCommand in main-crb.o
                ...

                I think this may be beyond my limited skills at the moment. If there's anything else you'd like me to try, or if you would like me to test anything you compile, I'd be happy to give it a go.

                Thanks.
                Thanks for following up. Are you tied to playing 3.2.0? If not, that makes life a little simpler, as I can have you try out autobuilds of 3.4-dev once I have the ppc-related changes committed. If you'd like to keep trying on your own, what's the output of file attack.o? It sounds as if you're still building i386 object files, despite having told the compiler to build ppc object files.

                Comment

                • AnonymousHero
                  Veteran
                  • Jun 2007
                  • 1322

                  #23
                  I seem to recall some tarballs of Angband containing already-compiled .o files. Maybe this is one of those?

                  Comment

                  • fxm
                    Rookie
                    • Dec 2011
                    • 7

                    #24
                    Originally posted by myshkin
                    Thanks for following up. Are you tied to playing 3.2.0? If not, that makes life a little simpler, as I can have you try out autobuilds of 3.4-dev once I have the ppc-related changes committed. If you'd like to keep trying on your own, what's the output of file attack.o? It sounds as if you're still building i386 object files, despite having told the compiler to build ppc object files.
                    No, I'm not tied to 3.2 at all. I just thought since it's the current Mac release version that it would be easier to get running. I'd be happy to help out with the 3.4 builds.

                    The src/attack.o file seems to be mostly non-ascii output. Also, it doesn't seem to be modified by the compiling process, as its Date Modified remains the same as the rest of the src files. Is there something else you mean by the attack.o output? Is there something I should be viewing its contents with other than a text editor?

                    It looks like this to me:

                    L

                    Hmm. I can't paste it into the forum. I'm guessing it's interpreting it properly as binary data, and that's what those "0001" and "0004" icons are.

                    Comment

                    • Derakon
                      Prophet
                      • Dec 2009
                      • 8820

                      #25
                      What myshkin meant was to run this command:
                      Code:
                      file attack.o
                      "file" is a program you can run to have the computer tell you what kind of file it thinks attack.o is. For example, on my computer I get this output when I run that command:
                      Code:
                      attack.o: Mach-O universal binary with 2 architectures
                      attack.o (for architecture i386):	Mach-O object i386
                      attack.o (for architecture x86_64):	Mach-O 64-bit object x86_64

                      Comment

                      • AnonymousHero
                        Veteran
                        • Jun 2007
                        • 1322

                        #26
                        I just double checked. If you downloaded the "angband-3.2.0.tar.gz" tarball then it already contains compiled *.o files.

                        You need to delete them manually before compiling.

                        Comment

                        Working...
                        😀
                        😂
                        🥰
                        😘
                        🤢
                        😎
                        😞
                        😡
                        👍
                        👎