compile mosquitto1.4.1, "/mosquitto_internal.h:40:20: fatal error: ares.h: No such file or directory"

Asked by leo

Hi,

i want to update the mosquitto broker from 1.4 to 1.4.1, but got a fatal error. it is strange to me, the compile should be ok...
no clues found from google, so could anyone help me here? thanks.

======
.../mosquitto-1.4.1 $ make
set -e; for d in lib client src; do make -C ${d}; done
make[1]: Entering directory '/home/pi/projects/leoMatthias/software/Mosquitto_MQTT/mosquitto-1.4.1/lib'
cc -Wall -ggdb -O2 -I. -I.. -I../lib -fPIC -DWITH_TLS -DWITH_TLS_PSK -DWITH_THREADING -DWITH_SOCKS -DWITH_SRV -c mosquitto.c -o mosquitto.o
In file included from mosquitto.c:33:0:
./mosquitto_internal.h:40:20: fatal error: ares.h: No such file or directory
compilation terminated.
Makefile:51: recipe for target 'mosquitto.o' failed
make[1]: *** [mosquitto.o] Error 1
make[1]: Leaving directory '/home/pi/projects/leoMatthias/software/Mosquitto_MQTT/mosquitto-1.4.1/lib'
Makefile:21: recipe for target 'mosquitto' failed
make: *** [mosquitto] Error 2

Question information

Language:
English Edit question
Status:
Solved
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Solved by:
Roger Light
Solved:
Last query:
Last reply:
Revision history for this message
leo (chleoxu99) said :
#1

steps i used:
wget http://mosquitto.org/files/source/mosquitto-1.4.1.tar.gz
tar -zxvf mosquitto-1.4.1.tar.gz
cd mosquitto-1.4.1
sudo nano config.mk:
    WITH_WEBSOCKETS:=yes
make
then, above fatal error.

Revision history for this message
Best Roger Light (roger.light) said :
#2

There are details on dependencies in compiling.txt. c-ares is a dependency, but can be disabled by setting WITH_SRV=no.

Revision history for this message
leo (chleoxu99) said :
#3

Thanks Roger Light, that solved my question.

Revision history for this message
Ken (kk543210) said :
#4

I meet the same question, but c-ares has been installed in Linux( c-ares version is 1.7)

what version does c-ares need ?

Revision history for this message
Fireto (fireto) said :
#5

Hi Ken,
/usr/include/ares.h is part of libc-ares-dev package.
Have you installed that too?