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

Zstd compile fails - Linux #1426

Open
whacka opened this issue Nov 12, 2024 · 0 comments
Open

Zstd compile fails - Linux #1426

whacka opened this issue Nov 12, 2024 · 0 comments

Comments

@whacka
Copy link

whacka commented Nov 12, 2024

Hi,
I've been trying to build Play! on Fedora 41 and am having an issue with Zstd failing to compile due an implicit declaration.
I assume it might be an issue with my environment, though I'm not sure how to diagnose the issue further.
I'm running the build on Kinoite within a toolbox if relevant.
Currently attempting to build the current latest commit: aad9ef7.
If anyone can help I would really appreciate it, thank you.

Below is the output for gcc, I've also tested the clang compiler and gotten a similar error.

[  0%] Built target sqlite3static
[  2%] Built target zlib
[  8%] Built target libzstd_static
[  8%] Building C object Source/ui_qt/Source/Framework/zstd_zlibwrapper/CMakeFiles/libzstd_zlibwrapper_static.dir/__/__/zstd/zlibWrapper/gzlib.c.o
In file included from /var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c:9:
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzguts.h:129:17: warning: conflicting types for built-in function ‘malloc’; expected ‘void *(long unsigned int)’ [-Wbuiltin-declaration-mismatch]
  129 |   extern voidp  malloc _Z_OF((uInt size));
      |                 ^~~~~~
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzguts.h:38:1: note: ‘malloc’ is declared in header ‘<stdlib.h>’
   37 | #include <fcntl.h>
  +++ |+#include <stdlib.h>
   38 | 
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c: In function ‘gz_open’:
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c:202:15: error: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration]
  202 |         len = strlen((const char *)path);
      |               ^~~~~~
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c:10:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
    9 | #include "gzguts.h"
  +++ |+#include <string.h>
   10 | 
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c:202:15: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
  202 |         len = strlen((const char *)path);
      |               ^~~~~~
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c:202:15: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c: In function ‘gz_error’:
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c:608:44: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
  608 |     if ((state.state->msg = (char *)malloc(strlen(state.state->path) + strlen(msg) + 3)) ==
      |                                            ^~~~~~
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c:608:44: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c:614:38: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
  614 |     (void)snprintf(state.state->msg, strlen(state.state->path) + strlen(msg) + 3,
      |                                      ^~~~~~
/var/home/user/git/Play-/deps/Dependencies/zstd/zlibWrapper/gzlib.c:614:38: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
gmake[2]: *** [Source/ui_qt/Source/Framework/zstd_zlibwrapper/CMakeFiles/libzstd_zlibwrapper_static.dir/build.make:90: Source/ui_qt/Source/Framework/zstd_zlibwrapper/CMakeFiles/libzstd_zlibwrapper_static.dir/__/__/zstd/zlibWrapper/gzlib.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:810: Source/ui_qt/Source/Framework/zstd_zlibwrapper/CMakeFiles/libzstd_zlibwrapper_static.dir/all] Error 2
gmake: *** [Makefile:166: all] Error 2```
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

1 participant