-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Thank you for the library!
I am currently trying to compile it for Emscripten. I encountered some minor compilation issues, which I was able to work around.
However, I thought it would be helpful to report them upstream, as it may also hurt other platforms.
1.) Issues with
squashfs-tools-ng/include/compat.h
Line 22 in e3dcf17
| # if SIZE_MAX <= UINT_MAX |
This line is successfully selected, however, the compiler complains with (one example):
/workspaces/emscripten/cache/ports/libsquashfs/squashfs-tools-ng-1.3.2/lib/util/rbtree.c:194:40: warning: incompatible pointer types passing 'size_t *' (aka 'unsigned long *') to parameter of type 'unsigned int *' [-Wincompatible-pointer-types]
194 | if (SZ_ADD_OV(size, tree->value_size, &size))
It is a compiler error, which I downgraded with -Wno-error=incompatible-pointer-types, as I believe the overall behavior should be correct.
Another issue is at
/workspaces/emscripten/cache/ports/libsquashfs/squashfs-tools-ng-1.3.2/tests/libutil/xxhash.c:57:54: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
57 | fprintf(stderr, "Test case " PRI_SZ " failed!\n", I);
which I have downgraded with -Wno-error=format to a warning.
It may be that you have already taken care of the issues in your automake setup, and the emscripten build system may have skipped it. (E.g. the _GNU_SOURCE macro is an example that it missed.)