[Xymon] cross compilation and endianness detection

Damien Martins damien at makelofine.org
Sun Jul 1 21:39:06 CEST 2018


Hi,

I'm trying to compile xymon client for several OpenWRT devices 
(www.openwrt.org).
Most targets are MIPS-based.
When trying to compile, I encounter the following error:
xymon-4.3.28$ make CC=mips-openwrt-linux-musl-gcc 
LD=mips-openwrt-linux-musl-ld
CC="mips-openwrt-linux-musl-gcc" CFLAGS="-g -O2 -Wall -Wno-unused 
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLINUX 
-I`pwd`/include -DCLIENTONLY=1" LDFLAGS="" OSDEF="-DLINUX" 
RPATHOPT="-Wl,--rpath," PCREINCDIR="" ZLIBINCDIR="" SSLFLAGS="" 
SSLINCDIR="" SSLLIBS="" NETLIBS="" LIBRTDEF="" 
XYMONTOPDIR="/var/lib/xymon" XYMONHOME="/var/lib/xymon" 
XYMONCLIENTHOME=/var/lib/xymon XYMONLOGDIR="" XYMONHOSTNAME="" 
XYMONHOSTIP="A.B.C.D" XYMONHOSTOS="" LOCALCLIENT="no" make -C lib client
make[1] : entering « /home/src/xymon-4.3.28/lib »
mips-openwrt-linux-musl-gcc -g -O2 -Wall -Wno-unused -D_REENTRANT 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLINUX 
-I/home/src/xymon-4.3.28/include -DCLIENTONLY=1 -I../include 
`./test-endianness` -c -o sha1.o sha1.c
/bin/sh: 1: ./test-endianness: Exec format error
sha1.c:38:2: error: #error "Endianness is UNDEFINED"

This part is far beyond my computers skills, so I'm requesting some help :)


More information about the Xymon mailing list