lzbench icon indicating copy to clipboard operation
lzbench copied to clipboard

Tornado build failure on Ubuntu/RISC-V

Open tommythorn opened this issue 1 year ago • 1 comments

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 avatar May 31 '24 17:05 tommythorn

Building with DONT_BUILD_TORNADO=1 seems to be a workaround

tommythorn avatar May 31 '24 17:05 tommythorn

Are you able to compile it on its own?

c++ -O2 -DFREEARC_UNIX -DFREEARC_INTEL_BYTE_ORDER -otornado main.cpp

tansy avatar Jan 16 '25 00:01 tansy