Hello,
I am using Ubuntu 18.04.5 LTS and TRB2_R_00.07.01.2.
My .config:
# CONFIG_PACKAGE_libmosquitto-nossl is not set
CONFIG_PACKAGE_libmosquitto-ssl=y
# CONFIG_PACKAGE_libmosquittopp is not set
# CONFIG_PACKAGE_mosquitto-client-nossl is not set
# CONFIG_PACKAGE_mosquitto-client-ssl is not set
# CONFIG_PACKAGE_mosquitto-nossl is not set
CONFIG_PACKAGE_mosquitto-ssl=m
# CONFIG_MOSQUITTO_LWS is not set
CONFIG_MOSQUITTO_CTRL=y
CONFIG_MOSQUITTO_DYNAMIC_SECURITY=y
# CONFIG_MOSQUITTO_PASSWD is not set
I can see the cJSON.h in the location you mentioned. Not sure why it is not found.
What I did before reading your answer was to create a cJSON folder under package/libs/ and add a cJSON Makefile that I got in
https://github.com/openwrt/packages/blob/master/libs/cjson/Makefile. So, I ran `make menuconfig` and enabled it in `Libraries`. I was able to build as you can see below, but it is probably not the proper way as the cJSON is in the location you mentioned.
~/development/TRB2_R_GPL/rutos-ath79-trb2-gpl$ make package/mqttgcp/compile
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/libs/glib2/Makefile' has a build dependency on 'libffi/host', which does not exist
WARNING: Makefile 'package/lang/python/python3/Makefile' has a build dependency on 'bzip2/host', which does not exist
WARNING: Makefile 'package/lang/python/python3/Makefile' has a build dependency on 'expat/host', which does not exist
WARNING: Makefile 'package/lang/python/python3/Makefile' has a build dependency on 'libffi/host', which does not exist
WARNING: Makefile 'package/network/utils/ulogd/Makefile' has a build dependency on 'libnetfilter-acct', which does not exist
make[1] package/mqttgcp/compile
make[2] -C package/libs/toolchain compile
make[2] -C package/libs/cjson compile
make[2] -C package/libs/libjson-c compile
make[2] -C package/system/ca-certificates compile
make[2] -C package/libs/nghttp2 compile
make[2] -C package/libs/openssl compile
make[2] -C package/network/utils/curl compile
make[2] -C package/network/services/mosquitto compile
make[2] -C package/network/services/mosquitto compile
make[2] -C feeds/custom/examples/mqttgcp compile
Regards, Flavio