1375 parse error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerDiver
    Prophet
    • Mar 2008
    • 2820

    1375 parse error

    I am using linux. I just used svn to check out the trunk using "svn checkout svn://rephial.org/angband/trunk", was informed it was 1375, did ./autogen.sh and ./configure and make and cp src/angband .

    No errors or warnings so far.

    When I run the game, I get a parse error on line 58 of p_race.txt. I did a diff against the last version I checked out [1224], and that file does not seem to have changed. I never understood the txt parsing code.

    I tried running as root, and tried after removing ~/.angband, same parse error so I doubt it is a problem with utility files.

    Any ideas? Do I just have to learn and debug the parse code?
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Very weird. I've been compiling and running under Linux repeatedly for ages, and I've never had this problem.

    Line 58 of p_race.txt is

    R:0:0:0:0:0:10:0:0:0:0

    As you say, it doesn't seem to have changed.

    Something odd is going on. I can't reproduce this. Which main-xxx engine do you use - main-x11? If you do ./configure with no options I think only x11 and gcu are built by default. I don't get this happening with any engine (gcu, x11, gtk, sdl).

    Sorry not to be more help.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • PowerDiver
      Prophet
      • Mar 2008
      • 2820

      #3
      Well, I figured out half of my problem. I had an old p_race.txt under /usr/share/... that was being read instead of the one in the trunk. Unfortunately, I removed the usr/share stuff, and now it won't run because it cannot find the files. I guess I need to use some configure option to tell it not to look there, but I didn't have to do that in the old days.

      Comment

      • takkaria
        Veteran
        • Apr 2007
        • 1951

        #4
        Originally posted by PowerDiver
        Well, I figured out half of my problem. I had an old p_race.txt under /usr/share/... that was being read instead of the one in the trunk. Unfortunately, I removed the usr/share stuff, and now it won't run because it cannot find the files. I guess I need to use some configure option to tell it not to look there, but I didn't have to do that in the old days.
        Try using ./configure --with-private-dirs. That should sort your problem out.
        takkaria whispers something about options. -more-

        Comment

        • PowerDiver
          Prophet
          • Mar 2008
          • 2820

          #5
          Originally posted by takkaria
          Try using ./configure --with-private-dirs. That should sort your problem out.
          No, that's not enough. I also tried --with-private-paths, did not work either. Is there a list of all of the configure options somewhere?

          The configure script even with either of those options lists the install path and lib/ path as /usr/local and /usr/local/share/angband

          I guess I could try to mess with --libdir, but when I tried --libdir=. it wanted an absolute path and I was hoping to be able to move the entire tree around without breaking the executable.

          Is there any way to get the behavior that the program looks down from the executable, perhaps using argv[0] to get the exectuable's location? Would that break anything in windows? Would anyone beside me be interested in such a thing?

          Comment

          • takkaria
            Veteran
            • Apr 2007
            • 1951

            #6
            Originally posted by PowerDiver
            No, that's not enough. I also tried --with-private-paths, did not work either. Is there a list of all of the configure options somewhere?

            The configure script even with either of those options lists the install path and lib/ path as /usr/local and /usr/local/share/angband

            I guess I could try to mess with --libdir, but when I tried --libdir=. it wanted an absolute path and I was hoping to be able to move the entire tree around without breaking the executable.

            Is there any way to get the behavior that the program looks down from the executable, perhaps using argv[0] to get the exectuable's location? Would that break anything in windows? Would anyone beside me be interested in such a thing?
            ./configure --with-noinstall may be closer to what you're after then. I need to make various changes to the configure buildsystem before release anyway, I'll try and make this all more intuitive and obvious.
            takkaria whispers something about options. -more-

            Comment

            • PowerDiver
              Prophet
              • Mar 2008
              • 2820

              #7
              Originally posted by takkaria
              ./configure --with-noinstall.
              I tried that, didn't work, still looking for lib in /usr/local/share/angband. That's both according to the final output from configure, and also the error message at startup.

              I gave up and did a make install, after configuring --with-setgid=games , and it starts and saves without errors, but the next time I run it doesn't seem to open the savefile /usr/local/share/angband/save/1000.Eddie [which does get written and is readable inside a directory readable to games]. How perplexing.

              Comment

              • takkaria
                Veteran
                • Apr 2007
                • 1951

                #8
                Originally posted by PowerDiver
                I tried that, didn't work, still looking for lib in /usr/local/share/angband. That's both according to the final output from configure, and also the error message at startup.
                That's bizarre. I can't reproduce that at all.
                takkaria whispers something about options. -more-

                Comment

                • PowerDiver
                  Prophet
                  • Mar 2008
                  • 2820

                  #9
                  Originally posted by takkaria
                  That's bizarre. I can't reproduce that at all.
                  I wonder if there is some lingering trace from old installs, or if maybe somehow my /bin/sh is noncompliant in some strange way. Unfortunately the configure script is long and shell programming was never a strong point with me. I may give up and try to fix my problems by hacking the c code.

                  Comment

                  • PowerDiver
                    Prophet
                    • Mar 2008
                    • 2820

                    #10
                    Originally posted by PowerDiver
                    I gave up and did a make install, after configuring --with-setgid=games , and it starts and saves without errors, but the next time I run it doesn't seem to open the savefile /usr/local/share/angband/save/1000.Eddie [which does get written and is readable inside a directory readable to games]. How perplexing.

                    Someone care to teach me some unix? I have angband running sgid games. It fails to open the savefile, WHICH IT WROTE EARLIER, when the directory has execute set only for games.

                    Code:
                    linux:/usr/local/share/angband/save # ll
                    total 80
                    d---rwx---   2 root   games   144 2009-04-23 16:36 .
                    in this case above, angband on startup cannot load the savefiles in this directory. Mind you, it was able to write the savefile in the first place. When I add the execute bit

                    Code:
                    linux:/usr/local/share/angband/save # chmod o+x .
                    linux:/usr/local/share/angband/save # ll
                    total 80
                    d---rwx--x   2 root   games   144 2009-04-23 19:12 .
                    now it starts up just fine loading the savefile in this directory.


                    What the heck is going on?

                    Comment

                    • Magnate
                      Angband Devteam member
                      • May 2007
                      • 5110

                      #11
                      Originally posted by PowerDiver
                      Someone care to teach me some unix?
                      Which flavour do you run? Try running "debian/rules binary" to build a .deb, if you can install debs.
                      I have angband running sgid games. It fails to open the savefile, WHICH IT WROTE EARLIER, when the directory has execute set only for games.
                      ...
                      What the heck is going on?
                      Dunno. The .deb uses setgid games and reads and writes the savefiles fine. It looks like something is broken on your system. Try purging everything angband-related, then build and install the .deb of r1375 - that should work.

                      The plan is to move away from setgid and to use --with-private-dirs instead, so don't spend too much time on this if we can't fix it. I'll commit debian/ changes to move to --with-private-dirs as soon as 3.1.1 is out (I don't want to break a perfectly good .deb before then!).
                      "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                      Comment

                      • PowerDiver
                        Prophet
                        • Mar 2008
                        • 2820

                        #12
                        Originally posted by Magnate
                        Which flavour do you run? Try running "debian/rules binary" to build a .deb, if you can install debs.
                        That was on some version of suse, maybe suse 10.0 or opensuse 10.1, not sure which. It would just be an incredibly weird OS bug to show up this late in the game, I would have thought. OTOH, given the strange ./configure behavior I guess I should be looking for OS bugs in every shadow.

                        Comment

                        • takkaria
                          Veteran
                          • Apr 2007
                          • 1951

                          #13
                          Originally posted by PowerDiver
                          That was on some version of suse, maybe suse 10.0 or opensuse 10.1, not sure which. It would just be an incredibly weird OS bug to show up this late in the game, I would have thought. OTOH, given the strange ./configure behavior I guess I should be looking for OS bugs in every shadow.
                          You could try using src/Makefile.std, which would involve:

                          Code:
                          $ cd src
                          $ make -f Makefile.std clean
                          $ make -f Makefile.std
                          That should do what you want, without getting involved in /usr/local or anything, and puts the angband executable in the directory above src. I really have no idea where the problems you're experiencing are coming from.
                          takkaria whispers something about options. -more-

                          Comment

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