DGoldDragon28 / Unangband

A roguelike originally created (and developed until version 0.6.4c) by Andrew Doull.
https://dgolddragon28.github.io/Unangband/
GNU General Public License v2.0
59 stars 6 forks source link

Multiple compilation errors (and warnings!) #65

Open Sod-Almighty opened 4 months ago

Sod-Almighty commented 4 months ago
  1. It does not compile (on Alpine Linux 3.18 64-bit).

  2. Warnings are errors! Especially things like "array subscript 4 is outside array bounds"!!

  3. It is not clear how to compile only for ncurses, not X11. I commented out the SYS_x11 declaration and it only made things worse.

# make -f Makefile.std
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o birth.o -c birth.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o borgdumb.o -c borgdumb.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o cave.o -c cave.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o cmd1.o -c cmd1.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o cmd2.o -c cmd2.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o cmd3.o -c cmd3.c
cmd3.c: In function 'player_trade':
cmd3.c:1754:13: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
 1754 |             while(check_quest(&event, TRUE));
      |             ^~~~~
cmd3.c:1757:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
 1757 |                 inven_takeoff(item, trade_amount);
      |                 ^~~~~~~~~~~~~
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o cmd4.o -c cmd4.c
cmd4.c: In function 'count_routes':
cmd4.c:1912:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
 1912 |   for (i = 0; i < num; i++)
      |   ^~~
cmd4.c:1916:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
 1916 |     return -num;
      |     ^~~~~~
cmd4.c: In function 'print_quests':
cmd4.c:5121:14: warning: unused variable 'prefix' [-Wunused-variable]
 5121 |         cptr prefix = NULL;
      |              ^~~~~~
cmd4.c:5119:14: warning: unused variable 'event_out' [-Wunused-variable]
 5119 |         bool event_out;
      |              ^~~~~~~~~
cmd4.c:5117:14: warning: variable 'newline' set but not used [-Wunused-but-set-variable]
 5117 |         bool newline = FALSE;
      |              ^~~~~~~
cmd4.c:5116:13: warning: unused variable 'tense' [-Wunused-variable]
 5116 |         int tense = 0;
      |             ^~~~~
cmd4.c:5114:16: warning: unused variable 'j' [-Wunused-variable]
 5114 |         int i, j;
      |                ^
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o cmd5.o -c cmd5.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o cmd6.o -c cmd6.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o dungeon.o -c dungeon.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o files.o -c files.c
files.c: In function 'put_flag_char':
files.c:2800:30: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2800 |                         if (f[4] & (TR4_EVIL)) c_put_str(TERM_WHITE, "+", row, col);
      |                             ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2793:30: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2793 |                         if (f[4] & (TR4_SILENT)) c_put_str(TERM_RED, "x", row, col);
      |                             ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2786:30: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2786 |                         if (f[4] & (TR4_ANCHOR)) c_put_str(TERM_RED, "x", row, col);
      |                             ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2760:31: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2760 |                         if ((f[4] & (TR4_ANIMAL)) && (f[3] & (TR3_ESP_NATURE))) c_put_str(TERM_WHITE, "*", row, col);
      |                              ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2653:27: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2653 |                         (f[4] & (TR4_WINDY)))
      |                          ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2639:27: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2639 |                         (f[4] & (TR4_STATIC)))
      |                          ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2497:27: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2497 |                         (f[4] & (TR4_RES_DISEASE)))
      |                          ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2427:27: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2427 |                         (f[4] & (TR4_IM_POIS)))
      |                          ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2434:23: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2434 |                     (f[4] & ((TR4_HURT_ACID) << y)))
      |                      ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2441:27: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2441 |                         (f[4] & (TR4_HURT_POIS)))
      |                          ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2448:27: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2448 |                         (f[4] & (TR4_HURT_LITE)))
      |                          ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
files.c:2455:27: warning: array subscript 4 is outside array bounds of 'u32b[4]' {aka 'long unsigned int[4]'} [-Warray-bounds]
 2455 |                         (f[4] & (TR4_HURT_WATER)))
      |                          ~^~~
files.c:2413:32: note: at offset 32 into object 'f' of size [0, 32]
 2413 | static void put_flag_char(u32b f[4], int set, u32b flag, int y, int x, int row, int col, int pval)
      |                           ~~~~~^~~~
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o generate.o -c generate.c
generate.c: In function 'build_overlapping':
generate.c:5621:41: warning: self-comparison always evaluates to true [-Wtautological-compare]
 5621 |                                 if (x2w <= x2w) x2w = x1w + 1;
      |                                         ^~
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o info.o -c info.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o init1.o -c init1.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o init2.o -c init2.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o load.o -c load.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o melee1.o -c melee1.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o melee2.o -c melee2.c
melee2.c: In function 'choose_ranged_attack':
melee2.c:2034:30: warning: self-comparison always evaluates to true [-Wtautological-compare]
 2034 |         else if (m_ptr->mana == m_ptr->mana) f6 &= ~(RF6_ADD_MANA);
      |                              ^~
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o monster1.o -c monster1.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o monster2.o -c monster2.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o object1.o -c object1.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o object2.o -c object2.c
object2.c: In function 'object_absorb':
object2.c:2027:29: warning: passing argument 1 of 'object_copy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 2027 |                 object_copy(j_ptr, i_ptr);
      |                             ^~~~~
