cgohlke / imagecodecs

Image transformation, compression, and decompression codecs
https://pypi.org/project/imagecodecs
BSD 3-Clause "New" or "Revised" License
114 stars 21 forks source link

liblzf fails to build with mingw-w64 #4

Closed kmilos closed 3 years ago

kmilos commented 3 years ago

Could not build python-imagecodecs for mingw64 due to this error:

liblzf-3.6/lzf_c.c: In function 'lzf_compress':
liblzf-3.6/lzf_c.c:123:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'off'
  123 |   unsigned _int64 off; /* workaround for missing POSIX compliance */
      |                   ^~~
liblzf-3.6/lzf_c.c:123:19: error: 'off' undeclared (first use in this function)

I guess _int64 is MSVC only, so the test should either change to MSVC if that was the intention, or one should use a more standard uint64_t from stdint.h?

Think this is irrespective of whether imagecodecs/patches/python-lzf.diff is applied or not...

kmilos commented 3 years ago

Seems upstream already aware: http://cvs.schmorp.de/liblzf/Changes?revision=1.61&view=markup