Building older versions from source fails on Linux Mint 19


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

Dungeon Dilettante

Posts: 4

Joined: Thursday, 16th May 2019, 02:56

Post Thursday, 16th May 2019, 03:06

Building older versions from source fails on Linux Mint 19

I'm trying to build multiple versions of DCSS from source. I downloaded the tarballs from the Releases folder, followed the instructions for downloading the dependencies as found in INSTALL.txt, and tried to build ("make TILES=y"). I've so far tried .17 and .18; each returns a mess of errors with a final error message that reads:
Makefile:1579: recipe for target 'ability.o' failed
make: *** [ability.o] Error 1

I'm perplexed. I just successfully compiled multiple versions of DCSS on Linux Mint 17. I don't know what to do from here. Can anyone help?

Here's the whole output:
  Code:
    CXX ability.o
In file included from AppHdr.h:464:0,
                 from ability.cc:6:
externs.h:389:53: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
     static level_id parse_level_id(const string &s) throw (string);
                                                     ^~~~~
In file included from beam.h:9:0,
                 from ouch.h:11,
                 from actor.h:6,
                 from player.h:14,
                 from mon-util.h:11,
                 from describe.h:13,
                 from ability.cc:27:
options.h:126:69: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
                             const vector<string> *rcdirs = nullptr) throw (string);
                                                                     ^~~~~
In file included from directn.h:10:0,
                 from ability.cc:28:
mon-info.h:361:9: error: ‘function’ does not name a type; did you mean ‘union’?
 typedef function<vector<string> (const monster_info& mi)> (desc_filter);
         ^~~~~~~~
         union
In file included from ability.cc:28:0:
directn.h:55:5: error: ‘desc_filter’ does not name a type; did you mean ‘message_filter’?
     desc_filter get_desc_func; // Function to add relevant descriptions
     ^~~~~~~~~~~
     message_filter
directn.h:95:5: error: ‘desc_filter’ does not name a type; did you mean ‘message_filter’?
     desc_filter get_desc_func;
     ^~~~~~~~~~~
     message_filter
directn.h: In constructor ‘direction_chooser_args::direction_chooser_args()’:
directn.h:111:9: error: class ‘direction_chooser_args’ does not have any field named ‘get_desc_func’
         get_desc_func(nullptr),
         ^~~~~~~~~~~~~
In file included from monster.h:6:0,
                 from env.h:8,
                 from dungeon.h:13,
                 from ability.cc:29:
spl-util.h: At global scope:
spl-util.h:96:9: error: ‘function’ does not name a type; did you mean ‘union’?
 typedef function<int (coord_def where)> cell_func;
         ^~~~~~~~
         union
spl-util.h:97:9: error: ‘function’ does not name a type; did you mean ‘union’?
 typedef function<int (monster* mon)> monster_func;
         ^~~~~~~~
         union
spl-util.h:102:24: error: ‘cell_func’ was not declared in this scope
 int apply_area_visible(cell_func cf, const coord_def& where);
                        ^~~~~~~~~
spl-util.h:102:24: note: suggested alternative: ‘cloud_func’
 int apply_area_visible(cell_func cf, const coord_def& where);
                        ^~~~~~~~~
                        cloud_func
spl-util.h:102:38: error: expected primary-expression before ‘const’
 int apply_area_visible(cell_func cf, const coord_def& where);
                                      ^~~~~
spl-util.h:102:60: error: expression list treated as compound expression in initializer [-fpermissive]
 int apply_area_visible(cell_func cf, const coord_def& where);
                                                            ^
