Compiling 3.0.9b under SuSE 9.3 ...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TJA
    Adept
    • Aug 2007
    • 117

    Compiling 3.0.9b under SuSE 9.3 ...

    Hello,
    trying to compile the new Vanilla under SuSE 9.3 Linux, i got the following error:

    Code:
    ./configure --disable-x11
    ...
    
            CC     main-gcu.c
    In file included from main-gcu.c:63:
    /usr/include/ncurses.h:337: error: syntax error before "bool"
    /usr/include/ncurses.h:339: error: syntax error before "_leaveok"
    /usr/include/ncurses.h:340: error: syntax error before "_scroll"
    /usr/include/ncurses.h:341: error: syntax error before "_idlok"
    /usr/include/ncurses.h:342: error: syntax error before "_idcok"
    /usr/include/ncurses.h:343: error: syntax error before "_immed"
    /usr/include/ncurses.h:344: error: syntax error before "_sync"
    /usr/include/ncurses.h:345: error: syntax error before "_use_keypad"
    /usr/include/ncurses.h:372: error: syntax error before '}' token
    /usr/include/ncurses.h:393: error: syntax error before "is_term_resized"
    /usr/include/ncurses.h:399: error: syntax error before "bool"
    /usr/include/ncurses.h:521: error: syntax error before "can_change_color"
    /usr/include/ncurses.h:525: error: syntax error before "bool"
    /usr/include/ncurses.h:557: error: syntax error before "has_colors"
    /usr/include/ncurses.h:558: error: syntax error before "has_ic"
    /usr/include/ncurses.h:559: error: syntax error before "has_il"
    /usr/include/ncurses.h:561: error: syntax error before "bool"
    /usr/include/ncurses.h:562: error: syntax error before "bool"
    /usr/include/ncurses.h:563: error: syntax error before "bool"
    /usr/include/ncurses.h:577: error: syntax error before "bool"
    /usr/include/ncurses.h:578: error: syntax error before "isendwin"
    /usr/include/ncurses.h:579: error: syntax error before "is_linetouched"
    /usr/include/ncurses.h:580: error: syntax error before "is_wintouched"
    /usr/include/ncurses.h:582: error: syntax error before "bool"
    /usr/include/ncurses.h:584: error: syntax error before "bool"
    /usr/include/ncurses.h:586: error: syntax error before "bool"
    /usr/include/ncurses.h:645: error: syntax error before "bool"
    /usr/include/ncurses.h:650: error: syntax error before "bool"
    /usr/include/ncurses.h:677: error: syntax error before "bool"
    /usr/include/ncurses.h:703: error: syntax error before "bool"
    /usr/include/ncurses.h:1413: error: syntax error before "wenclose"
    /usr/include/ncurses.h:1415: error: syntax error before "wmouse_trafo"
    /usr/include/ncurses.h:1415: error: syntax error before "bool"
    /usr/include/ncurses.h:1416: error: syntax error before "mouse_trafo"
    /usr/include/ncurses.h:1416: error: syntax error before "bool"
    main-gcu.c: In function `Term_xtra_gcu_alive':
    main-gcu.c:290: error: dereferencing pointer to incomplete type
    main-gcu.c:290: error: dereferencing pointer to incomplete type
    main-gcu.c:290: warning: left-hand operand of comma expression has no effect
    main-gcu.c: In function `Term_nuke_gcu':
    main-gcu.c:383: error: dereferencing pointer to incomplete type
    main-gcu.c:383: error: dereferencing pointer to incomplete type
    main-gcu.c:383: warning: left-hand operand of comma expression has no effect
    main-gcu.c: In function `Term_xtra_gcu':
    main-gcu.c:505: error: dereferencing pointer to incomplete type
    main-gcu.c: In function `Term_text_gcu':
    main-gcu.c:616: error: dereferencing pointer to incomplete type
    main-gcu.c:630: error: dereferencing pointer to incomplete type
    main-gcu.c: In function `init_gcu':
    main-gcu.c:712: error: `bool' undeclared (first use in this function)
    main-gcu.c:712: error: (Each undeclared identifier is reported only once
    main-gcu.c:712: error: for each function it appears in.)
    main-gcu.c:712: error: syntax error before "use_big_screen"
    main-gcu.c:720: error: `use_big_screen' undeclared (first use in this function)
    make[2]: *** [main-gcu.o] Error 1
    make[1]: *** [build] Error 2
    make: *** [build] Error 2
    Any idea?!?
    :-O
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9634

    #2
    Originally posted by TJA
    Hello,
    trying to compile the new Vanilla under SuSE 9.3 Linux, i got the following error:

    Code:
    ./configure --disable-x11
    ...
    
            CC     main-gcu.c
    In file included from main-gcu.c:63:
    /usr/include/ncurses.h:337: error: syntax error before "bool"
    There are apparently some silly games that need to be played with defining the correct version bool, and it looks like you have ended up without it defined. configure should have sorted that out; you could try commenting out things like the
    Code:
    #undef bool
    in main-gcu.c and see if that helps.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • TJA
      Adept
      • Aug 2007
      • 117

      #3
      Thanx for the idea, Nick!

      While trying to do that, i found the following lines in main-gcu.c:

      /*
      * Hack -- play games with "bool" and "term"
      */
      #undef bool


      :-O

      I REMOVED that "hack" line - and everything went well!

      So, the "hack" is the problem and should be removed or changed!

      Hint to the maintainer

      Comment

      • TJA
        Adept
        • Aug 2007
        • 117

        #4
        The next strange thing is, that an "make install" did not install to /usr/local/... as one would assume!

        Even an explicite "./configure --prefix=/usr/local" did not change that behavior!

        Could not fix that so far ....

        Comment

        • TJA
          Adept
          • Aug 2007
          • 117

          #5
          I found, that a changed prefix does install something: Three empty directories will get created at the right place:

          /tmp/lib
          /tmp/include
          /tmp/include/angband


          But nothing more!

          :-O

          Comment

          • TJA
            Adept
            • Aug 2007
            • 117

            #6
            In mk/rules.mk at least two variables are set wrong:

            DATA_PATH = ./lib/
            bindir = ..


            This way, the binary will be moved up once and the other data will be installed to ./lib instead of the real $prefix ...




            But changing the DATA_PATH does not install the files to the new path - i just cannot debug this :-(

            *sob*

            Comment

            • TJA
              Adept
              • Aug 2007
              • 117

              #7
              Nobody else has this problem?
              Or nobody cares?

              :-O

              Comment

              • PowerDiver
                Prophet
                • Mar 2008
                • 2820

                #8
                Originally posted by TJA
                Nobody else has this problem?
                Or nobody cares?

                :-O
                You might try the newsgroup. I for one don't look here that often.
                I use SUSE 10.0 at the moment. I think I had some problems,
                and might have posted them. I think they are fixed now.



                IMO you are making a mistake mucking with the paths. Make a directory
                /usr/local/src/Angband and untar and do the make there as root with defaults.
                Then write a script in /usr/local/bin that does a cd to the directory with the
                copied executable and then invokes it.

                You may have to muck about with permissions to let user write to lib/save etc.
                Whether you want to go setgid or open up the dirs is up to you.

                Once you have a working install you can think about reinstalling with different
                variables in the makefile.


                Or perhaps you should just install in a subdir of your home directory.
                Do you have so many users that multiple installs is a problem?

                Don't bother answering that rhetorical question. I'll probably miss your post.
                If no one here helps, try the newsgroup. There are knowledgable people there.

                Comment

                • roustk
                  Adept
                  • Dec 2007
                  • 167

                  #9
                  Originally posted by TJA
                  The next strange thing is, that an "make install" did not install to /usr/local/... as one would assume!

                  Even an explicite "./configure --prefix=/usr/local" did not change that behavior!
                  I don't want to dig into it too deeply right now, but there is a compile-time flag for selecting between a single-user and multi-user directory structure. It is possible that this flag is recognized by make (or configure) to determine where to put the executable.

                  Have you checked the rephial page on compiling? http://rephial.org/wiki/Compiling

                  Some weeks ago I managed to get it to install into /usr/local/bin for my BSD (well, MacOS) box. config.log reports that I used "./configure --with-private-dirs", and it looks like that is probably the right flag (timestamp for config.log is 15:40, /usr/local/bin/angband is 15:41).

                  Kevin

                  Comment

                  • TJA
                    Adept
                    • Aug 2007
                    • 117

                    #10
                    Nope, sadly, there is no such configuration flag :-(

                    Anyway, the configuration just does not work - of course, i can just copy files where i need them, but the point is, that the package is broken and should be fixed.

                    I mean, this is Vanilla Angband and the configuration does not work - not a Good Thing :-(
                    I try to point Andrew Sidwell on that

                    Comment

                    • roustk
                      Adept
                      • Dec 2007
                      • 167

                      #11
                      By pretending that my MacOS is the BSD unix that it really is, I can get a functioning version of Angband running from /usr/local/bin by following the instructions at http://rephial.org/wiki/Compiling. The last few commands follow.

                      Code:
                      [roustk-mb:~/angband-svn/unix/trunk] roustk% ls -l `which angband`
                      -rwxr-xr-x  1 root  wheel  875256 May 10 16:53 /usr/local/bin/angband*
                      [roustk-mb:~/angband-svn/unix/trunk] roustk% angband
                      [roustk-mb:~/angband-svn/unix/trunk] roustk% history
                           1	16:51	cd ~/angband-svn/
                           2	16:51	mkdir unix
                           3	16:52	cd unix
                           4	16:52	svn co http://dev.rephial.org/svn/trunk
                           5	16:52	cd trunk
                           6	16:52	sh autogen.sh
                           7	16:52	./configure
                           8	16:53	make
                           9	16:53	make install
                          10	16:53	sudo make install
                          11	16:54	which angband
                          12	16:54	ls -l `which angband`
                          13	16:54	angband
                      [roustk-mb:~/angband-svn/unix/trunk] roustk%
                      The tail end of ./configure (with no flags) reported:
                      Code:
                      Configuration:
                      
                        Install path:                           /usr/local
                        lib/ path:                              /usr/local/share/angband/
                      
                      -- Frontends --
                      - Curses                                  Yes
                      - GTK 2.x                                 Disabled
                      - X11                                     Yes
                      - SDL                                     Disabled
                      
                      - SDL sound                               No; missing libraries
                      I believe that SuSE is a mostly BSD system, like most linuxes.

                      Kevin

                      Comment

                      • takkaria
                        Veteran
                        • Apr 2007
                        • 1951

                        #12
                        Originally posted by TJA
                        Nope, sadly, there is no such configuration flag :-(

                        Anyway, the configuration just does not work - of course, i can just copy files where i need them, but the point is, that the package is broken and should be fixed.

                        I mean, this is Vanilla Angband and the configuration does not work - not a Good Thing :-(
                        I try to point Andrew Sidwell on that
                        The 3.0.9 autoconf system is a bit broken. If you want a system-wide install, my understanding is that you should do:
                        $ ./configure --with-setgid=games --with-libpath=/usr/local/games/lib/angband --bindir=/usr/local/games

                        Next version will be fixed such that you can do whichever you like of system-wide shared-scorefile, system-wide private-scorefile, and user-specific install. But I really won't vouch for autoconf in 3.0.9; I didn't have a very thorough understanding of it then and 3.1.0 will be far improved in this regard.
                        takkaria whispers something about options. -more-

                        Comment

                        • roustk
                          Adept
                          • Dec 2007
                          • 167

                          #13
                          Originally posted by TJA
                          Nope, sadly, there is no such configuration flag :-(
                          The C variable I was thinking of is USE_PRIVATE_PATHS. Looks like it gets set based on the ---with_private_dirs flag to ./configure (and that flag defaults to 'yes', at least for me).

                          (delete some stuff)

                          Let me play with the packaged 3.0.9b src, given takkaria's comments.

                          Kevin

                          Comment

                          • roustk
                            Adept
                            • Dec 2007
                            • 167

                            #14
                            To clear up some confusion:
                            1) My comments were based on my experience with the nightlies (svn for 3.1.0). ./configure works wonders there, and has the usr-private-dirs flag.
                            2) I can now confirm that 3.0.9b does not install well by default, although takkaria's flags work perfectly.

                            Code:
                            curl http://rephial.org/downloads/3.0/angband-3.0.9b-src.tar.gz \ 
                              | gzcat | tar xvf -
                            cd angband-3.0.9b
                            ./configure --with-setgid=admin \
                              --with-libpath=/usr/local/games/lib/angband \
                              --bindir=/usr/local/games --disable-x11
                            make
                            sudo make install
                            These flags created an angband executable at /usr/local/games/angband, the lib directory buried underneath in lib/angband, and is putting savefiles in there.

                            (I used GID admin because I don't have a games group, and 3.0.9b has a bug in the X11 code for MacOS.)

                            Kevin

                            Comment

                            • TJA
                              Adept
                              • Aug 2007
                              • 117

                              #15
                              Thanx a bunch, that helped fantastically!

                              ./configure --with-setgid=games --with-libpath=/usr/local/lib/angband --bindir=/usr/local/bin --disable-x11

                              It moved angband to /usr/local/bin as wanted, and installed the lib-dir to /usr/local/lib/angband as wanted.

                              Thanx!

                              Would be great if the default and --prefix will work again in a later version
                              Last edited by TJA; May 12, 2008, 21:54.

                              Comment

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