Opened 10 years ago

Closed 9 years ago

#960 closed bug (wontfix)

init_store_txt crashes the linker if ALLOW_TEMPLATES is off

Reported by: magnate Owned by: magnate
Milestone: 3.1.2 beta Keywords: cleanup
Cc:

Description

The full error output is as follows:

init2.o: In function `init_stores':
/home/chrisc/workspace/angband/src/init2.c:1002: undefined reference to `init_store_txt'
init2.o: In function `init_names':
/home/chrisc/workspace/angband/src/init2.c:1029: undefined reference to `init_names_txt'
monster/melee2.o: In function `make_attack_spell':
/home/chrisc/workspace/angband/src/monster/melee2.c:855: undefined reference to `damcalc'
/home/chrisc/workspace/angband/src/monster/melee2.c:839: undefined reference to `damcalc'
/home/chrisc/workspace/angband/src/monster/melee2.c:887: undefined reference to `damcalc'
/home/chrisc/workspace/angband/src/monster/melee2.c:871: undefined reference to `damcalc'
/home/chrisc/workspace/angband/src/monster/melee2.c:1409: undefined reference to `damcalc'
monster/melee2.o:/home/chrisc/workspace/angband/src/monster/melee2.c:1504: more undefined references to `damcalc' follow
collect2: ld returned 1 exit status
make[3]: *** [angband] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1

The melee2.c references can all be solved by moving the damcalc function to a more sensibe place (it should not be inside a #ifdef ALLOW_TEMPLATES section). The other two errors (init_stores and init_names) are identical: the current code expects to parse these two files every time the game is run, instead of loading .raw files.

So the decision to be made is: do we create stores.raw and names.raw, or do we parse those two txt files even when ALLOW_TEMPLATES is off? The former would be necessary to support platforms where we don't want to mess with filesystem access.

Change History (2)

comment:1 Changed 10 years ago by magnate

  • Owner set to magnate
  • Status changed from new to assigned

After [888d321] (SVN r1662) it looks like this:

init2.o: In function `init_stores':
/home/chrisc/workspace/angband/src/init2.c:1002: undefined reference to `init_store_txt'
init2.o: In function `init_names':
/home/chrisc/workspace/angband/src/init2.c:1029: undefined reference to `init_names_txt'
collect2: ld returned 1 exit status
make[3]: *** [angband] Error 1
make[2]: *** [all] Error 1
make[1]: *** [subdirs] Error 1
make: *** [all] Error 1

comment:2 Changed 9 years ago by magnate

  • Resolution set to wontfix
  • Status changed from assigned to closed

[13e41e7] (SVN r1697) obviates any need to fix this.

Note: See TracTickets for help on using tickets.