← Back to team overview

modbus team mailing list archive

libmodbus on ARM

 

I'm trying to compile libmodbus-2.9.4 on an ARM system
(http://www.embeddedarm.com/products/board-detail.php?product=TS-7260),
but I'm getting an error:

# V=1 make -j1
make  all-recursive
make[1]: Entering directory `/root/libmodbus-2.9.4'
Making all in src
make[2]: Entering directory `/root/libmodbus-2.9.4/src'
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I..     -g -O2 -Wall -Werror -MT modbus-rtu.lo -MD -MP -MF
.deps/modbus-rtu.Tpo -c -o modbus-rtu.lo modbus-rtu.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Werror
-MT modbus-rtu.lo -MD -MP -MF .deps/modbus-rtu.Tpo -c modbus-rtu.c
-fPIC -DPIC -o .libs/modbus-rtu.o
modbus-rtu.c: In function 'modbus_rtu_set_serial_mode':
modbus-rtu.c:712: error: storage size of 'rs485conf' isn't known
modbus-rtu.c:713: error: invalid application of 'sizeof' to incomplete
type 'struct serial_rs485'
modbus-rtu.c:716: error: 'SER_RS485_ENABLED' undeclared (first use in
this function)
modbus-rtu.c:716: error: (Each undeclared identifier is reported only once
modbus-rtu.c:716: error: for each function it appears in.)
modbus-rtu.c:717: error: 'TIOCSRS485' undeclared (first use in this function)
cc1: warnings being treated as errors
modbus-rtu.c:712: warning: unused variable 'rs485conf'
make[2]: *** [modbus-rtu.lo] Error 1
make[2]: Leaving directory `/root/libmodbus-2.9.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/libmodbus-2.9.4'
make: *** [all] Error 2

I've not used C in a very long time, but this seems to be a simple
syntax problem.  (Perhaps a compatibility issue between different C
standards?)  I'll keep trying to figure it out myself, but I would
appreciate some help.  Thanks.

# gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)


Justin


Follow ups