spl-util.h:104:34: error: ‘monster_func’ was not declared in this scope
 int apply_monsters_around_square(monster_func mf, const coord_def& where,
                                  ^~~~~~~~~~~~
spl-util.h:104:34: note: suggested alternative: ‘monster_at’
 int apply_monsters_around_square(monster_func mf, const coord_def& where,
                                  ^~~~~~~~~~~~
                                  monster_at
spl-util.h:104:51: error: expected primary-expression before ‘const’
 int apply_monsters_around_square(monster_func mf, const coord_def& where,
                                                   ^~~~~
spl-util.h:105:34: error: expected primary-expression before ‘int’
                                  int radius = 1);
                                  ^~~
spl-util.h:105:48: error: expression list treated as compound expression in initializer [-fpermissive]
                                  int radius = 1);
                                                ^
spl-util.h:107:32: error: ‘cell_func’ was not declared in this scope
 int apply_random_around_square(cell_func cf, const coord_def& where,
                                ^~~~~~~~~
spl-util.h:107:32: note: suggested alternative: ‘cloud_func’
 int apply_random_around_square(cell_func cf, const coord_def& where,
                                ^~~~~~~~~
                                cloud_func
spl-util.h:107:46: error: expected primary-expression before ‘const’
 int apply_random_around_square(cell_func cf, const coord_def& where,
                                              ^~~~~
spl-util.h:108:32: error: expected primary-expression before ‘bool’
                                bool hole_in_middle, int max_targs);
                                ^~~~
spl-util.h:108:53: error: expected primary-expression before ‘int’
                                bool hole_in_middle, int max_targs);
                                                     ^~~
spl-util.h:108:66: error: expression list treated as compound expression in initializer [-fpermissive]
                                bool hole_in_middle, int max_targs);
                                                                  ^
spl-util.h:128:23: error: ‘desc_filter’ has not been declared
                       desc_filter get_desc_func = nullptr);
                       ^~~~~~~~~~~
spl-util.h:128:58: error: could not convert ‘nullptr’ from ‘std::nullptr_t’ to ‘int’
                       desc_filter get_desc_func = nullptr);
                                                          ^
In file included from env.h:8:0,
                 from dungeon.h:13,
                 from ability.cc:29:
monster.h:557:23: error: ‘function’ has not been declared
     bool search_slots(function<bool (const mon_spell_slot &)> func) const;
                       ^~~~~~~~
monster.h:557:31: error: expected ‘,’ or ‘...’ before ‘<’ token
     bool search_slots(function<bool (const mon_spell_slot &)> func) const;
                               ^
monster.h:605:24: error: ‘function’ has not been declared
     bool search_spells(function<bool (spell_type)> func) const;
                        ^~~~~~~~
monster.h:605:32: error: expected ‘,’ or ‘...’ before ‘<’ token
     bool search_spells(function<bool (spell_type)> func) const;
                                ^
In file included from dungeon.h:14:0,
                 from ability.cc:29:
mapdef.h:103:50: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
     void set(const string &branch, int s, int d) throw (string);
                                                  ^~~~~
mapdef.h:114:41: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
     static level_range parse(string lr) throw (string);
                                         ^~~~~
mapdef.h:129:9: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
         throw (string);
         ^~~~~
mapdef.h:131:9: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
         throw (string);
         ^~~~~
mapdef.h:858:45: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
                            const string &s) throw(string);
                                             ^~~~~
ability.cc: In function ‘spret_type _do_ability(const ability_def&, bool)’:
ability.cc:1739:41: error: cannot convert ‘std::nullptr_t’ to ‘int’ for argument ‘13’ to ‘bool spell_direction(dist&, bolt&, targeting_type, targ_mode_type, int, bool, bool, bool, const char*, const char*, bool, targetter*, int)’
                              false, &tgt))
                                         ^
ability.cc:1757:41: error: cannot convert ‘std::nullptr_t’ to ‘int’ for argument ‘13’ to ‘bool spell_direction(dist&, bolt&, targeting_type, targ_mode_type, int, bool, bool, bool, const char*, const char*, bool, targetter*, int)’
         if (!spell_direction(abild, beam)
                                         ^
ability.cc:1783:38: error: cannot convert ‘std::nullptr_t’ to ‘int’ for argument ‘13’ to ‘bool spell_direction(dist&, bolt&, targeting_type, targ_mode_type, int, bool, bool, bool, const char*, const char*, bool, targetter*, int)’
                              &hitfunc))
                                      ^
ability.cc:1810:41: error: cannot convert ‘std::nullptr_t’ to ‘int’ for argument ‘13’ to ‘bool spell_direction(dist&, bolt&, targeting_type, targ_mode_type, int, bool, bool, bool, const char*, const char*, bool, targetter*, int)’
         if (!spell_direction(abild, beam))
                                         ^
ability.cc:2056:75: error: cannot convert ‘std::nullptr_t’ to ‘int’ for argument ‘13’ to ‘bool spell_direction(dist&, bolt&, targeting_type, targ_mode_type, int, bool, bool, bool, const char*, const char*, bool, targetter*, int)’
         if (!spell_direction(spd, beam, DIR_TARGET, TARG_HOSTILE, 0, false))
                                                                           ^
ability.cc:2215:39: error: cannot convert ‘std::nullptr_t’ to ‘int’ for argument ‘13’ to ‘bool spell_direction(dist&, bolt&, targeting_type, targ_mode_type, int, bool, bool, bool, const char*, const char*, bool, targetter*, int)’
         if (!spell_direction(spd, beam))
                                       ^
ability.cc:2290:39: error: cannot convert ‘std::nullptr_t’ to ‘int’ for argument ‘13’ to ‘bool spell_direction(dist&, bolt&, targeting_type, targ_mode_type, int, bool, bool, bool, const char*, const char*, bool, targetter*, int)’
         if (!spell_direction(spd, beam))
                                       ^
ability.cc:2323:39: error: cannot convert ‘std::nullptr_t’ to ‘int’ for argument ‘13’ to ‘bool spell_direction(dist&, bolt&, targeting_type, targ_mode_type, int, bool, bool, bool, const char*, const char*, bool, targetter*, int)’
         if (!spell_direction(spd, beam))
                                       ^
ability.cc:2470:56: error: ‘placeholders’ has not been declared
                              bind(desc_success_chance, placeholders::_1,
                                                        ^~~~~~~~~~~~
ability.cc:2470:30: error: ‘bind’ was not declared in this scope
                              bind(desc_success_chance, placeholders::_1,
                              ^~~~
ability.cc:2470:30: note: suggested alternative: ‘abild’
                              bind(desc_success_chance, placeholders::_1,
                              ^~~~
                              abild
Makefile:1579: recipe for target 'ability.o' failed
make: *** [ability.o] Error 1
Last edited by thebenjamin on Thursday, 16th May 2019, 14:33, edited 1 time in total.
User avatar

Tomb Titivator

Posts: 894

Joined: Monday, 29th September 2014, 09:04

Post Thursday, 16th May 2019, 03:35

Re: Building from source fails on Linux Mint 19

Does it work to build the latest release (0.23)?
What version of gcc are you using?

Dungeon Dilettante

Posts: 4

Joined: Thursday, 16th May 2019, 02:56

Post Thursday, 16th May 2019, 03:50

Re: Building from source fails on Linux Mint 19

gcc 7.4.0

Because you asked, I just downloaded the tarball for 0.23. It seems to be compiling fine so far. Would it be useful if I tried to compile all versions between .17 and .23 so we could see which work and which don't?

Dungeon Master

Posts: 324

Joined: Monday, 18th August 2014, 20:04

Post Thursday, 16th May 2019, 04:20

Re: Building from source fails on Linux Mint 19

This is a bug affecting gcc 7 builds that was fixed in 0.19 0.20 (edit); see:


You might be able to apply this patch and get it working. However, in general, there's a limit to how far back you can go and still compile old versions on the most modern build environment -- things change. I can't go much earlier than 0.17 on recent mac clang, for example, and usually end up compiling these in a docker container if I need them.

Dungeon Dilettante

Posts: 4

Joined: Thursday, 16th May 2019, 02:56

Post Thursday, 16th May 2019, 04:29

Re: Building from source fails on Linux Mint 19

Thank you, that makes sense. I'm a bit obsessive about playing older versions, so I'll try what you recommend.

Ziggurat Zagger

Posts: 5287

Joined: Friday, 25th November 2011, 07:36

Post Thursday, 16th May 2019, 23:06

Re: Building from source fails on Linux Mint 19

thebenjamin wrote:Thank you, that makes sense. I'm a bit obsessive about playing older versions, so I'll try what you recommend.

I recommend nagas in .10. Seriously, level 1 constriction is OP :)

Dungeon Dilettante

Posts: 4

Joined: Thursday, 16th May 2019, 02:56

Post Friday, 17th May 2019, 20:38

Re: Building older versions from source fails on Linux Mint

Is there an easy way to compile the older versions using gcc-6? I tried using the CC flag when I ran my "make" command, but it didn't work.

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.