Skip to content

Building from source - Schematic Editor does not link correctly with nanodbc without modifications

Description

When Kicad is built from sources on Devuan GNU/Linux 4 (like Debian 11 "Bullseye" but without systemd), the build process finishes without any problems but when the Schematic Editor is launched, it fails with error like this

undefined symbol: ZN7nanodbc7catalog11find_tablesERKNSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEES8_S8_S8

I found out that the problem is caused by not linking the the nanodb library into the executable - for some reason, instead of passing the directory as ~/kicad-7.0.5/thirdparty/nanodbc, it is passed as ~/kicad-7.0.5/thirdparty/nanodbc/SYSTEM. By making a symlink named SYSTEM in thirdparty/nanodbc, pointing to the same directory, the linking finishes correctly and the Schematic Editor runs without problems. I guess that iodbc-config may throw some bogus data but I was not able to track it.

Steps to reproduce

  1. Install all prerequisites required for Devuan 4 / Debian 11
  2. Install CMake 3.24.3 (because the distribution default is 3.18.4)
  3. Build Kicad 7.0.5 from source and install it
  4. Launch the Schematic Editor and receive error

KiCad Version

Application: KiCad Schematic Editor

Version: 7.0.5, release build

Libraries:
	wxWidgets 3.0.5
	FreeType 2.10.4
	HarfBuzz 2.7.4
	FontConfig 2.13.1
	libcurl/7.74.0 OpenSSL/1.1.1n zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0 librtmp/2.3

Platform: Devuan GNU/Linux 4 (chimaera), 64 bit, Little endian, wxGTK, , tty

Build Info:
	Date: Jun 29 2023 12:01:57
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.1
	Curl: 7.74.0
	Compiler: GCC 10.2.1 with C++ ABI 1014

Build settings:
	KICAD_SPICE=OFF