Go Back   Angband Forums > Angband > Development

Thread Tools Display Modes
Old July 8, 2021, 04:58   #1
Join Date: Jul 2021
Posts: 1
slockwood is on a distinguished road
Compilation error in Ubuntu 20.04 under WSL 1

Anyone else getting this?

slockwood@STACY-LOCKWOOD-01:~/workspace/angband-4.2.1$ make all
Entering directory src.
cat: ../version: No such file or directory
cat: ../version: No such file or directory
cat: ../version: No such file or directory
cat: ../version: No such file or directory
Successfully generated dependencies.
cat: ../version: No such file or directory
main.c:56:1: warning: ISO C forbids empty initializer braces [-Wpedantic]
56 | {
| ^
main.c:55:28: error: zero or negative size array ‘modules’
55 | static const struct module modules[] =
| ^~~~~~~
Failed to compile main.c!
make[3]: *** [../mk/ main.o] Error 1
make[2]: *** [../mk/ all] Error 2
make[1]: *** [mk/ subdirs] Error 2
make: *** [mk/ all] Error 2

$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

Steps to reproduce (or not):
./configure --with-no-install
make all
slockwood is offline   Reply With Quote
Old July 8, 2021, 05:34   #2
Join Date: Aug 2019
Posts: 339
backwardsEric is on a distinguished road
What did the end of the output from configuring Angband look like? Here's what it looks like with the current development version of Angband on a Debian system:


  Install path:                           (not used)
  binary path:                            ..
  config path:                            /var/tmp/angband/lib/
  lib path:                               /var/tmp/angband/lib/
  doc path:                               /var/tmp/angband/doc/
  var path:                               /var/tmp/angband/lib/

-- Frontends --
- Curses                                  Yes
- X11                                     Yes
- SDL2                                    Disabled
- SDL                                     Disabled
- Windows                                 Disabled
- Test                                    No
- Stats                                   No
- Spoilers                                Yes

- SDL2 sound                              Disabled
- SDL sound                               Disabled
The key parts are the lines after "-- Frontends --". If all those are "No" or "Disabled", you'll get the compiler error you saw. Because the Debian system used above had the libx11-dev and libncurses-dev packages installed, those front-ends were automatically enabled. To enable the SDL or SDL2 front ends, you would need to have the prerequisites installed (libsdl1.2-dev, libsdl-image1.2-dev, and libsdl-ttf2.0-dev packages for SDL; libsdl2-dev, libsdl2-image-dev, and libsdl2-ttf-dev packages for SDL2) and include either the --enable-sdl or --enable-sdl2 in the options when running the configure script for Angband.

Last edited by backwardsEric; July 8, 2021 at 05:35. Reason: fix verb tense
backwardsEric is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FAangband compilation error unrecognized command line option '-mno-cygwin' hernaldog Variants 5 July 7, 2019 18:55
Compilation issue with gfb594ca kandrc Vanilla 2 November 29, 2018 20:59
"Error at line 1988 of 'artifact.txt'. Record 136 contains a many entries' error. thedude Vanilla 1 December 12, 2014 05:31
Compile Error in Ubuntu 13.04 bobthegreat Development 6 January 15, 2014 17:36
Compilation issues. Tiburon Silverflame Development 8 March 1, 2010 21:34

All times are GMT +1. The time now is 16:04.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.