While porting lxd-2.18 to chromium os, I noticed that it fails to compile if sqlite is not listed in DEPENDs. Specifically the error I'm seeing is: # github.com/lxc/lxd/vendor/github.com/mattn/go-sqlite3 vendor/github.com/mattn/go-sqlite3/backup.go:12:10: fatal error: 'sqlite3.h' file not found #include <sqlite3.h> ^~~~~~~~~~~ 1 error generated. Making dev-db/sqlite a hard DEPEND instead of making it conditional on USE=test fixed this problem for me. Also since this is chromium os, I'm not sure how useful the emerge --info output would but I can post it if it would still be useful.
Thanks for this report. Seeing the "go-sqlite3" dependency, I was pretty much certain that you were right, so I tried installing LXD on a brand new sqlite-less system... and it worked. When I look at https://github.com/mattn/go-sqlite3 , I see that sqlite3 is bundled with the package and that system sqlite3 is enabled only when we define USE_LIBSQLITE3 Do you know if this is defined on your system and if it is, for what reasons?
Maybe it's related to https://github.com/lxc/lxd/blob/c654f2a3a74876f88bd76c22b2c0149f20f6fa2c/Makefile#L12 ? A test for "sqlite3.h" yielding a false positive on your system? But then again, if LXD prefers to link to the system sqlite if available, then maybe we should add it as a hard dependency...
I think you found it. The emerge was failing when I was trying to cross-compile lxd for a target device. Basically the situation I have is: /usr/include/sqlite3.h <- exists /build/${BOARD}/usr/include/sqlite3.h <- does not exist All our compiler invocations are wrapped to add "-sysroot /build/${BOARD}", which is why directly testing if /usr/include/sqlite3.h exists returns true but trying to include it from an actual source file fails. I guess the proper way to fix this is for lxd to try to include that header from a C file and only assume it exists if the C files compiles successfully.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6be94961308bcbc954135412868267b9216f78e commit d6be94961308bcbc954135412868267b9216f78e Author: Erik Mackdanz <stasibear@gentoo.org> AuthorDate: 2018-05-21 01:26:29 +0000 Commit: Erik Mackdanz <stasibear@gentoo.org> CommitDate: 2018-05-21 01:26:29 +0000 app-emulation/lxd: bump to 3.1 Closes: https://bugs.gentoo.org/652846 Closes: https://bugs.gentoo.org/639020 Package-Manager: Portage-2.3.38, Repoman-2.3.9 app-emulation/lxd/Manifest | 1 + .../lxd/files/ja-translation-newline.patch | 11 ++ app-emulation/lxd/lxd-3.1.ebuild | 180 +++++++++++++++++++++ 3 files changed, 192 insertions(+)