AstroMenace (3D space scroll-shooter)

My newbie’s snap of this C++ game (URL) does fails to build, error messages :

Core22:

Failed to run the build script for part 'astromenace'.                                                                                                            
Recommended resolution: Check the build output and verify the project can work with the 'autotools' plugin.                                                       
Failed to execute snapcraft in instance.

Core24:

Failed to run the build script for part 'astromenace'.ac' is required                                                                                             
Check the build output and verify the project can work with the 'autotools' plugin.                        
Failed to execute pack in instance.

Snap:

name: astromenace
base: core24
version: '1.4.2'
summary: Hardcore 3D space scroll-shooter with spaceship upgrade possibilities.
description: |
  Space is a vast area, an unbounded territory where it seems there is room
  for everybody, but another force thinks differently. Hordes of hostile creatures
  have crawled out from the dark corners of the universe, craving to conquer
  your homeland.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

# platforms:
#   amd64:
#     build-on: [amd64]
#     build-for: [amd64]

parts:
  astromenace:
    plugin: autotools
    autotools-configure-parameters: ["--prefix=/usr"]
    source: https://github.com/viewizard/astromenace.git
    build-packages:
      - libncurses-dev
      - texinfo
      - libsdl2-2.0-0
      - libgl1
      - libglew2.2
      - libqt5core5a
      - libqt5gui5
      - libqt5widgets5
      - libalut0
      - libjpeg9
      - libopenal1
      - libogg0

apps:
  moon-buggy:
    command: usr/bin/astromenace
    plugs:
      - audio-playback
      - desktop
      - desktop-legacy
#      - network
#      - network-bind
      - opengl
      - process-control
      - pulseaudio
      - wayland
      - x11
#      - screen-inhibit-control

Please run the snapcraft command with the --verbose flag to check additional info regarding the build error.

1 Like

Here it is:

$ snapcraft --verbose
Starting snapcraft, version 8.3.1                                                                                                                                 
Logging execution to '/home/me/.local/state/snapcraft/log/snapcraft-20240802-164347.743191.log'                                                             
Launching managed ubuntu 24.04 instance...                                                                                                                        
Creating instance from base instance                                                                                                                              
Starting instance                                                                                                                                                 
Starting snapcraft, version 8.3.1                                                                                                                                 
Logging execution to '/tmp/snapcraft.log'                                                                                                                         
Starting snapcraft, version 8.3.1                                                                                                                                 
Logging execution to '/tmp/snapcraft.log'                                                                                                                         
Initialising lifecycle                                                                                                                                            
Installing build-packages                                                                                                                                         
Installing build-snaps                                                                                                                                            
Pulling astromenace                                                                                                                                               
Building astromenace                                                                                                                                              
:: + '[' '!' -f ./configure ']'                                                                                                                                   
:: + '[' -f ./autogen.sh ']'                                                                                                                                      
:: + '[' '!' -f ./configure ']'                                                                                                                                   
:: + '[' -f ./bootstrap ']'                                                                                                                                       
:: + '[' '!' -f ./configure ']'                                                                                                                                   
:: + autoreconf --install                                                                                                                                         
:: autoreconf: error: 'configure.ac' is required                                                                                                                  
Failed to run the build script for part 'astromenace'.                                                                                                            
Recommended resolution: Check the build output and verify the project can work with the 'autotools' plugin.                                                       
Failed to execute snapcraft in instance.                                                                                                                          
Full execution log: '/home/me/.local/state/snapcraft/log/snapcraft-20240802-164347.743191.log'

Astromenace looks like a CMake project.

I would recommend using the CMake plugin instead of the autotools plugin. It looks like the source has instructions on how to build it with CMake, although you probably don’t need to make a separate build directory - snapcraft can handle out-of-source builds for cmake projects.

1 Like

Thanks for the tip. My low knowledge and the size of CMakeLists.txt does stops me.

After more than one month of experimenting snapcrafting, i can finally make it run. I will do a bit more test before to try to upload it (I have no account yet). If someone want the Snap file until this…

1 Like

Just want to let know that the snap is published.

1 Like