Compiling Issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gregian
    Rookie
    • Jun 2008
    • 4

    Compiling Issues

    I'm sorry if this has already been answered, but I dug around a bit before posting this and I didn't find any answers for it elsewhere.

    I'm wanting to compile the latest release on a shell account I have on a BSD system and it's giving me issues. After I extract the archive, I run

    ./configure --prefix=/home/[...]/angband

    which works fine, but when I try to run make, the makefile doesn't even start correctly. I get this error:

    "mk/objective.mk", line 264: Need an operator
    Fatal errors encountered -- cannot continue

    Any insight would be very helpful.

    Thanks in advance.
  • roustk
    Adept
    • Dec 2007
    • 167

    #2
    I won't be much help (because I don't understand quite how Angband's Makefile is cobbled together). I wonder if it is a version problem, however.

    What version of make are you using ( make -v )?

    edit: For my (FreeBSD-ish) Mac, it is "GNU Make 3.81". My worry is that the Makefile is tuned for GNU make (sometimes installed as gmake), not unix make.

    Comment

    • Gregian
      Rookie
      • Jun 2008
      • 4

      #3
      make -v doesn't display the version; as a matter of fact man make doesn't list any command line args that cause make to display its version. (It's also not listed in the man itself, although the man does mention that it is BSD make.) I'm not sure what the version number is.

      Comment

      • takkaria
        Veteran
        • Apr 2007
        • 1951

        #4
        Originally posted by Gregian
        I'm sorry if this has already been answered, but I dug around a bit before posting this and I didn't find any answers for it elsewhere.

        I'm wanting to compile the latest release on a shell account I have on a BSD system and it's giving me issues. After I extract the archive, I run

        ./configure --prefix=/home/[...]/angband

        which works fine, but when I try to run make, the makefile doesn't even start correctly. I get this error:

        "mk/objective.mk", line 264: Need an operator
        Fatal errors encountered -- cannot continue

        Any insight would be very helpful.

        Thanks in advance.
        What BSD system in particular is it? I don't have any handy to test, but I thought that the configure script ran on at least some of them.
        takkaria whispers something about options. -more-

        Comment

        • Bandobras
          Knight
          • Apr 2007
          • 726

          #5
          If there was hope, somebody would have mentioned this, but still: doesn't 'make -f Makefile.std' work out of the box?

          Comment

          • zaimoni
            Knight
            • Apr 2007
            • 590

            #6
            Originally posted by Gregian
            make -v doesn't display the version; as a matter of fact man make doesn't list any command line args that cause make to display its version. (It's also not listed in the man itself, although the man does mention that it is BSD make.) I'm not sure what the version number is.
            The problem almost certainly is that it isn't GNU make. (Insofar as I could recover any documentation at all about the Objective Make makefile approach, it was explicitly designed to use GNU make extensions heavily.)

            That close, I have to wonder if objective.mk could be patched to handle both GNU make and BSD make.
            Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
            Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
            Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

            Comment

            • roustk
              Adept
              • Dec 2007
              • 167

              #7
              Originally posted by Bandobras
              If there was hope, somebody would have mentioned this, but still: doesn't 'make -f Makefile.std' work out of the box?
              In 3.0.9b (and probably many versions before it, the first comment in Makefile.std is:
              # This makefile probably requires GNU make.

              I presume that ./configure would have used GNU make (gmake) if it could find it, which means that the trick is to find the GNU-specific hooks in the Makefile so that it can be rewritten for BSD make.

              Comment

              • Gregian
                Rookie
                • Jun 2008
                • 4

                #8
                Originally posted by takkaria
                What BSD system in particular is it? I don't have any handy to test, but I thought that the configure script ran on at least some of them.
                Login states OpenBSD 4.2.

                Also, no, cd src && make -f Makefile.std doesn't work... I get:

                "Makefile.std", line 75: Need an operator
                "Makefile.std", line 88: Missing dependency operator
                "Makefile.std", line 90: Need an operator
                Fatal errors encountered -- cannot continue

                Comment

                • roustk
                  Adept
                  • Dec 2007
                  • 167

                  #9
                  Originally posted by Gregian
                  Login states OpenBSD 4.2.
                  It looks like gmake is available as a package for OpenBSD on most machines (I checked i386, sparc, and vax). Sounds like a command like "pkg_add gmake" will work, although I can't find great documentation about it (probably need superuser access).

                  Comment

                  • takkaria
                    Veteran
                    • Apr 2007
                    • 1951

                    #10
                    Originally posted by Gregian
                    Login states OpenBSD 4.2.

                    Also, no, cd src && make -f Makefile.std doesn't work... I get:

                    "Makefile.std", line 75: Need an operator
                    "Makefile.std", line 88: Missing dependency operator
                    "Makefile.std", line 90: Need an operator
                    Fatal errors encountered -- cannot continue
                    I'm afraid I can't help you any further with this-- I can't get access to a machine (virtual or otherwise) running OpenBSD. However, I've added a bug to the bugtracker so it won't be forgotten if/when I can. Hopefully someone else can help...?
                    takkaria whispers something about options. -more-

                    Comment

                    • Nick
                      Vanilla maintainer
                      • Apr 2007
                      • 9634

                      #11
                      I've had report of someone compiling FAangband in OpenBSD 4.3, and the FA build system was borrowed form Vanilla at about 3.0.8. I don't know if that helps.
                      One for the Dark Lord on his dark throne
                      In the Land of Mordor where the Shadows lie.

                      Comment

                      • Nick
                        Vanilla maintainer
                        • Apr 2007
                        • 9634

                        #12
                        Originally posted by Nick
                        I've had report of someone compiling FAangband in OpenBSD 4.3, and the FA build system was borrowed form Vanilla at about 3.0.8. I don't know if that helps.
                        Here's some more detail from my OpenBSD-using correspondent (who, incidentally, had emailed me a bugfix for my mysterious FA room-lighting bug) (and incidentally incidentally, I note that my last post was number 8888 ):

                        Compiling FA was easier than expected. Most software these days
                        require GNU make and I used OpenBSD make.

                        ./configure && rm -rf src/.depend && make

                        should work. .depend still refers to SDL headers, even though
                        none are installed on the system.

                        There is an Angband (3.06) package for OpenBSD, which I have used
                        in the past. I just compiled 3.09b from source. Had to remove the last
                        line "-include .depend" from mk/objective.mk . After this change
                        OpenBSD make builds angband. The game starts and I was able to enter
                        the dungeon.
                        One for the Dark Lord on his dark throne
                        In the Land of Mordor where the Shadows lie.

                        Comment

                        • Gregian
                          Rookie
                          • Jun 2008
                          • 4

                          #13
                          I got very similar advice from RGRA, and it did indeed work; although all I had to do was remove the last line of the mentioned makefile and make went through quite cleanly. My current problem is that there are no colors; but I realize this is a much more difficult problem to diagnose, so I'm not actually expecting anything. It's not critical anyway; I'll just have to be careful =)

                          Comment

                          • roustk
                            Adept
                            • Dec 2007
                            • 167

                            #14
                            Originally posted by Gregian
                            My current problem is that there are no colors
                            (I can't post to RGRA, but I have read access. So, horrible crosspost.)

                            You probably should double-check the ANSI color test that you did there. There was a typo in the post that suggested it -- the less-explicit form is correct, not the more-explicit.

                            To make your terminal red text on a black background, run a command like this in your unix shell:
                            Code:
                              echo "^[[0;31;40m"
                            where the '^[' is an escape recorded with 'ctrl-V esc' (it is actually ASCII character 0x1B, which is difficult to type).

                            What this does is have the unix shell send the stuff in quotes to the screen, where it is interpreted by your terminal. The first two characters (^[[) tell the terminal that what follows is a command to change some settings. The semicolon separated list of numbers represents colors in various places (0=reset, 31=red FG, 40=black BG), and "m" tells it to use the numbers to set the "mode".

                            See http://graphcomp.com/info/specs/ansi_col.html#colors.

                            If it seems that you can't change your colors, you might want to try some of the simpler codes, like:
                            Code:
                              echo "^[[6n"
                            which should get a response like "^[[16;1R" telling you that your cursor in in row 16, column 1.

                            Comment

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