Compile problems with current angband git version

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SaThaRiel
    Adept
    • Nov 2009
    • 174

    Compile problems with current angband git version

    Hi,

    i waited for some days/weeks now to see if this problem "solves itself" but i'm still getting errors when linking angband. I know that this is a possible problem when trying to build from source but since there hasn't been a change since days now i wonder if someone is aware of it:
    Code:
    [...]
    Successfully compiled z-virt.c.
          LINK angband.o           
    In file included from gtk/cairo-utils.h:25:0,
                     from gtk/main-gtk.h:30,
                     from gtk/main-gtk.c:22:
    /usr/include/cairo/cairo.h:1976:26: warning: comma at end of enumerator list
    gtk/main-gtk.c: In function ‘last_inv_slot’:
    gtk/main-gtk.c:2198:12: error: ‘inventory’ undeclared (first use in this function)
    gtk/main-gtk.c:2198:12: note: each undeclared identifier is reported only once for each function it appears in
    gtk/main-gtk.c: In function ‘inv_slot’:
    gtk/main-gtk.c:2218:11: error: ‘inventory’ undeclared (first use in this function)
    gtk/main-gtk.c: In function ‘handle_inv’:
    gtk/main-gtk.c:2287:25: error: ‘inventory’ undeclared (first use in this function)
    gtk/main-gtk.c: In function ‘handle_equip’:
    gtk/main-gtk.c:2326:25: error: ‘inventory’ undeclared (first use in this function)
    gtk/main-gtk.c: In function ‘cr_print_equippy’:
    gtk/main-gtk.c:2506:12: error: ‘inventory’ undeclared (first use in this function)
    gtk/main-gtk.c: In function ‘handle_sidebar’:
    gtk/main-gtk.c:2570:35: error: ‘c_name’ undeclared (first use in this function)
    Failed to compile gtk/main-gtk.c!
    make[3]: *** [gtk/main-gtk.o] Error 1
    make[2]: *** [all] Error 1
    make[1]: *** [subdirs] Error 1
    make: *** [all] Error 1
    gcc is 4.5.1, not sure what else may be useful.
    Proud candidate for the Angband Darwin Award!
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Can you confirm that you cloned from github.com/angband/angband.git? Can you tell me what arguments you gave to ./configure, if any?

    I will look into this tomorrow - I'm not aware of any compilation issues in the current master branch.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • takkaria
      Veteran
      • Apr 2007
      • 1951

      #3
      Originally posted by Magnate
      Can you confirm that you cloned from github.com/angband/angband.git? Can you tell me what arguments you gave to ./configure, if any?

      I will look into this tomorrow - I'm not aware of any compilation issues in the current master branch.
      looks like it's related to elly's changes of moving the global 'inventory' to be inside the player struct
      takkaria whispers something about options. -more-

      Comment

      • SaThaRiel
        Adept
        • Nov 2009
        • 174

        #4
        I pulled from github.com/angband/angband.git (already existing repository) and also did a git clone (removed repository to start over).
        The build is done this way
        Code:
          ./autogen.sh
          ./configure \
            --prefix=/usr \
            --bindir=/usr/bin/ \
            --sysconfdir=/usr/share/angband \
            --with-configpath=/usr/share/angband \
            --with-libpath=/usr/share/angband \
            --enable-gtk \
            --enable-sdl \
        	--enable-sdl-mixer || return 1
          make clean
          make
        Same way as it worked for the svn version and like the "official" angband binary version in Archlinux is built.

        Still have a working dev version installed, so no hurry Just wanted to make sure that you guys are aware of it since the autobuilder doesn't seem to work atm.
        Proud candidate for the Angband Darwin Award!

        Comment

        • Magnate
          Angband Devteam member
          • May 2007
          • 5110

          #5
          Originally posted by SaThaRiel
          I pulled from github.com/angband/angband.git (already existing repository) and also did a git clone (removed repository to start over).
          The build is done this way
          Code:
            ./autogen.sh
            ./configure \
              --prefix=/usr \
              --bindir=/usr/bin/ \
              --sysconfdir=/usr/share/angband \
              --with-configpath=/usr/share/angband \
              --with-libpath=/usr/share/angband \
              --enable-gtk \
              --enable-sdl \
          	--enable-sdl-mixer || return 1
            make clean
            make
          Same way as it worked for the svn version and like the "official" angband binary version in Archlinux is built.

          Still have a working dev version installed, so no hurry Just wanted to make sure that you guys are aware of it since the autobuilder doesn't seem to work atm.
          Ok, I can confirm that I get the same error as you when compiling main-gtk.c in the current master branch. Apologies - we should have caught this before committing it to master. Will try to fix ASAP.
          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

          Comment

          • Magnate
            Angband Devteam member
            • May 2007
            • 5110

            #6
            Ok, this is fixed in staging, but cannot be committed to master until some other bugs have been fixed in staging. Pls bear with us.
            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

            Comment

            • SaThaRiel
              Adept
              • Nov 2009
              • 174

              #7
              Better take your time fixing bugs instead of hurry and built in some more
              Proud candidate for the Angband Darwin Award!

              Comment

              • Magnate
                Angband Devteam member
                • May 2007
                • 5110

                #8
                Originally posted by SaThaRiel
                Better take your time fixing bugs instead of hurry and built in some more
                Right, it's finally fixed. Took about four hours longer than I was expecting, but got there in the end. We should get a working version autobuilt tonight. Pls report any bugs ASAP because we're moving towards a release now.
                "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                Comment

                • SaThaRiel
                  Adept
                  • Nov 2009
                  • 174

                  #9
                  The compile looks good, only one warning anymore
                  Code:
                  generate.c: In function ‘cave_gen’:
                  generate.c:2898:10: warning: ‘bx’ may be used uninitialized in this function
                  Successfully compiled generate.c.
                  Not sure, but if you sell and buy items, the last message is repeated when you leave the shop or press some key. Don't know how to describe it better, but its a bit anoying. But maybe its the wanted behaviour or a new option? Or its just a bug
                  Proud candidate for the Angband Darwin Award!

                  Comment

                  • Magnate
                    Angband Devteam member
                    • May 2007
                    • 5110

                    #10
                    Originally posted by SaThaRiel
                    The compile looks good, only one warning anymore
                    Code:
                    generate.c: In function ‘cave_gen’:
                    generate.c:2898:10: warning: ‘bx’ may be used uninitialized in this function
                    Successfully compiled generate.c.
                    Not sure, but if you sell and buy items, the last message is repeated when you leave the shop or press some key. Don't know how to describe it better, but its a bit anoying. But maybe its the wanted behaviour or a new option? Or its just a bug
                    The latter is a known bug of the recent store UI changes, which I've just recorded on trac as #1203.

                    The compiler warning is odd because I don't get it at all. What version of gcc are you using? Did you get any unusual output when you ran ./autogen.sh or ./configure? What arguments did you give ./configure? I will see if I can reproduce it by duplicating your build invocations.
                    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                    Comment

                    • SaThaRiel
                      Adept
                      • Nov 2009
                      • 174

                      #11
                      Here is my gcc version
                      Code:
                      $ gcc --version
                      gcc (GCC) 4.5.1
                      Copyright (C) 2010 Free Software Foundation, Inc.
                      This is free software; see the source for copying conditions.  There is NO
                      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
                      My build commands are some posts above
                      The output is pretty good (from what i can see):
                      Code:
                      *info* running aclocal
                      /usr/share/aclocal/progsreiserfs.m4:13: warning: underquoted definition of AC_CHECK_LIBREISERFS
                      /usr/share/aclocal/progsreiserfs.m4:13:   run info '(automake)Extending aclocal'
                      /usr/share/aclocal/progsreiserfs.m4:13:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
                      *info* running autoheader
                      *info* running autoconf
                      checking for gcc... gcc
                      checking whether the C compiler works... yes
                      checking for C compiler default output file name... a.out
                      checking for suffix of executables... 
                      checking whether we are cross compiling... no
                      checking for suffix of object files... o
                      checking whether we are using the GNU C compiler... yes
                      checking whether gcc accepts -g... yes
                      checking for gcc option to accept ISO C89... none needed
                      checking whether make sets $(MAKE)... yes
                      checking whether ln -s works... yes
                      checking for a BSD-compatible install... /bin/install -c
                      checking for a thread-safe mkdir -p... /bin/mkdir -p
                      checking for rm... /bin/rm
                      checking for mv... /bin/mv
                      checking for cp... /bin/cp
                      checking for dirent.h that defines DIR... yes
                      checking for library containing opendir... none required
                      checking how to run the C preprocessor... gcc -E
                      checking for grep that handles long lines and -e... /bin/grep
                      checking for egrep... /bin/grep -E
                      checking for ANSI C header files... yes
                      checking for sys/types.h... yes
                      checking for sys/stat.h... yes
                      checking for stdlib.h... yes
                      checking for string.h... yes
                      checking for memory.h... yes
                      checking for strings.h... yes
                      checking for inttypes.h... yes
                      checking for stdint.h... yes
                      checking for unistd.h... yes
                      checking fcntl.h usability... yes
                      checking fcntl.h presence... yes
                      checking for fcntl.h... yes
                      checking for stdint.h... (cached) yes
                      checking for stdbool.h that conforms to C99... yes
                      checking for _Bool... yes
                      checking for an ANSI C-conforming const... yes
                      checking return type of signal handlers... void
                      checking for mkdir... yes
                      checking for setresgid... yes
                      checking for setegid... yes
                      checking for stat... yes
                      checking if make supports SysV-style inclusion... yes
                      checking for make silent include syntax... gnu
                      checking for initscr in -lcurses  ... yes
                      checking for initscr in -lncurses ... yes
                      checking for initscr in -lpdcurses... no
                      checking for use_default_colors... yes
                      checking for can_change_color... yes
                      checking for X... libraries , headers 
                      checking for gethostbyname... yes
                      checking for connect... yes
                      checking for remove... yes
                      checking for shmat... yes
                      checking for IceConnectionNumber in -lICE... yes
                      checking for sdl-config... /usr/bin/sdl-config
                      checking for SDL - version >= 1.2.10... yes
                      checking for IMG_LoadPNG_RW in -lSDL_image... yes
                      checking for TTF_Init in -lSDL_ttf... yes
                      checking for pkg-config... /usr/bin/pkg-config
                      checking for glib-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 gthread-2.0 pango libglade-2.0... yes
                      checking GTK_CFLAGS... -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -I/usr/include/libglade-2.0 -I/usr/include/libxml2  
                      checking GTK_LIBS... -pthread -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpng14 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0  
                      checking for glib-2.0 >= 2.6.0... yes
                      checking GLIB_CFLAGS... -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
                      checking GLIB_LIBS... -lglib-2.0  
                      checking for Mix_OpenAudio in -lSDL_mixer... yes
                      configure: creating ./config.status
                      config.status: creating mk/extra.mk
                      config.status: creating mk/sinclude.mk
                      config.status: creating src/autoconf.h
                      config.status: src/autoconf.h is unchanged
                      
                      Configuration:
                      
                        Install path:                           /usr
                        binary path:                            /usr/bin
                        config path:                            /usr/share/angband/
                        lib path:                               /usr/share/angband/
                        var path:                               (not used)
                        (with private save and score files in ~/.angband/Angband/)
                      
                      -- Frontends --
                      - Curses                                  Yes
                      - GTK 2.x                                 Yes
                      - X11                                     Yes
                      - SDL                                     Yes
                      - Test                                    No
                      
                      - SDL sound                               Yes
                      The libreiserfs warning doesn't bother me and should have nothing todo with angband.
                      Code:
                      aclocal --version
                      aclocal (GNU automake) 1.11.1
                      Copyright (C) 2009 Free Software Foundation, Inc.
                      License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
                      This is free software: you are free to change and redistribute it.
                      There is NO WARRANTY, to the extent permitted by law.
                      
                      Written by Tom Tromey <tromey@redhat.com>
                             and Alexandre Duret-Lutz <adl@gnu.org>.
                      Code:
                      autoheader --version
                      autoheader (GNU Autoconf) 2.68
                      Copyright (C) 2010 Free Software Foundation, Inc.
                      License GPLv3+/Autoconf: GNU GPL version 3 or later
                      <http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
                      This is free software: you are free to change and redistribute it.
                      There is NO WARRANTY, to the extent permitted by law.
                      
                      Written by Roland McGrath and Akim Demaille.
                      Code:
                      autoconf -V    
                      autoconf (GNU Autoconf) 2.68
                      Copyright (C) 2010 Free Software Foundation, Inc.
                      License GPLv3+/Autoconf: GNU GPL version 3 or later
                      <http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
                      This is free software: you are free to change and redistribute it.
                      There is NO WARRANTY, to the extent permitted by law.
                      
                      Written by David J. MacKenzie and Akim Demaille.
                      Usually i got the latest stable versions - rolling release ArchLinux

                      Hope that informations help.
                      Proud candidate for the Angband Darwin Award!

                      Comment

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