Some 32 bit ARM compilers do not handle alignment of packed structs correctly.

This can cause the server to crash with a bus alignment error, noted by a SIGBUS exception.


Program received signal SIGBUS, Bus error.
ncx_set_error (tkerr=0x58c9f, tkerr@entry=0x0, mod=mod@entry=0x35f98,
    linenum=7, linepos=3) at ncx.c:9575


If this happens then the C data structures cannot be packed.


You must use NO_YPACK=1 when cross-compiled the server code for ARM.



Example


# make NO_YPACK=1 DESTDIR=/home/lab/cross_compile/cross_build/release/NETCONF \
 INC_PREFIX=/opt/toolchains/crosstools-arm-gcc-9.2-linux-4.19-glibc-2.30-binutils-2.32/include \
 HOST=arm-buildroot-linux-gnueabi \
 CROSS_TARGET=/opt/toolchains/crosstools-arm-gcc-9.2-linux-4.19-glibc-2.30-binutils-2.32/usr/bin/arm-buildroot-linux-gnueabi- \
 YP_SYSROOT=/opt/toolchains/crosstools-arm-gcc-9.2-linux-4.19-glibc-2.30-binutils-2.32/arm-buildroot-linux-gnueabi/sysroot \
 USER_INC="-I${RELEASE_HOME}/openssl/include -I${RELEASE_HOME}/libxml2/include -I${RELEASE_HOME}/libxml2/include/libxml2 -I${RELEASE_HOME}/libxml2/include/libxml2/libxml -I${RELEASE_HOME}/zlib/include" \
 USER_LIB="-L${RELEASE_HOME}/openssl/lib -L${RELEASE_HOME}/libxml2/lib -L${RELEASE_HOME}/zlib/lib" \
 DEBUG=1 DEBUG2=1