gyscos / zstd-rs

A rust binding for the zstd compression library.
MIT License
502 stars 105 forks source link

Unable to build for esp32 #295

Open adrien3d opened 1 month ago

adrien3d commented 1 month ago

I am trying to use actix_web on a esp32, but, at compile time, since zstd-rs is a dependency of actix-http, I can't build my project. Here is the end of the stacktrace (Github limits it to 65536 characters):

  cargo:warning=zstd/lib/legacy/zstd_v03.c:1348:47: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1348 |                             const FSE_DTable* dt)
  cargo:warning=      |                             ~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v03.c: In function 'HUF_decompress4X4':
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2116:38: warning: passing argument 1 of 'HUF_readDTableX4' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2116 |     size_t hSize = HUF_readDTableX4 (DTable, cSrc, cSrcSize);
  cargo:warning=      |                                      ^~~~~~
  cargo:warning=      |                                      |
  cargo:warning=      |                                      unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v03.c:1862:38: note: expected 'U32 *' {aka 'long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 1862 | static size_t HUF_readDTableX4 (U32* DTable, const void* src, size_t srcSize)
  cargo:warning=      |                                 ~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2122:71: warning: passing argument 5 of 'HUF_decompress4X4_usingDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2122 |     return HUF_decompress4X4_usingDTable (dst, dstSize, ip, cSrcSize, DTable);
  cargo:warning=      |                                                                       ^~~~~~
  cargo:warning=      |                                                                       |
  cargo:warning=      |                                                                       unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2017:16: note: expected 'const U32 *' {aka 'const long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 2017 |     const U32* DTable)
  cargo:warning=      |     ~~~~~~~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c: In function 'ZSTD_decodeSeqHeaders':
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2553:51: warning: passing argument 2 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2553 |                 headerSize = FSE_readNCount(norm, &max, &LLlog, ip, iend-ip);
  cargo:warning=      |                                                   ^~~~
  cargo:warning=      |                                                   |
  cargo:warning=      |                                                   U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:1117:67: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1117 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                         ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2553:57: warning: passing argument 3 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2553 |                 headerSize = FSE_readNCount(norm, &max, &LLlog, ip, iend-ip);
  cargo:warning=      |                                                         ^~~~~~
  cargo:warning=      |                                                         |
  cargo:warning=      |                                                         U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:1117:87: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1117 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                             ~~~~~~~~~~^~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2572:51: warning: passing argument 2 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2572 |                 headerSize = FSE_readNCount(norm, &max, &Offlog, ip, iend-ip);
  cargo:warning=      |                                                   ^~~~
  cargo:warning=      |                                                   |
  cargo:warning=      |                                                   U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:1117:67: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1117 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                         ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2572:57: warning: passing argument 3 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2572 |                 headerSize = FSE_readNCount(norm, &max, &Offlog, ip, iend-ip);
  cargo:warning=      |                                                         ^~~~~~~
  cargo:warning=      |                                                         |
  cargo:warning=      |                                                         U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:1117:87: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1117 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                             ~~~~~~~~~~^~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2590:51: warning: passing argument 2 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2590 |                 headerSize = FSE_readNCount(norm, &max, &MLlog, ip, iend-ip);
  cargo:warning=      |                                                   ^~~~
  cargo:warning=      |                                                   |
  cargo:warning=      |                                                   U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:1117:67: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1117 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                         ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2590:57: warning: passing argument 3 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2590 |                 headerSize = FSE_readNCount(norm, &max, &MLlog, ip, iend-ip);
  cargo:warning=      |                                                         ^~~~~~
  cargo:warning=      |                                                         |
  cargo:warning=      |                                                         U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:1117:87: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1117 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                             ~~~~~~~~~~^~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c: In function 'ZSTD_decompressSequences':
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2780:39: warning: passing argument 4 of 'ZSTD_decodeSeqHeaders' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2780 |                                       DTableLL, DTableML, DTableOffb,
  cargo:warning=      |                                       ^~~~~~~~
  cargo:warning=      |                                       |
  cargo:warning=      |                                       U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2500:38: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 2500 |                          FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb,
  cargo:warning=      |                          ~~~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2780:49: warning: passing argument 5 of 'ZSTD_decodeSeqHeaders' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2780 |                                       DTableLL, DTableML, DTableOffb,
  cargo:warning=      |                                                 ^~~~~~~~
  cargo:warning=      |                                                 |
  cargo:warning=      |                                                 U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2500:60: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 2500 |                          FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb,
  cargo:warning=      |                                                ~~~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:659:19: error: conflicting types for 'BIT_readBits'; have 'size_t(BIT_DStream_t *, U32)' {aka 'unsigned int(BIT_DStream_t *, long unsigned int)'}
  cargo:warning=  659 | MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, U32 nbBits)
  cargo:warning=      |                   ^~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:550:21: note: previous declaration of 'BIT_readBits' with type 'size_t(BIT_DStream_t *, unsigned int)' {aka 'unsigned int(BIT_DStream_t *, unsigned int)'}
  cargo:warning=  550 | MEM_STATIC size_t   BIT_readBits(BIT_DStream_t* bitD, unsigned nbBits);
  cargo:warning=      |                     ^~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:668:19: error: conflicting types for 'BIT_readBitsFast'; have 'size_t(BIT_DStream_t *, U32)' {aka 'unsigned int(BIT_DStream_t *, long unsigned int)'}
  cargo:warning=  668 | MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, U32 nbBits)
  cargo:warning=      |                   ^~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:560:19: note: previous declaration of 'BIT_readBitsFast' with type 'size_t(BIT_DStream_t *, unsigned int)' {aka 'unsigned int(BIT_DStream_t *, unsigned int)'}
  cargo:warning=  560 | MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits);
  cargo:warning=      |                   ^~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c: In function 'FSE_decompress':
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1366:34: warning: passing argument 1 of 'FSE_buildDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 1366 |     errorCode = FSE_buildDTable (dt, counting, maxSymbolValue, tableLog);
  cargo:warning=      |                                  ^~
  cargo:warning=      |                                  |
  cargo:warning=      |                                  U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1017:43: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1017 | static size_t FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
  cargo:warning=      |                               ~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1370:71: warning: passing argument 5 of 'FSE_decompress_usingDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 1370 |     return FSE_decompress_usingDTable (dst, maxDstSize, ip, cSrcSize, dt);
  cargo:warning=      |                                                                       ^~
  cargo:warning=      |                                                                       |
  cargo:warning=      |                                                                       U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1333:47: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1333 |                             const FSE_DTable* dt)
  cargo:warning=      |                             ~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v04.c: At top level:
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2019:15: error: conflicting types for 'HUF_readDTableX4'; have 'size_t(U32 *, const void *, size_t)' {aka 'unsigned int(long unsigned int *, const void *, unsigned int)'}
  cargo:warning= 2019 | static size_t HUF_readDTableX4 (U32* DTable, const void* src, size_t srcSize)
  cargo:warning=      |               ^~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1530:15: note: previous declaration of 'HUF_readDTableX4' with type 'size_t(unsigned int *, const void *, size_t)' {aka 'unsigned int(unsigned int *, const void *, unsigned int)'}
  cargo:warning= 1530 | static size_t HUF_readDTableX4 (unsigned* DTable, const void* src, size_t srcSize);
  cargo:warning=      |               ^~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2168:15: error: conflicting types for 'HUF_decompress4X4_usingDTable'; have 'size_t(void *, size_t,  const void *, size_t,  const U32 *)' {aka 'unsigned int(void *, unsigned int,  const void *, unsigned int,  const long unsigned int *)'}
  cargo:warning= 2168 | static size_t HUF_decompress4X4_usingDTable(
  cargo:warning=      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1533:15: note: previous declaration of 'HUF_decompress4X4_usingDTable' with type 'size_t(void *, size_t,  const void *, size_t,  const unsigned int *)' {aka 'unsigned int(void *, unsigned int,  const void *, unsigned int,  const unsigned int *)'}
  cargo:warning= 1533 | static size_t HUF_decompress4X4_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const unsigned* DTable);
  cargo:warning=      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c: In function 'HUF_decompress4X4':
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2269:38: warning: passing argument 1 of 'HUF_readDTableX4' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2269 |     size_t hSize = HUF_readDTableX4 (DTable, cSrc, cSrcSize);
  cargo:warning=      |                                      ^~~~~~
  cargo:warning=      |                                      |
  cargo:warning=      |                                      unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2019:38: note: expected 'U32 *' {aka 'long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 2019 | static size_t HUF_readDTableX4 (U32* DTable, const void* src, size_t srcSize)
  cargo:warning=      |                                 ~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2275:71: warning: passing argument 5 of 'HUF_decompress4X4_usingDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2275 |     return HUF_decompress4X4_usingDTable (dst, dstSize, ip, cSrcSize, DTable);
  cargo:warning=      |                                                                       ^~~~~~
  cargo:warning=      |                                                                       |
  cargo:warning=      |                                                                       unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2171:16: note: expected 'const U32 *' {aka 'const long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 2171 |     const U32* DTable)
  cargo:warning=      |     ~~~~~~~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c: In function 'ZSTD_decodeSeqHeaders':
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2685:51: warning: passing argument 2 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2685 |                 headerSize = FSE_readNCount(norm, &max, &LLlog, ip, iend-ip);
  cargo:warning=      |                                                   ^~~~
  cargo:warning=      |                                                   |
  cargo:warning=      |                                                   U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1100:67: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1100 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                         ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2685:57: warning: passing argument 3 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2685 |                 headerSize = FSE_readNCount(norm, &max, &LLlog, ip, iend-ip);
  cargo:warning=      |                                                         ^~~~~~
  cargo:warning=      |                                                         |
  cargo:warning=      |                                                         U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1100:87: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1100 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                             ~~~~~~~~~~^~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2704:51: warning: passing argument 2 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2704 |                 headerSize = FSE_readNCount(norm, &max, &Offlog, ip, iend-ip);
  cargo:warning=      |                                                   ^~~~
  cargo:warning=      |                                                   |
  cargo:warning=      |                                                   U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1100:67: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1100 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                         ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2704:57: warning: passing argument 3 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2704 |                 headerSize = FSE_readNCount(norm, &max, &Offlog, ip, iend-ip);
  cargo:warning=      |                                                         ^~~~~~~
  cargo:warning=      |                                                         |
  cargo:warning=      |                                                         U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1100:87: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1100 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                             ~~~~~~~~~~^~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2722:51: warning: passing argument 2 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2722 |                 headerSize = FSE_readNCount(norm, &max, &MLlog, ip, iend-ip);
  cargo:warning=      |                                                   ^~~~
  cargo:warning=      |                                                   |
  cargo:warning=      |                                                   U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1100:67: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1100 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                         ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2722:57: warning: passing argument 3 of 'FSE_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2722 |                 headerSize = FSE_readNCount(norm, &max, &MLlog, ip, iend-ip);
  cargo:warning=      |                                                         ^~~~~~
  cargo:warning=      |                                                         |
  cargo:warning=      |                                                         U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:1100:87: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1100 | static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                             ~~~~~~~~~~^~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c: In function 'ZSTD_decompressSequences':
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2924:39: warning: passing argument 4 of 'ZSTD_decodeSeqHeaders' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2924 |                                       DTableLL, DTableML, DTableOffb,
  cargo:warning=      |                                       ^~~~~~~~
  cargo:warning=      |                                       |
  cargo:warning=      |                                       U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2632:38: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 2632 |                          FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb,
  cargo:warning=      |                          ~~~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2924:49: warning: passing argument 5 of 'ZSTD_decodeSeqHeaders' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2924 |                                       DTableLL, DTableML, DTableOffb,
  cargo:warning=      |                                                 ^~~~~~~~
  cargo:warning=      |                                                 |
  cargo:warning=      |                                                 U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v06.c:887:19: error: conflicting types for 'BITv06_readBits'; have 'size_t(BITv06_DStream_t *, U32)' {aka 'unsigned int(BITv06_DStream_t *, long unsigned int)'}
  cargo:warning=  887 | MEM_STATIC size_t BITv06_readBits(BITv06_DStream_t* bitD, U32 nbBits)
  cargo:warning=      |                   ^~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:784:21: note: previous declaration of 'BITv06_readBits' with type 'size_t(BITv06_DStream_t *, unsigned int)' {aka 'unsigned int(BITv06_DStream_t *, unsigned int)'}
  cargo:warning=  784 | MEM_STATIC size_t   BITv06_readBits(BITv06_DStream_t* bitD, unsigned nbBits);
  cargo:warning=      |                     ^~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:896:19: error: conflicting types for 'BITv06_readBitsFast'; have 'size_t(BITv06_DStream_t *, U32)' {aka 'unsigned int(BITv06_DStream_t *, long unsigned int)'}
  cargo:warning=  896 | MEM_STATIC size_t BITv06_readBitsFast(BITv06_DStream_t* bitD, U32 nbBits)
  cargo:warning=      |                   ^~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:793:19: note: previous declaration of 'BITv06_readBitsFast' with type 'size_t(BITv06_DStream_t *, unsigned int)' {aka 'unsigned int(BITv06_DStream_t *, unsigned int)'}
  cargo:warning=  793 | MEM_STATIC size_t BITv06_readBitsFast(BITv06_DStream_t* bitD, unsigned nbBits);
  cargo:warning=      |                   ^~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c: In function 'FSEv06_decompress':
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1612:52: warning: passing argument 1 of 'FSEv06_buildDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 1612 |     { size_t const errorCode = FSEv06_buildDTable (dt, counting, maxSymbolValue, tableLog);
  cargo:warning=      |                                                    ^~
  cargo:warning=      |                                                    |
  cargo:warning=      |                                                    U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1402:42: note: expected 'FSEv06_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1402 | size_t FSEv06_buildDTable(FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
  cargo:warning=      |                           ~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1615:74: warning: passing argument 5 of 'FSEv06_decompress_usingDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 1615 |     return FSEv06_decompress_usingDTable (dst, maxDstSize, ip, cSrcSize, dt);   /* always return, even if it is an error code */
  cargo:warning=      |                                                                          ^~
  cargo:warning=      |                                                                          |
  cargo:warning=      |                                                                          U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1581:50: note: expected 'const FSEv06_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1581 |                             const FSEv06_DTable* dt)
  cargo:warning=      |                             ~~~~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v06.c: At top level:
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2271:8: error: conflicting types for 'HUFv06_readDTableX4'; have 'size_t(U32 *, const void *, size_t)' {aka 'unsigned int(long unsigned int *, const void *, unsigned int)'}
  cargo:warning= 2271 | size_t HUFv06_readDTableX4 (U32* DTable, const void* src, size_t srcSize)
  cargo:warning=      |        ^~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1765:8: note: previous declaration of 'HUFv06_readDTableX4' with type 'size_t(unsigned int *, const void *, size_t)' {aka 'unsigned int(unsigned int *, const void *, unsigned int)'}
  cargo:warning= 1765 | size_t HUFv06_readDTableX4 (unsigned* DTable, const void* src, size_t srcSize);
  cargo:warning=      |        ^~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2408:8: error: conflicting types for 'HUFv06_decompress1X4_usingDTable'; have 'size_t(void *, size_t,  const void *, size_t,  const U32 *)' {aka 'unsigned int(void *, unsigned int,  const void *, unsigned int,  const long unsigned int *)'}
  cargo:warning= 2408 | size_t HUFv06_decompress1X4_usingDTable(
  cargo:warning=      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1776:8: note: previous declaration of 'HUFv06_decompress1X4_usingDTable' with type 'size_t(void *, size_t,  const void *, size_t,  const unsigned int *)' {aka 'unsigned int(void *, unsigned int,  const void *, unsigned int,  const unsigned int *)'}
  cargo:warning= 1776 | size_t HUFv06_decompress1X4_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const unsigned* DTable);
  cargo:warning=      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c: In function 'HUFv06_decompress1X4':
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2441:47: warning: passing argument 1 of 'HUFv06_readDTableX4' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2441 |     size_t const hSize = HUFv06_readDTableX4 (DTable, cSrc, cSrcSize);
  cargo:warning=      |                                               ^~~~~~
  cargo:warning=      |                                               |
  cargo:warning=      |                                               unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2271:34: note: expected 'U32 *' {aka 'long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 2271 | size_t HUFv06_readDTableX4 (U32* DTable, const void* src, size_t srcSize)
  cargo:warning=      |                             ~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2447:74: warning: passing argument 5 of 'HUFv06_decompress1X4_usingDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2447 |     return HUFv06_decompress1X4_usingDTable (dst, dstSize, ip, cSrcSize, DTable);
  cargo:warning=      |                                                                          ^~~~~~
  cargo:warning=      |                                                                          |
  cargo:warning=      |                                                                          unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2411:16: note: expected 'const U32 *' {aka 'const long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 2411 |     const U32* DTable)
  cargo:warning=      |     ~~~~~~~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c: At top level:
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2450:8: error: conflicting types for 'HUFv06_decompress4X4_usingDTable'; have 'size_t(void *, size_t,  const void *, size_t,  const U32 *)' {aka 'unsigned int(void *, unsigned int,  const void *, unsigned int,  const long unsigned int *)'}
  cargo:warning= 2450 | size_t HUFv06_decompress4X4_usingDTable(
  cargo:warning=      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1768:8: note: previous declaration of 'HUFv06_decompress4X4_usingDTable' with type 'size_t(void *, size_t,  const void *, size_t,  const unsigned int *)' {aka 'unsigned int(void *, unsigned int,  const void *, unsigned int,  const unsigned int *)'}
  cargo:warning= 1768 | size_t HUFv06_decompress4X4_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const unsigned* DTable);
  cargo:warning=      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c: In function 'HUFv06_decompress4X4':
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2549:41: warning: passing argument 1 of 'HUFv06_readDTableX4' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2549 |     size_t hSize = HUFv06_readDTableX4 (DTable, cSrc, cSrcSize);
  cargo:warning=      |                                         ^~~~~~
  cargo:warning=      |                                         |
  cargo:warning=      |                                         unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2271:34: note: expected 'U32 *' {aka 'long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 2271 | size_t HUFv06_readDTableX4 (U32* DTable, const void* src, size_t srcSize)
  cargo:warning=      |                             ~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2555:74: warning: passing argument 5 of 'HUFv06_decompress4X4_usingDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2555 |     return HUFv06_decompress4X4_usingDTable (dst, dstSize, ip, cSrcSize, DTable);
  cargo:warning=      |                                                                          ^~~~~~
  cargo:warning=      |                                                                          |
  cargo:warning=      |                                                                          unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2453:16: note: expected 'const U32 *' {aka 'const long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 2453 |     const U32* DTable)
  cargo:warning=      |     ~~~~~~~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v02.c:3141:39: warning: passing argument 4 of 'ZSTD_decodeSeqHeaders' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3141 |                                       DTableLL, DTableML, DTableOffb,
  cargo:warning=      |                                       ^~~~~~~~
  cargo:warning=      |                                       |
  cargo:warning=      |                                       U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v02.c:2860:38: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 2860 |                          FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb,
  cargo:warning=      |                          ~~~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2780:59: warning: passing argument 6 of 'ZSTD_decodeSeqHeaders' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2780 |                                       DTableLL, DTableML, DTableOffb,
  cargo:warning=      |                                                           ^~~~~~~~~~
  cargo:warning=      |                                                           |
  cargo:warning=      |                                                           U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2500:82: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 2500 |                          FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb,
  cargo:warning=      |                                                                      ~~~~~~~~~~~~^~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2632:60: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 2632 |                          FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb,
  cargo:warning=      |                                                ~~~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2924:59: warning: passing argument 6 of 'ZSTD_decodeSeqHeaders' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2924 |                                       DTableLL, DTableML, DTableOffb,
  cargo:warning=      |                                                           ^~~~~~~~~~
  cargo:warning=      |                                                           |
  cargo:warning=      |                                                           U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v02.c:3141:49: warning: passing argument 5 of 'ZSTD_decodeSeqHeaders' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3141 |                                       DTableLL, DTableML, DTableOffb,
  cargo:warning=      |                                                 ^~~~~~~~
  cargo:warning=      |                                                 |
  cargo:warning=      |                                                 U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v02.c:2860:60: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 2860 |                          FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb,
  cargo:warning=      |                                                ~~~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v02.c:3141:59: warning: passing argument 6 of 'ZSTD_decodeSeqHeaders' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3141 |                                       DTableLL, DTableML, DTableOffb,
  cargo:warning=      |                                                           ^~~~~~~~~~
  cargo:warning=      |                                                           |
  cargo:warning=      |                                                           U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v02.c:2860:82: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 2860 |                          FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb,
  cargo:warning=      |                                                                      ~~~~~~~~~~~~^~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v02.c:3157:66: warning: passing argument 3 of 'FSE_initDState' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3157 |         FSE_initDState(&(seqState.stateLL), &(seqState.DStream), DTableLL);
  cargo:warning=      |                                                                  ^~~~~~~~
  cargo:warning=      |                                                                  |
  cargo:warning=      |                                                                  U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v02.c:650:96: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning=  650 | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt)
  cargo:warning=      |                                                                              ~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v02.c:3158:68: warning: passing argument 3 of 'FSE_initDState' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3158 |         FSE_initDState(&(seqState.stateOffb), &(seqState.DStream), DTableOffb);
  cargo:warning=      |                                                                    ^~~~~~~~~~
  cargo:warning=      |                                                                    |
  cargo:warning=      |                                                                    U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v02.c:650:96: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning=  650 | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt)
  cargo:warning=      |                                                                              ~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v02.c:3159:66: warning: passing argument 3 of 'FSE_initDState' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3159 |         FSE_initDState(&(seqState.stateML), &(seqState.DStream), DTableML);
  cargo:warning=      |                                                                  ^~~~~~~~
  cargo:warning=      |                                                                  |
  cargo:warning=      |                                                                  U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v02.c:650:96: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning=  650 | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt)
  cargo:warning=      |                                                                              ~~~~~~~~~~~~~~~~~~^~
  exit status: 0
  exit status: 0
  exit status: 1
  cargo:warning=ToolExecError: Command "riscv32-esp-elf-gcc" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/home/achapelet/dev/iothings/iss/target/riscv32imac-esp-espidf/debug/build/zstd-sys-885d9309f5d05147/out/5eeec2f4c1e9b3b6-zstd_v02.o" "-c" "zstd/lib/legacy/zstd_v02.c" with args riscv32-esp-elf-gcc did not execute successfully (status code exit status: 1).cargo:warning=zstd/lib/legacy/zstd_v03.c:2796:66: warning: passing argument 3 of 'FSE_initDState' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2796 |         FSE_initDState(&(seqState.stateLL), &(seqState.DStream), DTableLL);
  cargo:warning=      |                                                                  ^~~~~~~~
  cargo:warning=      |                                                                  |
  cargo:warning=      |                                                                  U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:651:96: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning=  651 | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt)
  cargo:warning=      |                                                                              ~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2797:68: warning: passing argument 3 of 'FSE_initDState' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2797 |         FSE_initDState(&(seqState.stateOffb), &(seqState.DStream), DTableOffb);
  cargo:warning=      |                                                                    ^~~~~~~~~~
  cargo:warning=      |                                                                    |
  cargo:warning=      |                                                                    U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:651:96: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning=  651 | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt)
  cargo:warning=      |                                                                              ~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v03.c:2798:66: warning: passing argument 3 of 'FSE_initDState' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2798 |         FSE_initDState(&(seqState.stateML), &(seqState.DStream), DTableML);
  cargo:warning=      |                                                                  ^~~~~~~~
  cargo:warning=      |                                                                  |
  cargo:warning=      |                                                                  U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v03.c:651:96: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning=  651 | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt)
  cargo:warning=      |                                                                              ~~~~~~~~~~~~~~~~~~^~

  exit status: 1
  cargo:warning=ToolExecError: Command "riscv32-esp-elf-gcc" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/home/achapelet/dev/iothings/iss/target/riscv32imac-esp-espidf/debug/build/zstd-sys-885d9309f5d05147/out/5eeec2f4c1e9b3b6-zstd_v03.o" "-c" "zstd/lib/legacy/zstd_v03.c" with args riscv32-esp-elf-gcc did not execute successfully (status code exit status: 1).cargo:warning=zstd/lib/legacy/zstd_v04.c:2632:82: note: expected 'FSE_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 2632 |                          FSE_DTable* DTableLL, FSE_DTable* DTableML, FSE_DTable* DTableOffb,
  cargo:warning=      |                                                                      ~~~~~~~~~~~~^~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2941:66: warning: passing argument 3 of 'FSE_initDState' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2941 |         FSE_initDState(&(seqState.stateLL), &(seqState.DStream), DTableLL);
  cargo:warning=      |                                                                  ^~~~~~~~
  cargo:warning=      |                                                                  |
  cargo:warning=      |                                                                  U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:830:96: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning=  830 | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt)
  cargo:warning=      |                                                                              ~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2942:68: warning: passing argument 3 of 'FSE_initDState' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2942 |         FSE_initDState(&(seqState.stateOffb), &(seqState.DStream), DTableOffb);
  cargo:warning=      |                                                                    ^~~~~~~~~~
  cargo:warning=      |                                                                    |
  cargo:warning=      |                                                                    U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:830:96: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning=  830 | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt)
  cargo:warning=      |                                                                              ~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v04.c:2943:66: warning: passing argument 3 of 'FSE_initDState' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 2943 |         FSE_initDState(&(seqState.stateML), &(seqState.DStream), DTableML);
  cargo:warning=      |                                                                  ^~~~~~~~
  cargo:warning=      |                                                                  |
  cargo:warning=      |                                                                  U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v04.c:830:96: note: expected 'const FSE_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning=  830 | MEM_STATIC void FSE_initDState(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD, const FSE_DTable* dt)
  cargo:warning=      |                                                                              ~~~~~~~~~~~~~~~~~~^~

  exit status: 1
  cargo:warning=ToolExecError: Command "riscv32-esp-elf-gcc" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/home/achapelet/dev/iothings/iss/target/riscv32imac-esp-espidf/debug/build/zstd-sys-885d9309f5d05147/out/5eeec2f4c1e9b3b6-zstd_v04.o" "-c" "zstd/lib/legacy/zstd_v04.c" with args riscv32-esp-elf-gcc did not execute successfully (status code exit status: 1).cargo:warning=zstd/lib/legacy/zstd_v06.c: In function 'ZSTDv06_decodeLiteralsBlock':
  cargo:warning=zstd/lib/legacy/zstd_v06.c:3061:130: warning: passing argument 5 of 'HUFv06_decompress1X4_usingDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3061 |             {   size_t const errorCode = HUFv06_decompress1X4_usingDTable(dctx->litBuffer, litSize, istart+lhSize, litCSize, dctx->hufTableX4);
  cargo:warning=      |                                                                                                                              ~~~~^~~~~~~~~~~~
  cargo:warning=      |                                                                                                                                  |
  cargo:warning=      |                                                                                                                                  unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2411:16: note: expected 'const U32 *' {aka 'const long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 2411 |     const U32* DTable)
  cargo:warning=      |     ~~~~~~~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c: In function 'ZSTDv06_buildSeqTable':
  cargo:warning=zstd/lib/legacy/zstd_v06.c:3153:63: warning: passing argument 2 of 'FSEv06_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3153 |             size_t const headerSize = FSEv06_readNCount(norm, &max, &tableLog, src, srcSize);
  cargo:warning=      |                                                               ^~~~
  cargo:warning=      |                                                               |
  cargo:warning=      |                                                               U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1207:63: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1207 | size_t FSEv06_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                     ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:3153:69: warning: passing argument 3 of 'FSEv06_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3153 |             size_t const headerSize = FSEv06_readNCount(norm, &max, &tableLog, src, srcSize);
  cargo:warning=      |                                                                     ^~~~~~~~~
  cargo:warning=      |                                                                     |
  cargo:warning=      |                                                                     U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1207:83: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1207 | size_t FSEv06_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                         ~~~~~~~~~~^~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c: In function 'ZSTDv06_loadEntropy':
  cargo:warning=zstd/lib/legacy/zstd_v06.c:3762:37: warning: passing argument 1 of 'HUFv06_readDTableX4' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3762 |     hSize = HUFv06_readDTableX4(dctx->hufTableX4, dict, dictSize);
  cargo:warning=      |                                 ~~~~^~~~~~~~~~~~
  cargo:warning=      |                                     |
  cargo:warning=      |                                     unsigned int *
  cargo:warning=zstd/lib/legacy/zstd_v06.c:2271:34: note: expected 'U32 *' {aka 'long unsigned int *'} but argument is of type 'unsigned int *'
  cargo:warning= 2271 | size_t HUFv06_readDTableX4 (U32* DTable, const void* src, size_t srcSize)
  cargo:warning=      |                             ~~~~~^~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:3769:62: warning: passing argument 2 of 'FSEv06_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3769 |         offcodeHeaderSize = FSEv06_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dict, dictSize);
  cargo:warning=      |                                                              ^~~~~~~~~~~~~~~~
  cargo:warning=      |                                                              |
  cargo:warning=      |                                                              U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1207:63: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1207 | size_t FSEv06_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                     ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v06.c:3769:80: warning: passing argument 3 of 'FSEv06_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3769 |         offcodeHeaderSize = FSEv06_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dict, dictSize);
  cargo:warning=      |                                                                                ^~~~~~~~~~~
  cargo:warning=      |                                                                                |
  cargo:warning=      |                                                                                U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v06.c:1207:83: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1207 | size_t FSEv06_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                         ~~~~~~~~~~^~~~~~~~~~~

  exit status: 1
  cargo:warning=ToolExecError: Command "riscv32-esp-elf-gcc" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/home/achapelet/dev/iothings/iss/target/riscv32imac-esp-espidf/debug/build/zstd-sys-885d9309f5d05147/out/5eeec2f4c1e9b3b6-zstd_v06.o" "-c" "zstd/lib/legacy/zstd_v06.c" with args riscv32-esp-elf-gcc did not execute successfully (status code exit status: 1).cargo:warning=zstd/lib/legacy/zstd_v07.c:556:19: error: conflicting types for 'BITv07_readBits'; have 'size_t(BITv07_DStream_t *, U32)' {aka 'unsigned int(BITv07_DStream_t *, long unsigned int)'}
  cargo:warning=  556 | MEM_STATIC size_t BITv07_readBits(BITv07_DStream_t* bitD, U32 nbBits)
  cargo:warning=      |                   ^~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v07.c:455:21: note: previous declaration of 'BITv07_readBits' with type 'size_t(BITv07_DStream_t *, unsigned int)' {aka 'unsigned int(BITv07_DStream_t *, unsigned int)'}
  cargo:warning=  455 | MEM_STATIC size_t   BITv07_readBits(BITv07_DStream_t* bitD, unsigned nbBits);
  cargo:warning=      |                     ^~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v07.c:565:19: error: conflicting types for 'BITv07_readBitsFast'; have 'size_t(BITv07_DStream_t *, U32)' {aka 'unsigned int(BITv07_DStream_t *, long unsigned int)'}
  cargo:warning=  565 | MEM_STATIC size_t BITv07_readBitsFast(BITv07_DStream_t* bitD, U32 nbBits)
  cargo:warning=      |                   ^~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v07.c:464:19: note: previous declaration of 'BITv07_readBitsFast' with type 'size_t(BITv07_DStream_t *, unsigned int)' {aka 'unsigned int(BITv07_DStream_t *, unsigned int)'}
  cargo:warning=  464 | MEM_STATIC size_t BITv07_readBitsFast(BITv07_DStream_t* bitD, unsigned nbBits);
  cargo:warning=      |                   ^~~~~~~~~~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v07.c: In function 'FSEv07_decompress':
  cargo:warning=zstd/lib/legacy/zstd_v07.c:1633:52: warning: passing argument 1 of 'FSEv07_buildDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 1633 |     { size_t const errorCode = FSEv07_buildDTable (dt, counting, maxSymbolValue, tableLog);
  cargo:warning=      |                                                    ^~
  cargo:warning=      |                                                    |
  cargo:warning=      |                                                    U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v07.c:1423:42: note: expected 'FSEv07_DTable *' {aka 'unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1423 | size_t FSEv07_buildDTable(FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
  cargo:warning=      |                           ~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v07.c:1636:74: warning: passing argument 5 of 'FSEv07_decompress_usingDTable' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 1636 |     return FSEv07_decompress_usingDTable (dst, maxDstSize, ip, cSrcSize, dt);   /* always return, even if it is an error code */
  cargo:warning=      |                                                                          ^~
  cargo:warning=      |                                                                          |
  cargo:warning=      |                                                                          U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v07.c:1602:50: note: expected 'const FSEv07_DTable *' {aka 'const unsigned int *'} but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1602 |                             const FSEv07_DTable* dt)
  cargo:warning=      |                             ~~~~~~~~~~~~~~~~~~~~~^~
  cargo:warning=zstd/lib/legacy/zstd_v07.c: In function 'ZSTDv07_buildSeqTable':
  cargo:warning=zstd/lib/legacy/zstd_v07.c:3384:63: warning: passing argument 2 of 'FSEv07_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3384 |             size_t const headerSize = FSEv07_readNCount(norm, &max, &tableLog, src, srcSize);
  cargo:warning=      |                                                               ^~~~
  cargo:warning=      |                                                               |
  cargo:warning=      |                                                               U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v07.c:1152:63: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1152 | size_t FSEv07_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                     ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v07.c:3384:69: warning: passing argument 3 of 'FSEv07_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 3384 |             size_t const headerSize = FSEv07_readNCount(norm, &max, &tableLog, src, srcSize);
  cargo:warning=      |                                                                     ^~~~~~~~~
  cargo:warning=      |                                                                     |
  cargo:warning=      |                                                                     U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v07.c:1152:83: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1152 | size_t FSEv07_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                         ~~~~~~~~~~^~~~~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v07.c: In function 'ZSTDv07_loadEntropy':
  cargo:warning=zstd/lib/legacy/zstd_v07.c:4053:75: warning: passing argument 2 of 'FSEv07_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 4053 |         size_t const offcodeHeaderSize = FSEv07_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, dictEnd-dictPtr);
  cargo:warning=      |                                                                           ^~~~~~~~~~~~~~~~
  cargo:warning=      |                                                                           |
  cargo:warning=      |                                                                           U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v07.c:1152:63: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1152 | size_t FSEv07_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                     ~~~~~~~~~~^~~~~~~~
  cargo:warning=zstd/lib/legacy/zstd_v07.c:4053:93: warning: passing argument 3 of 'FSEv07_readNCount' from incompatible pointer type [-Wincompatible-pointer-types]
  cargo:warning= 4053 |         size_t const offcodeHeaderSize = FSEv07_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, dictEnd-dictPtr);
  cargo:warning=      |                                                                                             ^~~~~~~~~~~
  cargo:warning=      |                                                                                             |
  cargo:warning=      |                                                                                             U32 * {aka long unsigned int *}
  cargo:warning=zstd/lib/legacy/zstd_v07.c:1152:83: note: expected 'unsigned int *' but argument is of type 'U32 *' {aka 'long unsigned int *'}
  cargo:warning= 1152 | size_t FSEv07_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr,
  cargo:warning=      |                                                                         ~~~~~~~~~~^~~~~~~~~~~

  exit status: 0
  exit status: 0
  exit status: 0
  exit status: 1
  cargo:warning=ToolExecError: Command "riscv32-esp-elf-gcc" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/home/achapelet/dev/iothings/iss/target/riscv32imac-esp-espidf/debug/build/zstd-sys-885d9309f5d05147/out/5eeec2f4c1e9b3b6-zstd_v07.o" "-c" "zstd/lib/legacy/zstd_v07.c" with args riscv32-esp-elf-gcc did not execute successfully (status code exit status: 1).
  exit status: 0
  exit status: 0

  --- stderr

  error occurred: Command "riscv32-esp-elf-gcc" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/home/achapelet/dev/iothings/iss/target/riscv32imac-esp-espidf/debug/build/zstd-sys-885d9309f5d05147/out/5eeec2f4c1e9b3b6-zstd_v07.o" "-c" "zstd/lib/legacy/zstd_v07.c" with args riscv32-esp-elf-gcc did not execute successfully (status code exit status: 1).

warning: build failed, waiting for other jobs to finish...
gyscos commented 4 weeks ago

Thanks for the report!

It looks like the C cross-compiler is unable to compile some of these legacy C files. Not sure if they have been tested on risc-V before. (It's also possible that I only see issues for legacy files because it's the end of the long stack trace.)

Could you try a few workarounds:

It is weird though:

expected 'U32 *' {aka 'long unsigned int *'} but argument is of type 'unsigned int *'

On riscv32, unsigned int and long unsigned int should both be 32 bits, not sure why it's complaining.

Sounds a bit related to https://github.com/espressif/esp-idf/issues/6906.

It looks like it might be some upstream issue, where the C zstd library assumes int and int32_t are the same, which is the case in most places but not in espressif's idf compiler. Could be filed as an issue for zstd.