many problems installing/running FrogComPosBand

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • darwin
    Rookie
    • Jan 2024
    • 13

    many problems installing/running FrogComPosBand

    FrogComPosBand, after compiling, doesn't run in src directory (but should) and needs /usr/local/var/games which doesn't exist on some UNIX/GNU/Linux such as what I use ('make install' needs to 'mkdir -p' that). After I create that and try to run curses version, instead I get a graphical version that looks like the below.
    Code:
    Failed!
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    [Updating help files - please wait...]
    Did FrogComPosBand's original source, ComPosBand, also come from PosChengBand?
  • backwardsEric
    Knight
    • Aug 2019
    • 527

    #2
    Originally posted by darwin
    FrogComPosBand, after compiling, doesn't run in src directory (but should) and needs /usr/local/var/games which doesn't exist on some UNIX/GNU/Linux such as what I use ('make install' needs to 'mkdir -p' that).
    Did you use the --with-no-install option when you ran configure? That is necessary to get an executable that you can run in place.

    Originally posted by darwin
    After I create that and try to run curses version, instead I get a graphical version that looks like the below.
    When you ran frogcomposband did you specify the frontend to use with the -m option (i.e. src/frogcomposband -mgcu for the curses frontend)? If you did not, it runs the first frontend that was built, and the SDL and X11 frontends are tried first before the curses one. The end of the output from configure should tell you which frontends were configured. Here's what it looks like on macOS after I told it how to find curses:

    Code:
    -- Frontends --
    - Curses                                  Yes
    - X11                                     No; missing libraries
    - SDL                                     Disabled
    - Windows                                 Disabled
    - Test                                    No
    - Stats                                   No
    
    - SDL sound                               Disabled
    - Limit colours to 16                     No

    Comment

    • darwin
      Rookie
      • Jan 2024
      • 13

      #3
      Of course I know that: curses & X11 versions show the above 'failed' screen, and SDL version says 'frogcomposband: Cannot find required file: /usr/local/share/frogcomposband/xtra/font/8x8xb.fon'.

      Comment

      • Gwarl
        Administrator
        • Jan 2017
        • 1025

        #4
        Again this sounds like you need to use --with-no-install when compiling

        Comment

        • darwin
          Rookie
          • Jan 2024
          • 13

          #5
          Failure screens happen even if I install--I don't try to run it in place since that required special option.

          Comment

          • backwardsEric
            Knight
            • Aug 2019
            • 527

            #6
            If you want to run the executable in the src directory, as you stated in your original post, do this to configure and build:

            Code:
            ./configure --with-no-install [the other configuration options you want here]
            make
            If you do not want to use --with-no-install, the default installation directories are typically only writable by a super-user so running "make install" will require super-user privileges. There's several options to configure that can change where things are installed; --prefix=some_directory_name sets the base directory where things are installed. This,

            Code:
            ./configure --prefix="$HOME/frogcomposband" [the other configure options you want here]
            make
            make install
            , would install the game in the ~/frogcomposband directory. The executable is ~/frogcomposband/games/frogcomposband.

            Comment

            • darwin
              Rookie
              • Jan 2024
              • 13

              #7
              Originally posted by backwardsEric
              If you do not want to use --with-no-install, the default installation directories are typically only writable by a super-user [...]
              I've been programming (since 1993 and on) on UNIX/GNU/Linux since 1997 and use root daily--doesn't change anything. Clearly if I wasn't root it wouldn't have been installed so wouldn't even run to get a failure screen. I'm waiting to hear what went wrong or debug.

              Comment

              • Gwarl
                Administrator
                • Jan 2017
                • 1025

                #8
                you can do

                cd src
                make -f Makefile.std

                As an alternative to autconf and --with-no-install. Edit z-config.h (or maybe config.h? in some variants) for options instead of using flags. The default is to run in-place, in-place being ~/games/frogcomposband or similar rather than ~/games/frogcomposband/src where the binary will be built.

                Comment

                • backwardsEric
                  Knight
                  • Aug 2019
                  • 527

                  #9
                  Originally posted by darwin
                  I've been programming (since 1993 and on) on UNIX/GNU/Linux since 1997 and use root daily--doesn't change anything. Clearly if I wasn't root it wouldn't have been installed so wouldn't even run to get a failure screen. I'm waiting to hear what went wrong or debug.
                  Okay. If you do not tell us what steps you used to configure, build, and install, we have to guess at what you did and that unnecessarily prolongs working out what went wrong. The output from configure would also be helpful.

                  Comment

                  • darwin
                    Rookie
                    • Jan 2024
                    • 13

                    #10
                    I didn't do anything out of the ordinary we hadn't already discussed, so there's not much/anything else to see, but okay. Default isn't 'run in place' rather than system-wide installation, as you'll see from below configure output (and most/all other Angband/variants... 'run in place' requires an additional argument/flag/switch beyond default)... this installation type is also used to build UNIX/GNU/Linux Angband/variant packages any those OS use.
                    Code:
                    './autogen.sh'
                    './configure NCURSES_CONFIG=`which ncursesw6-config` --enable-sdl --enable-sdl-mixer'
                    'make'
                    'make install' (more usually non-root wheel user as 'sudo make install')
                    configure output:
                    checking build system type... x86_64-unknown-linux-gnu
                    checking host system type... x86_64-unknown-linux-gnu
                    checking target system type... x86_64-unknown-linux-gnu
                    checking for tput... /usr/bin/tput
                    configure: touching .deps files
                    Note: You have chosen to compile for installation, with data files
                    in standard locations. For development, you may wish to consider using
                    --with-no-install which will leave the game to run from the directory
                    into which it was extracted and compiled.
                    
                    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 the compiler supports GNU C... yes
                    checking whether gcc accepts -g... yes
                    checking for gcc option to enable C11 features... none needed
                    checking whether make sets $(MAKE)... yes
                    checking whether ln -s works... yes
                    checking for a BSD-compatible install... /usr/bin/ginstall -c
                    checking for a race-free mkdir -p... /usr/bin/mkdir -p
                    checking for windres... windres
                    checking for rm... /usr/bin/rm
                    checking for mv... /usr/bin/mv
                    checking for cp... /usr/bin/cp
                    checking for dirent.h that defines DIR... yes
                    checking for library containing opendir... none required
                    checking for stdio.h... yes
                    checking for stdlib.h... yes
                    checking for string.h... yes
                    checking for inttypes.h... yes
                    checking for stdint.h... yes
                    checking for strings.h... yes
                    checking for sys/stat.h... yes
                    checking for sys/types.h... yes
                    checking for unistd.h... yes
                    checking for fcntl.h... yes
                    checking for stdint.h... (cached) yes
                    checking for _Bool... yes
                    checking for stdbool.h that conforms to C99 or later... 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 for mkstemp... yes
                    checking for usleep... yes
                    checking if gcc supports -Wno-missing-field-initializers... yes
                    checking if make supports SysV-style inclusion... yes
                    checking for make silent include syntax... gnu
                    checking for ncursesw5-config... /usr/bin/ncursesw6-config
                    checking for ncurses - wide char support... yes
                    checking for mvwaddnwstr... yes
                    checking for use_default_colors... yes
                    checking for can_change_color... yes
                    checking how to run the C preprocessor... gcc -E
                    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 Mix_OpenAudio in -lSDL_mixer... yes
                    configure: creating ./config.status
                    config.status: creating mk/buildsys.mk
                    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/local
                    binary path: /usr/local/games
                    config path: /usr/local/etc/frogcomposband/
                    lib path: /usr/local/share/frogcomposband/
                    doc path: /usr/local/share/doc/frogcomposband/
                    var path: (not used)
                    (with private save and score files in ~/.angband/FrogComposband/)
                    
                    -- Frontends --
                    - Curses Yes
                    - X11 Yes
                    - SDL Yes
                    - Windows Disabled
                    - Test No
                    - Stats No
                    
                    - SDL sound Yes
                    - Limit colours to 16 No
                    The make and make install commands ran successfully with no errors and I have make output also. I've been trying the stable version of FrogComPosBand which needed the curses configuration option but can also retry a git commit (which doesn't need curses configuration option).
                    Last edited by darwin; February 9, 2024, 07:45.

                    Comment

                    • backwardsEric
                      Knight
                      • Aug 2019
                      • 527

                      #11
                      With regards to the original error report, when you ran src/frogcomposband, did you do that after running 'make install' or between running 'make' and 'make install'? The latter will not work unless there happened to be previously installed files present or you override the file locations by supplying a number of -d options to src/frogcomposband. I can't speak for Sideways, but I would regard that behavior as "working as expected". If it was configured without --with-no-install and installation hasn't been finished, then running src/frogcomposband will, in general, require -d options to have the executable use the files present in the source directories.

                      Running src/frogcomposband after running 'make' and 'make install' should work. Since you said 'make install' ran without errors, a possible cause of src/frogcomposband failing is the permissions on the installed files. What does 'ls -ld /usr /usr/local, /usr/local/etc /usr/local/etc /usr/local/share /usr/local/var /usr/local/var/games' and 'ls -lr /usr/local/etc/frogcomposband /usr/local/share/frogcomposband /usr/local/var/games/frogcomposband' report? From the installation rules in mk/buildsys.mk.in, I would not expect the permissions to be a problem unless whatever ${INSTALL} expands to in mk/buildsys.mk silently ignores -m options.

                      The behavior of using /usr/local as the default installation prefix is set by autoconf. There could be additional logic in configure.ac to set a more appropriate default, but that would require more information: what is the better default for systems like yours and can that be tested for without breaking how things work elsewhere.

                      If you're only interested in getting the game running and not interested in testing configure with the default installation options, then Gwarl's suggestion of using Makefile.std or using configure with --with-no-install will be easier.

                      Comment

                      • darwin
                        Rookie
                        • Jan 2024
                        • 13

                        #12
                        I highly doubt there are permissions problems as I didn't change any these. After I reconfigured with '--with-no-install' I was able to run the game, but in future I'll want to run it from a system-wide installation.
                        Code:
                        drwxr-xr-x 21 root root 4096 Feb 11 02:44 /usr/
                        drwxr-xr-x 20 root root 4096 Jan 20 22:58 /usr/local/
                        drwxr-xr-x  4 root root 4096 Jan 20 22:57 /usr/local/etc/
                        drwxr-xr-x  4 root root 4096 Jan 20 22:57 /usr/local/etc/
                        drwxr-xr-x 34 root root 4096 Jan 20 22:57 /usr/local/share/
                        drwxr-xr-x  3 root root 4096 Jan 20 22:58 /usr/local/var/
                        drwxr-xr-x  3 root root 4096 Jan 20 22:58 /usr/local/var/games/
                        /usr/local/var/games/frogcomposband:
                        total 16
                        drwxr-xr-x 2 root root 4096 Jan 20 22:58 user/
                        drwxr-xr-x 2 root root 4096 Jan 20 22:58 save/
                        drwxr-xr-x 2 root root 4096 Jan 20 22:58 data/
                        drwxr-xr-x 2 root root 4096 Jan 20 22:58 apex/
                        
                        /usr/local/share/frogcomposband:
                        total 20
                        drwxr-xr-x 4 root root 4096 Feb  2 21:45 xtra/
                        drwxr-xr-x 2 root root 4096 Feb  8 22:37 help/
                        drwxr-xr-x 3 root root 4096 Feb  2 21:45 FrogComposband/
                        drwxr-xr-x 2 root root 4096 Feb  8 22:37 fonts/
                        drwxr-xr-x 2 root root 4096 Feb  8 22:37 file/
                        
                        /usr/local/etc/frogcomposband:
                        total 8
                        drwxr-xr-x 2 root root 4096 Feb  8 22:37 pref/
                        drwxr-xr-x 2 root root 4096 Feb  8 22:37 edit/

                        Comment

                        • backwardsEric
                          Knight
                          • Aug 2019
                          • 527

                          #13
                          I should have asked for what 'ls -lR /usr/local/etc/frogcomposband /usr/local/share/frogcomposband /usr/local/var/games/frogcomposband' report. Since the installation elsewhere doesn't work, the installation program on your system detected by configure, "checking for a BSD-compatible install... /usr/bin/ginstall -c", is a likely culprit. You could use the install-sh packaged with frogcomposband instead:

                          Code:
                          ./configure INSTALL="`pwd`/install-sh -c" NCURSES_CONFIG=`which ncursesw6-config` --enable-sdl --enable-sdl-mixer'
                          Last edited by backwardsEric; February 11, 2024, 17:32. Reason: want -c argument to install-sh; otherwise it moves files when installing

                          Comment

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