Installing Mariadb error

Hey folks,

I am trying to build ocaml-caqti to run the examples. When I run dune build I get an error for mariadb.
When I run opam install mariadb i get the following output:

~/git/ocaml-caqti master
❯ opam install mariadb
The following actions will be performed:
  βˆ— install mariadb 1.1.4

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
⬇ retrieved mariadb.1.1.4  (cached)
[ERROR] The compilation of mariadb.1.1.4 failed at "./configure

#=== ERROR while compiling mariadb.1.1.4 ======================================#
# context     2.1.2 | macos/arm64 | ocaml-base-compiler.4.12.1 |
# path        ~/.opam/4.12.1/.opam-switch/build/mariadb.1.1.4
# command     ~/.opam/opam-init/hooks/ build ./configure --prefix=/Users/zish/.opam/4.12.1
# exit-code   1
# env-file    ~/.opam/log/mariadb-55095-0e674d.env
# output-file ~/.opam/log/mariadb-55095-0e674d.out
### output ###
# Could not detect a MariaDB client library

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
β”Œβ”€ The following actions failed
β”‚ Ξ» build mariadb 1.1.4
╢─ No changes have been performed

~/git/ocaml-caqti master                                                ✘ 31 10s
❯ which mariadb

 ~/git/ocaml-caqti ξ‚Ό master ξ‚° 

I have run opam update and opam upgrade. I have mariadb installed via brew.

Any suggestions on resolving this error would be greatly appreciated. Thank you.

Never used any of that but:

Are you sure you have that ?

> brew search mariadb
==> Formulae
mariadb                                mariadb@10.1                           mariadb@10.4
mariadb-connector-c                    mariadb@10.2                           mariadb@10.5
mariadb-connector-odbc                 mariadb@10.3                           qt-mariadb

Perhaps mariadb-connector-c ?

Thanks for the prompt response!

❯ brew search mariadb
==> Formulae
mariadb βœ”                         mariadb@10.1                      mariadb@10.4
mariadb-connector-c βœ”             mariadb@10.2                      mariadb@10.5
mariadb-connector-odbc            mariadb@10.3                      qt-mariadb

==> Casks

 ~/git/ocaml-caqti ξ‚Ό master ξ‚° 

Looks like i have the mariadb and mariadb-connector-c. I have unlinked them and relinked them as well. seems tested for 4.12.0 and not 4.12.1. Dont know if that matters.

(lang dune 1.2)

(context (opam (switch 4.12.0)))
(context (opam (switch 4.09.0)))
(context (opam (switch 4.08.1)))

; Earlier OCaml switches will fail to build caqti-driver-postgresql due to
; the version constraint on postgresql >=5.0.0; other packages should work
; down to 4.04.
(context (opam (switch 4.06.1)))
(context (opam (switch 4.05.0)))
(context (opam (switch 4.04.2)))

I don’t know how mariadb is looked up. Maybe try to issue:

export LIBRARY_PATH=/usr/local/lib:
export C_INCLUDE_PATH=/usr/local/include:

before opam install mariadb ?