blizzard4591 / openMittsu

An open source implementation and desktop client of the Threema Messenger App.
Other
175 stars 22 forks source link

Compile failure on linux/musl #85

Closed ulm closed 1 year ago

ulm commented 1 year ago

Seen on Gentoo Linux with MUSL libc: https://bugs.gentoo.org/907754

/var/tmp/portage/net-im/openmittsu-0.9.15.0/work/openmittsu-0.9.15.0/3rdparty/spdlog/include/spdlog/details/os-inl.h: In function 'size_t spdlog::details::os::filesize(FILE*)':
/var/tmp/portage/net-im/openmittsu-0.9.15.0/work/openmittsu-0.9.15.0/3rdparty/spdlog/include/spdlog/details/os-inl.h:241:19: error: aggregate 'spdlog::details::os::filesize(FILE*)::stat64 st' has incomplete type and cannot be defined
  241 |     struct stat64 st;
      |                   ^~
/var/tmp/portage/net-im/openmittsu-0.9.15.0/work/openmittsu-0.9.15.0/3rdparty/spdlog/include/spdlog/details/os-inl.h:242:11: error: '::fstat64' has not been declared; did you mean 'stat64'?
  242 |     if (::fstat64(fd, &st) == 0)
      |           ^~~~~~~
      |           stat64

AFAICS this has already been fixed in spdlog (v1.x branch, but no release yet): https://github.com/gabime/spdlog/commit/287a00d364990edbb621fe5e392aeb550135fb96, so updating the submodule should be enough.

blizzard4591 commented 1 year ago

Thank you for providing the fix, I bumped the version. It compiled fine on Debian, but I have no Gentoo to test.

If it does not work, please reopen!