inikep / lzbench

lzbench is an in-memory benchmark of open-source LZ77/LZSS/LZMA compressors
870 stars 180 forks source link

Tornado build failure on Ubuntu/RISC-V #150

Open tommythorn opened 2 months ago

tommythorn commented 2 months ago

On Ubuntu 24.04/RISC-V, the build (make) fails with

...
In file included from tornado/Tornado.cpp:17,
                 from tornado/tor_test.cpp:40:
tornado/MatchFinder.cpp: In member function ‘BYTE* BaseMatchFinder::toPtr(PtrVal)’:
tornado/MatchFinder.cpp:155:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  155 |     BYTE  *toPtr  (PtrVal n) {return (BYTE*) n;}
      |                                      ^~~~~~~~~
tornado/MatchFinder.cpp: In member function ‘PtrVal BaseMatchFinder::fromPtr(BYTE*)’:
tornado/MatchFinder.cpp:156:38: error: cast from ‘BYTE*’ {aka ‘unsigned char*’} to ‘PtrVal’ {aka ‘unsigned int’} loses precision [-fpermissive]
  156 |     PtrVal fromPtr(BYTE  *p) {return (PtrVal) p;}
$ gcc -v
...
gcc version 13.2.0 (Ubuntu 13.2.0-23ubuntu4) 
$ clang -v
Ubuntu clang version 18.1.3 (1)

I haven't tried to resolve it yet.

tommythorn commented 2 months ago

Building with DONT_BUILD_TORNADO=1 seems to be a workaround