0

So I tried compiling the original Quake World source today on my Arch linux machine, but ld(the linking program) threw errors like:

/usr/bin/ld: debugi386-glibc/server/common.o:/home/tom/Projects/quake-source/Quake/QW//client/common.c:59: multiple definition of `gamedirfile';
debugi386-glibc/server/sv_ccmds.o:/home/tom/Projects/quake-source/Quake/QW//server/sv_ccmds.c:737: first defined here

all over the place. When I looked at the files nothing was wrong with them, I am pretty certain that it is an issue in the compile process.

Craig Estey
  • 30,627
  • 4
  • 24
  • 48
ThatGuy
  • 1
  • 1
  • Only a guess, but Quake World is quite old, and may need an older C standard to compile properly. It may be older compilers may have permissively allowed identical definitions to coalesce. – Max Sep 29 '22 at 19:29
  • 4
    Potentially related: https://stackoverflow.com/a/69908511/1442918 . It suggest the compile option -fcommon would allow coalescing of tentative definitions, if this is indeed what’s wrong – Max Sep 29 '22 at 19:30
  • Look at Max's link. Prior to version 12, `gcc` defaulted to `-fcommon` but changed to `-fno-common` [needlessly] breaking many builds – Craig Estey Sep 29 '22 at 19:42
  • 1
    Note also that the behavior of `gcc`'s `-fcommon` constitutes an *extension*, albeit one that provides behavior characteristic of many historic Unix C compilers. If that option solves your build problem then it does not mean that Quake is written to an obsolete version of the language standard, but rather that (in this area, at least) it is not written to *any* version of the C language standard. – John Bollinger Sep 29 '22 at 19:45

0 Answers0