Openwrt 19.07 build fails , unable to find #include<mysql.h>

I am getting this error although the following packages have already been selected

  • libmariadb
  • mariadb-server
  • mariadb-client
fatal error: mysql.h: No such file or directory      
#include <mysql.h>                                                                                     
compilation terminated.

Can some one please guide me on how to resolve this


sk@darth ~/tmp/openwrt $ find staging_dir/target-mips_24kc_musl/usr/include/ -name mysql.h
sk@darth ~/tmp/openwrt

So the header is located in $(STAGING_DIR)/usr/include/mysql. So your software's build system needs to somehow figure out this include path. If it can't the quick and dirty way to do it would probably be adding it to the CFLAGS in your OpenWrt package's Makefile:

TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/mysql

This is just an idea. If have no way of knowing what the Makefile/software you have is doing.