Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure in the zstd submodule #1212

Closed
orbea opened this issue Jul 13, 2022 · 9 comments
Closed

Build failure in the zstd submodule #1212

orbea opened this issue Jul 13, 2022 · 9 comments

Comments

@orbea
Copy link
Contributor

orbea commented Jul 13, 2022

Quick summary

The build fails when building zstd.

System Details

  • Operating system: Gentoo
  • Compiler: gcc-11.3.0
  • Play!: a4860d8

Issue Details

When building Play! the build fails when building the zstd dependency. Perhaps this can be solved by updating the submodule? Maybe detecting a system version and using that instead would also be a good idea?

[367/596] Building C object Source/ui_qt/Source/Framework/zstd_zlibwrapper/CMakeFiles/libzstd_zlibwrapper_static.dir/__/__/zstd/zlibWrapper/zstd_zlibwrapper.c.o
samu: job failed: /usr/lib/ccache/bin/cc -DPLAY_VERSION=\"0.54-5-ga4860d8c\" -DZWRAP_USE_ZSTD -D_FILE_OFFSET_BITS=64 -I/tmp/Play-/deps/Dependencies/build_cmake/zstd_zlibwrapper/../../zstd/lib -I/tmp/Play-/deps/Dependencies/build_cmake/zstd_zlibwrapper/../../zstd/zlibWrapper -O3 -DNDEBUG -MD -MT Source/ui_qt/Source/Framework/zstd_zlibwrapper/CMakeFiles/libzstd_zlibwrapper_static.dir/__/__/zstd/zlibWrapper/zstd_zlibwrapper.c.o -MF Source/ui_qt/Source/Framework/zstd_zlibwrapper/CMakeFiles/libzstd_zlibwrapper_static.dir/__/__/zstd/zlibWrapper/zstd_zlibwrapper.c.o.d -o Source/ui_qt/Source/Framework/zstd_zlibwrapper/CMakeFiles/libzstd_zlibwrapper_static.dir/__/__/zstd/zlibWrapper/zstd_zlibwrapper.c.o -c /tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:104:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  104 | ZEXTERN const char * ZEXPORT z_zlibVersion OF((void)) { return zlibVersion();  }
      |                                            ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:263:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  263 | ZEXTERN int ZEXPORT z_deflateInit_ OF((z_streamp strm, int level,
      |                                    ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:290:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  290 | ZEXTERN int ZEXPORT z_deflateInit2_ OF((z_streamp strm, int level, int method,
      |                                     ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:322:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  322 | ZEXTERN int ZEXPORT z_deflateReset OF((z_streamp strm))
      |                                    ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:337:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  337 | ZEXTERN int ZEXPORT z_deflateSetDictionary OF((z_streamp strm,
      |                                            ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:362:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  362 | ZEXTERN int ZEXPORT z_deflate OF((z_streamp strm, int flush))
      |                               ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:468:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  468 | ZEXTERN int ZEXPORT z_deflateEnd OF((z_streamp strm))
      |                                  ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:486:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  486 | ZEXTERN uLong ZEXPORT z_deflateBound OF((z_streamp strm,
      |                                      ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:496:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  496 | ZEXTERN int ZEXPORT z_deflateParams OF((z_streamp strm,
      |                                     ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:597:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  597 | ZEXTERN int ZEXPORT z_inflateInit_ OF((z_streamp strm,
      |                                    ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:626:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  626 | ZEXTERN int ZEXPORT z_inflateInit2_ OF((z_streamp strm, int  windowBits,
      |                                     ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:663:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  663 | ZEXTERN int ZEXPORT z_inflateReset OF((z_streamp strm))
      |                                    ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:681:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  681 | ZEXTERN int ZEXPORT z_inflateReset2 OF((z_streamp strm,
      |                                     ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:699:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  699 | ZEXTERN int ZEXPORT z_inflateSetDictionary OF((z_streamp strm,
      |                                            ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:733:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  733 | ZEXTERN int ZEXPORT z_inflate OF((z_streamp strm, int flush))
      |                               ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:929:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  929 | ZEXTERN int ZEXPORT z_inflateEnd OF((z_streamp strm))
      |                                  ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:946:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  946 | ZEXTERN int ZEXPORT z_inflateSync OF((z_streamp strm))
      |                                   ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:958:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  958 | ZEXTERN int ZEXPORT z_deflateCopy OF((z_streamp dest,
      |                                   ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:967:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  967 | ZEXTERN int ZEXPORT z_deflateTune OF((z_streamp strm,
      |                                   ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:980:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  980 | ZEXTERN int ZEXPORT z_deflatePending OF((z_streamp strm,
      |                                      ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:991:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
  991 | ZEXTERN int ZEXPORT z_deflatePrime OF((z_streamp strm,
      |                                    ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1001:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1001 | ZEXTERN int ZEXPORT z_deflateSetHeader OF((z_streamp strm,
      |                                        ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1014:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1014 | ZEXTERN int ZEXPORT z_inflateGetDictionary OF((z_streamp strm,
      |                                            ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1025:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1025 | ZEXTERN int ZEXPORT z_inflateCopy OF((z_streamp dest,
      |                                   ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1035:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1035 | ZEXTERN long ZEXPORT z_inflateMark OF((z_streamp strm))
      |                                    ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1044:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1044 | ZEXTERN int ZEXPORT z_inflatePrime OF((z_streamp strm,
      |                                    ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1054:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1054 | ZEXTERN int ZEXPORT z_inflateGetHeader OF((z_streamp strm,
      |                                        ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1063:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1063 | ZEXTERN int ZEXPORT z_inflateBackInit_ OF((z_streamp strm, int windowBits,
      |                                        ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1074:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1074 | ZEXTERN int ZEXPORT z_inflateBack OF((z_streamp strm,
      |                                   ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1084:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1084 | ZEXTERN int ZEXPORT z_inflateBackEnd OF((z_streamp strm))
      |                                      ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1092:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1092 | ZEXTERN uLong ZEXPORT z_zlibCompileFlags OF((void)) { return zlibCompileFlags(); }
      |                                          ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1099:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1099 | ZEXTERN int ZEXPORT z_compress OF((Bytef *dest,   uLongf *destLen,
      |                                ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1118:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1118 | ZEXTERN int ZEXPORT z_compress2 OF((Bytef *dest,   uLongf *destLen,
      |                                 ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1134:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1134 | ZEXTERN uLong ZEXPORT z_compressBound OF((uLong sourceLen))
      |                                       ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1143:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1143 | ZEXTERN int ZEXPORT z_uncompress OF((Bytef *dest,   uLongf *destLen,
      |                                  ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1162:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1162 | ZEXTERN uLong ZEXPORT z_adler32 OF((uLong adler, const Bytef *buf, uInt len))
      |                                 ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1167:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1167 | ZEXTERN uLong ZEXPORT z_crc32   OF((uLong crc, const Bytef *buf, uInt len))
      |                                 ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1174:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1174 | ZEXTERN uLong ZEXPORT z_adler32_z OF((uLong adler, const Bytef *buf, z_size_t len))
      |                                   ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1179:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1179 | ZEXTERN uLong ZEXPORT z_crc32_z OF((uLong crc, const Bytef *buf, z_size_t len))
      |                                 ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1187:56: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1187 | ZEXTERN const z_crc_t FAR * ZEXPORT z_get_crc_table    OF((void))
      |                                                        ^~
/tmp/Play-/deps/Dependencies/zstd/zlibWrapper/zstd_zlibwrapper.c:1194:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 1194 | ZEXTERN const char * ZEXPORT z_zError OF((int err))
      |                                       ^~
samu: subcommand failed

Full build log: play.log

@Zer0xFF
Copy link
Contributor

Zer0xFF commented Jul 14, 2022

Supporting system install is probaby the wise choice here.

do you happen to have (potentially older) version installed on your system? (since I guess its using older header with newer source)
since the submodule is already the "latest" (aka latest version number, but its probably few commit from master/main branch).

@orbea
Copy link
Contributor Author

orbea commented Jul 14, 2022

Yes, that makes sense. I have zstd-1.5.2 installed on my system. I suppose it should more explicitly use the zstd headers in deps.

@orbea
Copy link
Contributor Author

orbea commented Jul 14, 2022

Probably could use FindZstd.cmake from here.

https://github.com/facebook/folly/blob/main/CMake/FindZstd.cmake

@orbea
Copy link
Contributor Author

orbea commented Jul 27, 2022

Where is OF defined?

@orbea
Copy link
Contributor Author

orbea commented Jul 27, 2022

Upstream issue - facebook/zstd#3216

@orbea
Copy link
Contributor Author

orbea commented Jul 29, 2022

@jpd002 Can you please update the zstd submodule? it should fix this issue.

Please see:
facebook/zstd#3217
facebook/zstd@1e09cff

@jpd002
Copy link
Owner

jpd002 commented Jul 29, 2022

Created a branch: https://github.com/jpd002/Play-/tree/update_zstd. I'll merge it if build passes.

@jpd002
Copy link
Owner

jpd002 commented Aug 1, 2022

Branch merged. Thanks for this!

@jpd002 jpd002 closed this as completed Aug 1, 2022
@orbea
Copy link
Contributor Author

orbea commented Aug 1, 2022

I can confirm the build completes on my system again. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants