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

cast increases required alignment of target type With 6.0.2 on 32bit #513

Open
heitbaum opened this issue Jan 12, 2025 · 0 comments
Open

Comments

@heitbaum
Copy link
Contributor

Compile failure on 32 bit targets


libtool: compile:  /build/build.LibreELEC-H3.arm-13.0-devel/toolchain/bin/armv7ve-libreelec-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/lib -I.. -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/include -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/include/nfsc -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/mount -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/nfs -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/nfs4 -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/nlm -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/nsm -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/portmap -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/rquota -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/win32 "-D_U_=__attribute__((unused))" -I/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/tls -Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing -Werror -march=armv7ve -mtune=cortex-a7 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-vfpv4 -Wall -pipe -O2 -fomit-frame-pointer -DNDEBUG -D_FILE_OFFSET_BITS=64 -MT libnfs_la-socket.lo -MD -MP -MF .deps/libnfs_la-socket.Tpo -c /build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/lib/socket.c  -fPIC -DPIC -o .libs/libnfs_la-socket.o
In file included from /build/build.LibreELEC-H3.arm-13.0-devel/toolchain/armv7ve-libreelec-linux-gnueabihf/sysroot/usr/include/arpa/inet.h:22,
                 from /build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/lib/socket.c:39:
/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/lib/socket.c: In function 'rpc_read_from_socket':
/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/lib/socket.c:586:49: error: cast increases required alignment of target type [-Werror=cast-align]
  586 |                         rpc->rm_xid[1] = ntohl(*(uint32_t *)&buf[0]);
      |                                                 ^
/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/lib/socket.c:587:61: error: cast increases required alignment of target type [-Werror=cast-align]
  587 |                         rpc->pdu = rpc_find_pdu(rpc, ntohl(*(uint32_t *)&buf[0]));
      |                                                             ^
/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/lib/socket.c:799:35: error: cast increases required alignment of target type [-Werror=cast-align]
  799 |                                 *((uint32_t *)rpc->inbuf) = htonl(rpc->rm_xid[1]);
      |                                   ^
/build/build.LibreELEC-H3.arm-13.0-devel/build/libnfs-6.0.2/lib/socket.c:861:71: error: cast increases required alignment of target type [-Werror=cast-align]
  861 |                                                 const READ3res *res = (READ3res *) rpc->pdu->zdr_decode_buf;
      |                                                                       ^
cc1: all warnings being treated as errors
make[3]: *** [Makefile:575: libnfs_la-socket.lo] Error 1

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