devttys0 / sasquatch

501 stars 155 forks source link

Doesn't build with docker latest ubuntu #41

Closed docfate111 closed 3 years ago

docfate111 commented 3 years ago

I installed the required software packages but running ./build.sh gives the following errors

cc -g -O2  -I. -I./LZMA/lzma465/C -I./LZMA/lzmalt -I./LZMA/lzmadaptive/C/7zip/Compress/LZMA_Lib -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT=\"gzip\" -Wall -Werror  -DGZIP_SUPPORT -DLZMA_SUPPORT -DXZ_SUPPORT -DLZO_SUPPORT -DXATTR_SUPPORT -DXATTR_DEFAULT   -c -o xz_wrapper.o xz_wrapper.c
In file included from xz_wrapper.c:31:
xz_wrapper.h:50:2: error: unknown type name 'lzma_vli'
   50 |  lzma_vli id;
      |  ^~~~~~~~
xz_wrapper.h:56:2: error: unknown type name 'lzma_filter'
   56 |  lzma_filter filter[3];
      |  ^~~~~~~~~~~
xz_wrapper.h:64:2: error: unknown type name 'lzma_options_lzma'
   64 |  lzma_options_lzma opt;
      |  ^~~~~~~~~~~~~~~~~
xz_wrapper.c:35:11: error: 'LZMA_FILTER_X86' undeclared here (not in a function)
   35 |  { "x86", LZMA_FILTER_X86, 0 },
      |           ^~~~~~~~~~~~~~~
xz_wrapper.c:36:15: error: 'LZMA_FILTER_POWERPC' undeclared here (not in a function)
   36 |  { "powerpc", LZMA_FILTER_POWERPC, 0 },
      |               ^~~~~~~~~~~~~~~~~~~
xz_wrapper.c:37:12: error: 'LZMA_FILTER_IA64' undeclared here (not in a function)
   37 |  { "ia64", LZMA_FILTER_IA64, 0 },
      |            ^~~~~~~~~~~~~~~~
xz_wrapper.c:38:11: error: 'LZMA_FILTER_ARM' undeclared here (not in a function)
   38 |  { "arm", LZMA_FILTER_ARM, 0 },
      |           ^~~~~~~~~~~~~~~
xz_wrapper.c:39:16: error: 'LZMA_FILTER_ARMTHUMB' undeclared here (not in a function)
   39 |  { "armthumb", LZMA_FILTER_ARMTHUMB, 0 },
      |                ^~~~~~~~~~~~~~~~~~~~
xz_wrapper.c:40:13: error: 'LZMA_FILTER_SPARC' undeclared here (not in a function)
   40 |  { "sparc", LZMA_FILTER_SPARC, 0 },
      |             ^~~~~~~~~~~~~~~~~
xz_wrapper.c:41:10: error: 'LZMA_VLI_UNKNOWN' undeclared here (not in a function)
   41 |  { NULL, LZMA_VLI_UNKNOWN, 0 }
      |          ^~~~~~~~~~~~~~~~
xz_wrapper.c: In function 'xz_init':
xz_wrapper.c:404:21: error: request for member 'id' in something not a structure or union
  404 |  filter[0].filter[0].id = LZMA_FILTER_LZMA2;
      |                     ^
xz_wrapper.c:404:27: error: 'LZMA_FILTER_LZMA2' undeclared (first use in this function)
  404 |  filter[0].filter[0].id = LZMA_FILTER_LZMA2;
      |                           ^~~~~~~~~~~~~~~~~
xz_wrapper.c:404:27: note: each undeclared identifier is reported only once for each function it appears in
xz_wrapper.c:404:2: error: statement with no effect [-Werror=unused-value]
  404 |  filter[0].filter[0].id = LZMA_FILTER_LZMA2;
      |  ^~~~~~
xz_wrapper.c:405:21: error: request for member 'options' in something not a structure or union
  405 |  filter[0].filter[0].options = &stream->opt;
      |                     ^
xz_wrapper.c:405:2: error: statement with no effect [-Werror=unused-value]
  405 |  filter[0].filter[0].options = &stream->opt;
      |  ^~~~~~
xz_wrapper.c:406:21: error: request for member 'id' in something not a structure or union
  406 |  filter[0].filter[1].id = LZMA_VLI_UNKNOWN;
      |                     ^
xz_wrapper.c:406:2: error: statement with no effect [-Werror=unused-value]
  406 |  filter[0].filter[1].id = LZMA_VLI_UNKNOWN;
      |  ^~~~~~
xz_wrapper.c:413:23: error: request for member 'id' in something not a structure or union
  413 |    filter[j].filter[0].id = bcj[i].id;
      |                       ^
xz_wrapper.c:413:4: error: statement with no effect [-Werror=unused-value]
  413 |    filter[j].filter[0].id = bcj[i].id;
      |    ^~~~~~
xz_wrapper.c:414:23: error: request for member 'id' in something not a structure or union
  414 |    filter[j].filter[1].id = LZMA_FILTER_LZMA2;
      |                       ^
xz_wrapper.c:414:4: error: statement with no effect [-Werror=unused-value]
  414 |    filter[j].filter[1].id = LZMA_FILTER_LZMA2;
      |    ^~~~~~
xz_wrapper.c:415:23: error: request for member 'options' in something not a structure or union
  415 |    filter[j].filter[1].options = &stream->opt;
      |                       ^
xz_wrapper.c:415:4: error: statement with no effect [-Werror=unused-value]
  415 |    filter[j].filter[1].options = &stream->opt;
      |    ^~~~~~
xz_wrapper.c:416:23: error: request for member 'id' in something not a structure or union
  416 |    filter[j].filter[2].id = LZMA_VLI_UNKNOWN;
      |                       ^
xz_wrapper.c:416:4: error: statement with no effect [-Werror=unused-value]
  416 |    filter[j].filter[2].id = LZMA_VLI_UNKNOWN;
      |    ^~~~~~
xz_wrapper.c: In function 'xz_compress':
xz_wrapper.c:440:9: error: unknown type name 'lzma_ret'
  440 |         lzma_ret res = 0;
      |         ^~~~~~~~
xz_wrapper.c:449:13: error: implicit declaration of function 'lzma_lzma_preset' [-Werror=implicit-function-declaration]
  449 |          if(lzma_lzma_preset(&stream->opt, LZMA_PRESET_DEFAULT))
      |             ^~~~~~~~~~~~~~~~
xz_wrapper.c:449:44: error: 'LZMA_PRESET_DEFAULT' undeclared (first use in this function)
  449 |          if(lzma_lzma_preset(&stream->opt, LZMA_PRESET_DEFAULT))
      |                                            ^~~~~~~~~~~~~~~~~~~
xz_wrapper.c:452:14: error: request for member 'dict_size' in something not a structure or union
  452 |   stream->opt.dict_size = stream->dictionary_size;
      |              ^
xz_wrapper.c:452:3: error: statement with no effect [-Werror=unused-value]
  452 |   stream->opt.dict_size = stream->dictionary_size;
      |   ^~~~~~
xz_wrapper.c:455:9: error: implicit declaration of function 'lzma_stream_buffer_encode' [-Werror=implicit-function-declaration]
  455 |   res = lzma_stream_buffer_encode(filter->filter,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
xz_wrapper.c:456:4: error: 'LZMA_CHECK_CRC32' undeclared (first use in this function)
  456 |    LZMA_CHECK_CRC32, NULL, src, size, filter->buffer,
      |    ^~~~~~~~~~~~~~~~
xz_wrapper.c:459:13: error: 'LZMA_OK' undeclared (first use in this function)
  459 |   if(res == LZMA_OK) {
      |             ^~~~~~~
xz_wrapper.c:459:10: error: comparison between pointer and integer [-Werror]
  459 |   if(res == LZMA_OK) {
      |          ^~
xz_wrapper.c:462:20: error: 'LZMA_BUF_ERROR' undeclared (first use in this function)
  462 |   } else if(res != LZMA_BUF_ERROR)
      |                    ^~~~~~~~~~~~~~
xz_wrapper.c:462:17: error: comparison between pointer and integer [-Werror]
  462 |   } else if(res != LZMA_BUF_ERROR)
      |                 ^~
xz_wrapper.c: In function 'xz_uncompress':
xz_wrapper.c:494:2: error: unknown type name 'lzma_ret'
  494 |  lzma_ret res = lzma_stream_buffer_decode(&memlimit, 0, NULL,
      |  ^~~~~~~~
xz_wrapper.c:494:17: error: implicit declaration of function 'lzma_stream_buffer_decode' [-Werror=implicit-function-declaration]
  494 |  lzma_ret res = lzma_stream_buffer_decode(&memlimit, 0, NULL,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
xz_wrapper.c:497:12: error: 'LZMA_OK' undeclared (first use in this function)
  497 |  if(res == LZMA_OK && size == (int) src_pos)
      |            ^~~~~~~
xz_wrapper.c:497:9: error: comparison between pointer and integer [-Werror]
  497 |  if(res == LZMA_OK && size == (int) src_pos)
      |         ^~
cc1: all warnings being treated as errors
make: *** [<builtin>: xz_wrapper.o] Error 1
docfate111 commented 3 years ago

Same as #6