Compiling on Linux... HowTo?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roustk
    Adept
    • Dec 2007
    • 167

    #16
    Originally posted by MKula
    bash: angband: command not found

    So, it didn't install properly after all, huh?
    Any ideas on this one?
    I'd bet that it is a path problem. Look at your Makefile for the "install:" entry to figure out where it stuck the executable, and then check whether that is in your path.

    Looking at Makefile.std, it looks like installing just does 'cp angband ..'. If that is true in your case and you want the executable somewhere useful (like /usr/local/bin), you should be able to use a symlink (ln -s).

    Kevin

    Comment

    • MKula
      Apprentice
      • Feb 2008
      • 70

      #17
      Well, it's not making the executable anywhere, apparently. The only place that an 'angband' exists (other than the source files) is /home/lib/angband, but that directory is empty.

      I think my next step should be to stop asking newb questions on the forums and pick up a coding textbook, since my C/C++ skills aren't nearly good enough to edit the source in any meaningful manner.
      It breathes on you.
      You die.

      Comment

      • roustk
        Adept
        • Dec 2007
        • 167

        #18
        Originally posted by MKula
        Well, it's not making the executable anywhere, apparently. The only place that an 'angband' exists (other than the source files) is /home/lib/angband, but that directory is empty.
        After running down an annoying bug in main-x11.c, I've managed to compile an X11 version on my Mac (treating it like a unix box). The commands I used were:
        % svn co http://dev.rephial.org/svn/trunk
        % cd trunk
        % ./configure --enable-x11 --with-private-dirs
        % make clean
        % sudo make install

        It created an executable as /usr/local/bin/angband

        You should check the end of your ./configure result -- it should put the executable in a bin directory at the "Install path". You may not have /usr/local/bin in your PATH, which is an entirely different (and solvable) problem.

        Kevin

        Comment

        • MKula
          Apprentice
          • Feb 2008
          • 70

          #19
          Ok, well, for now I'm configuring with ALL of this, just to be safe:

          ./configure --with-setgid=games --with-libpath=/home/lib/angband --bindir=/home/games --prefix=/home/games --libexecdir=/home/games --enable-sdl

          So that my final configuration looks like:

          Configuration:
          Install path: /home/games
          lib/ path: /home/lib/angband/

          The good news is that when I run "sudo make install" next, it installs almost everything exactly where it should (before, it wasn't installing anything); so I now have a wonderful directory tree with all the *.txt, pref-xxx.prf, etc files in all the right places.
          The bad news is that the ONLY file it's *not* installing is the executable, and for the life of me I can't figure out why!!
          Is the EXE tied to the type of frontend I use? So, for example, if I don't specify "use X11 as the frontend" then it won't know what to do, so it does nothing? That's the only reason I can think of as to why it's not making the EXE.
          It breathes on you.
          You die.

          Comment

          • pav
            Administrator
            • Apr 2007
            • 793

            #20
            Maybe it had put the executable under /home/games/bin, which is a rather odd choice, if you ask me, but nevertheless - have you looked there?
            See the elves and everything! http://angband.oook.cz

            Comment

            • MKula
              Apprentice
              • Feb 2008
              • 70

              #21
              Alright, mission accomplished! After a very long and painful process, I FINALLY got it to compile. The EXE was in the unpacked tarball folder (for some reason that I'm still trying to figure out...), but at least it works.
              A couple of general questions:
              1) The Linux build doesn't support sub-windows, does it?
              2) Why does the "./configure make install" process lock some of the files so that they can't be edited? It almost seems like they're still in use after the build. It's not supposed to do that, is it?

              In any case, thanks very much to the whole group of you who helped me out with this! I really appreciate it! I can quite certainly say that I wouldn't have been able to get through it without your help! Thanks again!

              EDIT: Never mind about the file locking thing. That was just a file permission thing on my end, having to do with using "sudo", but I resolved it.
              Last edited by MKula; March 13, 2008, 00:43.
              It breathes on you.
              You die.

              Comment

              • pav
                Administrator
                • Apr 2007
                • 793

                #22
                1) It does, but not obviously. Read up the comments on top of src/main-x11.c
                2) You sure the permissions are not "only for reading"? There is nothing on Linux capable of locking the file, the way Windows tend to lock files in use
                See the elves and everything! http://angband.oook.cz

                Comment

                • takkaria
                  Veteran
                  • Apr 2007
                  • 1951

                  #23
                  Originally posted by MKula
                  Alright, mission accomplished! After a very long and painful process, I FINALLY got it to compile. The EXE was in the unpacked tarball folder (for some reason that I'm still trying to figure out...), but at least it works.
                  A couple of general questions:
                  1) The Linux build doesn't support sub-windows, does it?
                  2) Why does the "./configure make install" process lock some of the files so that they can't be edited? It almost seems like they're still in use after the build. It's not supposed to do that, is it?

                  In any case, thanks very much to the whole group of you who helped me out with this! I really appreciate it! I can quite certainly say that I wouldn't have been able to get through it without your help! Thanks again!
                  I've quite certainly been neglecting my duties as bug-hunter just recently, so I haven't had time to look into it. I will have to have a closer look again at 3.0.9a this weekend and try and make it work properly properly.
                  takkaria whispers something about options. -more-

                  Comment

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