-
Notifications
You must be signed in to change notification settings - Fork 11
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
Compilation errors on OSX and Ubuntu 24.04 #63
Comments
Hi @philippeboyd, |
@philippeboyd , pls see if this commit resolves your issues. |
@moticless thanks! That fixed it for linux. About OSX, I've been trying a couple of things and can't seem to get it passed the following error after adjusting the dependency for malloc on OSX in In file included from listpack.c:45:
./listpack_malloc.h:45:10: fatal error: 'malloc.h' file not found
45 | #include "malloc.h"
| ^~~~~~~~~~
1 error generated. +#ifdef __APPLE__
+#include <malloc/malloc.h>
+#else
#include "malloc.h"
+#endif But I get the following error, not sure where to go from here. listpack.c:176:16: error: call to undeclared function 'malloc_usable_size'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
176 | if (size < lp_malloc_size(lp)) {
| ^
./listpack_malloc.h:53:24: note: expanded from macro 'lp_malloc_size'
53 | #define lp_malloc_size malloc_usable_size
| ^
listpack.c:176:16: note: did you mean 'malloc_good_size'?
./listpack_malloc.h:53:24: note: expanded from macro 'lp_malloc_size'
53 | #define lp_malloc_size malloc_usable_size
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/malloc.h:374:15: note: 'malloc_good_size' declared here
374 | extern size_t malloc_good_size(size_t size);
| ^
listpack.c:176:14: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
176 | if (size < lp_malloc_size(lp)) {
| ~~~~ ^ ~~~~~~~~~~~~~~~~~~
listpack.c:771:30: error: call to undeclared function 'malloc_usable_size'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
771 | new_listpack_bytes > lp_malloc_size(lp)) {
| ^
./listpack_malloc.h:53:24: note: expanded from macro 'lp_malloc_size'
53 | #define lp_malloc_size malloc_usable_size
| ^
listpack.c:771:28: warning: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long long') and 'int' [-Wsign-compare]
771 | new_listpack_bytes > lp_malloc_size(lp)) {
| ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
2 warnings and 2 errors generated.
make[2]: *** [listpack.o] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2 Relevant clang version❯ clang -v
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: arm64-apple-darwin24.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin |
I managed to make it work on OSX, here's the relevant PR, let me know what you think :) |
Currently working on my Mac (OSX) and running the build inside a docker container since it doesn't compile on OSX but compiles in
ubuntu:22.04
. Might be related to #55Steps to reproduce
docker run
one of the following:Execute inside the container
Error logs for ubuntu 24.04
☝ Setting
ll
andvll
toint64_t ll = 0, vll = 0;
works, but we get new errors:Am i missing something to build on latest LTS ubuntu 24?
Extra
Error logs for OSX
The text was updated successfully, but these errors were encountered: