Kicad database on macOS

I am looking for any tips on installing kicad sqlite3 database on macos. I have a kicad database running just fine under win 10 and popos linux, so I am familiar with the moving parts of sqlite3, an odbc interface/configurator, sqlitestudio (db management), and the files needed to let kicad see the db. Those platforms have worked well for me for many kicad database projects.

As I sunset my win 10 machine, and gag at the thought of win 11, I am moving to macos for a daily driver machine. Mac has been less friendly under the hood than the shiny desktop portrays, but I have most code development and freecad working well, and I have kicad installed and running, but have yet to connect my kicad database.

To start I installed sqlitestudio and can open and browse my kicad database. So far so good.

This 2022 post KiCad database libraries on macOS ¡ cdwilson.dev uses homebrew to install. After reading this: Thoughts on macOS Package Managers I have been using macports instead of homebrew, as it seems safer. So I started with a sudo port install sqlite3 which put sqlite3 in /opt/local/bin. But then I found there was no port of sqliteodbc, and it was recommended to sudo port install unixODBC which put isql and odbcinst in /opt/local/bin, but I was unsure where to go at this point.

So giving in to homebrew for this, I did a brew install sqlite sqliteodbc. Part of the output indicated “sqlite is keg-only, which means it was not symlinked into /opt/homebrew, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.” Perhaps this is due to the macports-installed sqlite3. Problem? Dunno. Sheesh.

Then I also need an odbc driver manager to tweak settings and the recommendation is to get it from iODBC Downloads , but it looks like that development stopped in 2018 with macos Mohave on intel silicon. I am running the latest Tahoe, on arm silicon, so that probably is a bad idea (or perhaps rosetta runs it?). Pausing at this point until I have a better plan.

Anyway, I am hoping somebody has done a kicad database on a recent mac and has some pointers. Thx

If you have sqliteodbc and unixodbc installed and available, that should be all you need.

Does odbcinst -j return anything? It should list the paths to config files (odbcinst.ini file etc)

Then you just need to configure the driver via editing the config file, for example:

~ ❯❯❯ cat /opt/homebrew/etc/odbcinst.ini
[SQLite3]
Description = SQLite3
Driver = /opt/homebrew/Cellar/sqliteodbc/0.99991/lib/libsqlite3odbc.dylib
Setup = /opt/homebrew/Cellar/sqliteodbc/0.99991/lib/libsqlite3odbc.dylib
1 Like

It’s homebrew centred, but this procedure worked for me last time:

Follow this excellent guide, or the following summary.

  1. brew install sqlite sqliteodbc

  2. Install iODBC , the configuration GUI for ODBC connectivity. The ‘i’ stands for “independent”.

  3. Optional: install DB Browser.

  4. mkdir -p ~/Library/ODBC/

  5. Run “iODBC Administrator.app” (not the “64” one).

    • In the “ODBC Drivers” tab, click “Add a driver”, enter the following and click OK:

      • Description of the driver: SQLite3

      • Driver file name: /opt/homebrew/lib/libsqlite3odbc.dylib

      • Setup file name: /opt/homebrew/lib/libsqlite3odbc.dylib

      • Driver defined as: User

Jon and Heath: Thank you for the information. I have it running now. I was able to use my linux versions of the kicad_dbl files, just changing /Home to /Users/(name).

Got all my prefs adjusted and the only thing so far that does not seem to work is choosing Shift-mouse-wheel to pan left/right, which works on win and linux but not mac. This is in conjunction with Cmd/Ctrl-mouse-wheel for zoom, and unmodified mouse-wheel to pan up/down. But I can right-drag to pan so not a big deal.

Thanks for your help.

1 Like