Compiling NPP on Ubuntu questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnonymousHero
    Veteran
    • Jun 2007
    • 1393

    #16
    Originally posted by ghengiz
    That's...interesting.
    I checked Makefile.std, and it does *not* mention libSDL-1.2.so.0 explicitely, but just the ttf, image and mixer components.
    AFAIUI, it's probably relying on the old behavior of binutils/ld which was to also pull in dependencies -- so, for example, libSDL-ttf depends on libSDL which would mean that libSDL would get linked in too automatically. Not sure why it was changed.

    Comment

    • nppangband
      NPPAngband Maintainer
      • Dec 2008
      • 926

      #17
      Originally posted by AnonymousHero
      Is there an "nppangband" file?
      Only the output file. I am reading up on makefiles to try to understand exactly where it fails. As I understand the output, it sucessfully compiled all of the "o' files and failed when it tried to put them all together into the NPPAngband binary.

      Originally posted by AnonymousHero
      "Missing separator" is usually a sign that the whitespace (tab vs. spaces) is messed up, I think. You might want to double-check the Makefile indentation in an editor where you can distinguish tab from normal spaces.
      (Perhaps line 5, given the error message?)
      I am searching for that, but I don't see anything yet.

      Dumb question (NPP makefiles are almost identical on the Angband makefiles in Angband 3.1.2, so anyone familiar with the Angband makefiles can answer this): On windows, I compile with makefile.win, which uses makefile.inc (which in turn uses makefile.src). On linux, makefile includes makefile.src, but not makefile.inc. Makefile.std sppears to be a template makefile not specifically by either system at this time. Have I read that correctly?
      NPPAngband current home page: http://nppangband.bitshepherd.net/
      Source code repository:
      https://github.com/nppangband/NPPAngband_QT
      Downloads:
      https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

      Comment

      • Mikko Lehtinen
        Veteran
        • Sep 2010
        • 1246

        #18
        Originally posted by AnonymousHero
        Is there an "nppangband" file?

        "Missing separator" is usually a sign that the whitespace (tab vs. spaces) is messed up, I think. You might want to double-check the Makefile indentation in an editor where you can distinguish tab from normal spaces.
        (Perhaps line 5, given the error message?)
        I googled for "missing separator" and found out that GNU Make and most other Unix Make programs always require TABs at a beginning of a command in a rule, not empty spaces.

        "Another, more rare, cause of the above error message is if you use static pattern rules (with the % character) incorrectly. Read the documentation that comes with Make carefully and try to find the error."

        Comment

        • AnonymousHero
          Veteran
          • Jun 2007
          • 1393

          #19
          Originally posted by Mikko Lehtinen
          I googled for "missing separator" and found out that GNU Make and most other Unix Make programs always require TABs at a beginning of a command in a rule, not empty spaces.
          I'm sure it made sense at the time, but... Worst. Idea. Ever.

          Comment

          • nppangband
            NPPAngband Maintainer
            • Dec 2008
            • 926

            #20
            I found the tab issue I posted above, and made it a little further. Hopefully I am getting close to compiling. More dumb questions to follow.
            NPPAngband current home page: http://nppangband.bitshepherd.net/
            Source code repository:
            https://github.com/nppangband/NPPAngband_QT
            Downloads:
            https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

            Comment

            • nppangband
              NPPAngband Maintainer
              • Dec 2008
              • 926

              #21
              In the "I am posting this so other devs will hopefully tell me that things like this occasionally happen to them too" department:

              So after another 3 hours of trying to find problems and missing tabs in makefile and makefile.inc in the *src directory, and getting the same error messages over and over regardless of what I did, my frustration levels are too high for me to think. I take a break & go for a walk with my dog, and it suddenly dawns on me that the instructions in makefile and makefile.inc have been completed, the compiler moved on to the makefiles in the *lib directory, and that is where the errors are. Sure enough, that was it. 2 lessons learned: Never try to fix the same problem for too long......that, and after 30 minutes your time is better spent with your dog.
              NPPAngband current home page: http://nppangband.bitshepherd.net/
              Source code repository:
              https://github.com/nppangband/NPPAngband_QT
              Downloads:
              https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

              Comment

              • Derakon
                Prophet
                • Dec 2009
                • 9022

                #22
                Yep, I know that feeling. 30 minutes of banging your head against a wall is a sign that it's time to switch focus to something else. The trick is recognizing that this has happened, since we tend to get a bit too wrapped up in what we're doing.

                Glad to hear you got it worked out though.

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9634

                  #23
                  My favourite is spending several hours trying to work out why none of my bugfixes are working, only to discover I'm still running the original executable.
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • Magnate
                    Angband Devteam member
                    • May 2007
                    • 5110

                    #24
                    Originally posted by Nick
                    My favourite is spending several hours trying to work out why none of my bugfixes are working, only to discover I'm still running the original executable.
                    +1. Make clean; make is our friend.
                    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                    Comment

                    • nppangband
                      NPPAngband Maintainer
                      • Dec 2008
                      • 926

                      #25
                      OK, thanks to all your help I am happy to report that the NPPAngband source on Github (Work-in-Progress branch) now compiles in Ubuntu. I am not quite there yet as I need to ask how to get it to run:

                      I compiled using the commands:
                      ./autogen
                      ./configure
                      make


                      After comiling, the executable is in the *npp/src directory. I moved it to the base *NPP directory, and tried to run it with "./nppangband". I re-checked the permissions to make sure an executable can run there.

                      I get this error:
                      ./nppangband: Cannot create '/usr/local/share/nppangband/info'

                      I also tried make install, but I get this error:

                      /usr/bin/install: cannot create regular file `/usr/local/games/nppangband': Permission denied
                      Failed to install nppangband!
                      make[1]: *** [install] Error 1
                      make: *** [install] Error 1

                      What should I be doing? At this point I don't care if it runs in a local directory or somewhere else. Whatever is simplest.

                      Hopefully this one is a nice, easy question. And again, I greatly appreciate all the help. In spite of all the troubles I am having getting going I would rather be here on Ubuntu than on Windows.
                      NPPAngband current home page: http://nppangband.bitshepherd.net/
                      Source code repository:
                      https://github.com/nppangband/NPPAngband_QT
                      Downloads:
                      https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

                      Comment

                      • Therem Harth
                        Knight
                        • Jan 2008
                        • 926

                        #26
                        If that's what I think it is... The problem is that you should be running 'sudo make install'. Ubuntu gives you a limited user account by default, and /usr/local is read-only for limited users.

                        (Also, 'make install' will spread your *band installation all over /usr/local and make it hard to remove in the future. Probably better to do a local install to somewhere in your home directory, as per the --with-no-install option in V.)

                        Comment

                        • nppangband
                          NPPAngband Maintainer
                          • Dec 2008
                          • 926

                          #27
                          Originally posted by Therem Harth
                          If that's what I think it is... The problem is that you should be running 'sudo make install'. Ubuntu gives you a limited user account by default, and /usr/local is read-only for limited users.

                          (Also, 'make install' will spread your *band installation all over /usr/local and make it hard to remove in the future. Probably better to do a local install to somewhere in your home directory, as per the --with-no-install option in V.)
                          with both approproaches, it fails. It cannot create the directories. For some reason it is getting confused with the files in bones directory (the bones files (player ghost templates) are bone.128 through bones.145, and it fails saying that is an extra operand. grrr

                          I would like to start by getting Vanilla Angband v3.3 working. How do I get the program to actually execute? I do ./autogen followed by ./configure followed by make. Then what? Note the executable is still in the src directory at the end of compiling. I did move it to the base Angband directory. Thanks for any help you have to offer.
                          NPPAngband current home page: http://nppangband.bitshepherd.net/
                          Source code repository:
                          https://github.com/nppangband/NPPAngband_QT
                          Downloads:
                          https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

                          Comment

                          • PowerDiver
                            Prophet
                            • Mar 2008
                            • 2820

                            #28
                            The way to run it is to specify the file the same way. After you copy it up, use
                            Code:
                            ./angband
                            That should be done in the same directory where you ran ./autogen.sh etc.

                            Comment

                            • nppangband
                              NPPAngband Maintainer
                              • Dec 2008
                              • 926

                              #29
                              Originally posted by PowerDiver
                              The way to run it is to specify the file the same way. After you copy it up, use
                              Code:
                              ./angband
                              That should be done in the same directory where you ran ./autogen.sh etc.
                              I was afraid of that, because it simply isn't working. Maybe I need to manually create all the directories in '/usr/local/share/angband?

                              Altenatively, what make command keeps the whole thing in the (linux account)/Documents/Angband directory, so I don't have to create anything is usr/local?

                              On a different note, once I get this working, to run the various different versions, don't I add an extension at the end, right? ./angband -sdl, or ./angband -x11.

                              Is there anyone out there on Linux who willing to take a quick 5-10 minutes and download the NPP source (work-in-progress branch) from github and see if they have any difficulties in getting it to execute? At least then I can eliminate the NPP source as the problem. (The fact that I am blocked from running Angband 3.3 either should be a pretty good indicator) I have spent hours on this, RTFM repeatedly, and I am just not having any success. This is crazy.

                              GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
                              Last edited by nppangband; February 11, 2012, 22:27.
                              NPPAngband current home page: http://nppangband.bitshepherd.net/
                              Source code repository:
                              https://github.com/nppangband/NPPAngband_QT
                              Downloads:
                              https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

                              Comment

                              • PowerDiver
                                Prophet
                                • Mar 2008
                                • 2820

                                #30
                                Originally posted by nppangband
                                I was afraid of that, because it simply isn't working. Maybe I need to manually create all the directories in '/usr/local/share/angband?

                                Altenatively, what make command keeps the whole thing in the (linux account)/Documents/Angband directory, so I don't have to create anything is usr/local?

                                On a different note, once I get this working, to run the various different versions, don't I add an extension at the end, right? ./angband -sdl, or ./angband -x11.

                                Is there anyone out there on Linux who willing to take a quick 5-10 minutes and download the NPP source (work-in-progress branch) from github and see if they have any difficulties in getting it to execute? At least then I can eliminate the NPP source as the problem. (The fact that I am blocked from running Angband 3.3 either should be a pretty good indicator) I have spent hours on this, RTFM repeatedly, and I am just not having any success. This is crazy.

                                https://github.com/nppangband/NPPAng...rk_in_progress
                                You shouldn't be using /usr/local. That's probably the source of your problem. It is much better to configure --with-no-install. The inability to create directories might be a permissions problem. Also, different incompatible versions of angband store their files in the same place, so you are really asking for trouble if you might ever have two different angbands on your system at the same time.

                                If you want to test the permission hypothesis, you could run angband as root.
                                Code:
                                sudo ./angband
                                If that works, then it is a permission problem. Unfortunately, the fact it works would mean that it created things you will have problems deleting later. I don't know whether there is a good way to undo. Think carefully before you do this experiment.

                                Eventually you will want to create a shell script in /usr/local/bin that does a cd to the directory in question and then invokes the executable with the options that you want. It could also set font sizes etc.

                                I would delete your angband directory and start over. That's probably not necessary. "make clean" will probably be enough, but I believe in complete restarts. Then the important thing is to use the right options for configure. Look at the output. You will need to pass options if you want sdl support etc.

                                For your first test
                                Code:
                                eddie@asusblu:~/health$ history | grep configure
                                 1712  ./configure --with-no-install
                                try configure as above. I've been working on a 3.0.9 base, but that probably has not changed.

                                I looked at your work in progress. My first minor problem was that autogen.sh is not an executable. I got as far as
                                Code:
                                2151  chmod +x autogen.sh 
                                 2152  ./autogen.sh 
                                 2153  l
                                 2154  ./configure --with-no-install
                                 2155  make
                                and the make failed because I don't have sdl installed. I don't know if you think npp absolutely requires it or not. The angband setup is that if you want sdl, you specify that as an option to ./configure. Are you sure you want to require it?

                                Then I installed sdl,
                                Code:
                                 2161  make
                                 2162  l
                                 2163  ln -s src/nppangband 
                                 2164  ./nppangband
                                That gave me the error
                                Code:
                                ./nppangband: Couldn't load the requested font. (-angband-10x14x-*-iso8859-1)
                                There is a file lib/xtra/font/10x14x.fon , but I don't know enough about fonts to suggest anything.

                                Comment

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