In file included from angband.h:42,
                 from object2.c:17:
externs.h:860:38: note: expected 'object_type *' but argument is of type 'const object_type *'
  860 | extern void object_copy(object_type *o_ptr, const object_type *j_ptr);
      |                         ~~~~~~~~~~~~~^~~~~
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o option.o -c option.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o randart.o -c randart.c
randart.c: In function 'store_base_power':
randart.c:1218:33: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
 1218 |                                 else art_armor_total++; break;
      |                                 ^~~~
randart.c:1218:57: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
 1218 |                                 else art_armor_total++; break;
      |                                                         ^~~~~
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o quests.o -c quests.c
quests.c: In function 'check_quest':
quests.c:233:25: warning: unused variable 'prefix' [-Wunused-variable]
  233 |             const char *prefix =
      |                         ^~~~~~
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o save.o -c save.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o spells1.o -c spells1.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o spells2.o -c spells2.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o store.o -c store.c
store.c: In function 'store_sell':
store.c:3133:13: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
 3133 |             while(check_quest(&event, TRUE));
      |             ^~~~~
store.c:3136:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
 3136 |                         item_pos = store_carry(i_ptr, store_index);
      |                         ^~~~~~~~
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o tables.o -c tables.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o util.o -c util.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o variable.o -c variable.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o wizard1.o -c wizard1.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o wizard2.o -c wizard2.c
wizard2.c: In function 'do_cmd_wiz_ecology':
wizard2.c:1503:13: warning: the comparison will always evaluate as 'true' for the address of 'get_mon' will never be NULL [-Waddress]
 1503 |         if (!cave_ecology.get_mon)
      |             ^
In file included from angband.h:40,
                 from wizard2.c:17:
types.h:2140:14: note: 'get_mon' declared here
 2140 |         bool get_mon[MAX_ECOLOGY_RACES];        /* Are we permitted to pick this race */
      |              ^~~~~~~
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o xtra1.o -c xtra1.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o xtra2.o -c xtra2.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o z-form.o -c z-form.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o z-rand.o -c z-rand.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o z-term.o -c z-term.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o z-util.o -c z-util.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o z-virt.o -c z-virt.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o main.o -c main.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I. -o main-gcu.o -c main-gcu.c
gcc -Wall -O2 -Wno-unused-parameter -DHAVE_MKSTEMP -DUSE_GCU -I.  -o unangband birth.o borgdumb.o cave.o cmd1.o cmd2.o cmd3.o cmd4.o cmd5.o cmd6.o dungeon.o files.o generate.o info.o init1.o init2.o load.o melee1.o melee2.o monster1.o monster2.o object1.o object2.o option.o randart.o quests.o save.o spells1.o spells2.o store.o tables.o util.o variable.o wizard1.o wizard2.o xtra1.o xtra2.o z-form.o z-rand.o z-term.o z-util.o z-virt.o  main.o main-gcu.o  -lcurses -ltermcap
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: borgdumb.o:(.rodata+0x0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cave.o:(.rodata+0x60): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cmd1.o:(.rodata+0x100): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cmd2.o:(.rodata+0x1a0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cmd3.o:(.rodata+0x40): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cmd4.o:(.rodata+0x2e0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cmd5.o:(.rodata+0x0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cmd6.o:(.rodata+0x180): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: dungeon.o:(.rodata+0x2a0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: files.o:(.rodata+0x240): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: generate.o:(.rodata+0xfa0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: info.o:(.rodata+0x9a0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: init1.o:(.rodata+0x9e0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: init2.o:(.rodata+0x0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: load.o:(.rodata+0x8a0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: melee1.o:(.rodata+0x380): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: melee2.o:(.rodata+0x280): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: monster1.o:(.rodata+0x0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: monster2.o:(.rodata+0x480): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: object1.o:(.rodata+0x2a0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: object2.o:(.rodata+0x8a0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: option.o:(.rodata+0x60): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: randart.o:(.rodata+0x440): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: quests.o:(.rodata+0x240): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: save.o:(.rodata+0x0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: spells1.o:(.rodata+0x1380): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: spells2.o:(.rodata+0x2e0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: store.o:(.rodata+0x380): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: tables.o:(.rodata+0x1f80): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: util.o:(.rodata+0x300): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: variable.o:(.data.rel.ro.local+0x0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: wizard1.o:(.rodata+0x40): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: wizard2.o:(.rodata+0x200): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: xtra1.o:(.rodata+0x240): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: xtra2.o:(.rodata+0x4e0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: main.o:(.rodata+0x140): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: main-gcu.o:(.rodata+0xc0): multiple definition of `angband_sound_name'; birth.o:(.rodata+0xe0): first defined here
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -ltermcap: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile.std:107: unangband] Error 1
dennis-roof commented 4 months ago

The compile method of this game is very outdated, but I was able to compile this game on branch tag 0.6.6 with gcc v12.2.0

Which branch are you trying to compile?

Sod-Almighty commented 4 months ago

The master branch I think. I just clicked the "Code" button and used the provided git link: https://github.com/DGoldDragon28/Unangband.git