While trying to build xictools in an up-to-date environment (gcc version 10.1.0, x86_64-pc-linux-gnu), the builds of both fastcap and fasthenry fail during linking. ld complains about redefinition of the timestuff struct, which is declared in resusage.h as included in multiple source files. A similar issue appears for fp (a generic file pointer, declared as a global variable in fasthenry and zbuf).
I was able to fix those issues by treating timestuff as a weak symbol and therefore share these occurences of the struct. This fixes the build for me.
Could you perhaps take a look at my fixes and/or propose another solution for this issue? I would be happy to implement them in case the current solution is not considered acceptable/the intended implementation.
While trying to build xictools in an up-to-date environment (gcc version 10.1.0, x86_64-pc-linux-gnu), the builds of both fastcap and fasthenry fail during linking.
ld
complains about redefinition of thetimestuff
struct, which is declared inresusage.h
as included in multiple source files. A similar issue appears forfp
(a generic file pointer, declared as a global variable in fasthenry and zbuf).I was able to fix those issues by treating
timestuff
as a weak symbol and therefore share these occurences of the struct. This fixes the build for me.Could you perhaps take a look at my fixes and/or propose another solution for this issue? I would be happy to implement them in case the current solution is not considered acceptable/the intended implementation.