It appears that whisper needs a specific zlib version to compile. Running under ubuntu 18.04 or 19.10, with the default zlib installation, gives the following compilation failures:
Memory.cpp: In member function 'bool WdRiscv::Memory::saveSnapshot(const string&)':
Memory.cpp:583:54: error: cannot convert 'gzFile_s**' to 'gzFile {aka gzFile_s*}' for argument '1' to 'int gzwrite(gzFile, voidpc, unsigned int)'
int resp = gzwrite(gzout, buffer, current_chunk);
^
Memory.cpp:594:16: error: cannot convert 'gzFile_s**' to 'gzFile {aka gzFile_s*}' for argument '1' to 'int gzclose(gzFile)'
gzclose(gzout);
^
Memory.cpp: In member function 'bool WdRiscv::Memory::loadSnapshot(const string&)':
Memory.cpp:608:29: error: cannot convert 'gzFile_s**' to 'gzFile {aka gzFile_s*}' for argument '1' to 'int gzeof(gzFile)'
if (not gzin or gzeof(gzin))
^
Memory.cpp:624:52: error: cannot convert 'gzFile_s**' to 'gzFile {aka gzFile_s*}' for argument '1' to 'int gzread(gzFile, voidp, unsigned int)'
int resp = gzread(gzin, buffer, current_chunk);
^
Memory.cpp:627:31: error: cannot convert 'gzFile_s**' to 'gzFile {aka gzFile_s*}' for argument '1' to 'int gzeof(gzFile)'
success = gzeof(gzin);
^
Memory.cpp:636:54: error: cannot convert 'gzFile_s**' to 'gzFile {aka gzFile_s*}' for argument '1' to 'const char* gzerror(gzFile, int*)'
<< " failed: " << gzerror(gzin, nullptr) << "\n";
^
Memory.cpp:639:26: error: cannot convert 'gzFile_s**' to 'gzFile {aka gzFile_s*}' for argument '1' to 'int gzeof(gzFile)'
else if (not gzeof(gzin))
^
Memory.cpp:642:15: error: cannot convert 'gzFile_s**' to 'gzFile {aka gzFile_s*}' for argument '1' to 'int gzclose(gzFile)'
gzclose(gzin);
It appears that whisper needs a specific zlib version to compile. Running under ubuntu 18.04 or 19.10, with the default zlib installation, gives the following compilation failures:
Modifying the code as follows works: