liquidaty / zsv

zsv+lib: tabular data swiss-army knife CLI + world's fastest (simd) CSV parser
MIT License
202 stars 12 forks source link

Fix SQLite3 include path for `compare` command #202

Closed iamazeem closed 1 day ago

iamazeem commented 1 day ago

Environment

Description

Makefile was not using the SQLite3 headers from the external libs directory.

Affected failing tests:

Steps to reproduce

Make sure the SQLite3 dev packages are not preinstalled on the system. For example, on Ubuntu, check if sqlite3.h is present e.g. whereis sqlite3.h. If it exists, uninstall it i.e. sudo apt remove -y libsqlite3-dev.

Run:

cd app/test
make test-compare
make test-compare-tolerance

Error:

compare.c:17:10: fatal error: sqlite3.h: No such file or directory
   17 | #include <sqlite3.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:442: ~/zsv/build/Linux/rel/gcc/bin/zsv_compare] Error 1
make[1]: Leaving directory '~/zsv/app'
make: *** [Makefile:438: ~/zsv/build/Linux/rel/gcc/bin/zsv_compare] Error 2

On the configured Ubuntu runner i.e. Ubuntu 20.04, the package libsqlite3-dev is preinstalled. That's why it was undetected so far.

Same was the case on my local machine. Verified by uninstalling the libsqlite3-dev previously installed via apt package.

Signed-off-by: Azeem Sajid azeem.sajid@gmail.com