In ChromiumOS, building f2fs-tools-1.16.0 results in the following errors: ld.lld: error: undefined reference due to --no-allow-shlib-undefined: sparse_file_import >>> referenced by ../lib/.libs/libf2fs.so ld.lld: error: undefined reference due to --no-allow-shlib-undefined: sparse_file_len >>> referenced by ../lib/.libs/libf2fs.so ... f2fs-tools' src_configure() detects the presence of libsparse[1] and assumes that f2fs-tools should be built using it, if the libsparse header exists. On ChromeOS, this header is pulled in via brillo-base/libsparse [2] so f2fs-tools fails to link against the library since it is missing -lsparse. Since libsparse is not managed as a gentoo package, would it make sense to disable the dependency completely via the following patch? diff --git a/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild b/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild index 27994fba8..c7051bbf4 100644 --- a/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild +++ b/sys-fs/f2fs-tools/f2fs-tools-1.16.0-r1.ebuild @@ -39,6 +39,7 @@ src_prepare() { } src_configure() { + export ac_cv_header_sparse_sparse_h=no local myconf=( # This is required to install to /sbin, bug #481110 --bindir="${EPREFIX}"/sbin [1] https://packages.debian.org/unstable/android-libsparse [2] https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/chromiumos-overlay/brillo-base/libsparse/