Created attachment 549132 [details] Patch that remove udev and add uuid variables. nmve-cli decides to use uuid library by using LD: LIBUUID = $(shell $(LD) -o /dev/null -luuid >/dev/null 2>&1; echo $$?) nvme-cli cross-compilation will fail if libuuid is present on the host machine but util-linux is not on the target machine.
See https://bugs.chromium.org/p/chromium/issues/detail?id=891527 for emerge error: nvme-cli-1.6: >>> Compiling source in /build/fizz/tmp/portage/sys-apps/nvme-cli-1.6/work/nvme-cli-1.6 ... nvme-cli-1.6: make -j32 LIBUDEV=1 nvme-cli-1.6: NVME_VERSION = 1.6 nvme-cli-1.6: x86_64-cros-linux-gnu-clang -D_GNU_SOURCE -D__CHECK_ENDIAN__ -O2 -pipe -march=corei7 -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 -DLIBUUID -DNVME_VERSION='"1.6"' -c argconfig.c nvme-cli-1.6: x86_64-cros-linux-gnu-clang -D_GNU_SOURCE -D__CHECK_ENDIAN__ -O2 -pipe -march=corei7 -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 -DLIBUUID -DNVME_VERSION='"1.6"' -c suffix.c nvme-cli-1.6: x86_64-cros-linux-gnu-clang -D_GNU_SOURCE -D__CHECK_ENDIAN__ -O2 -pipe -march=corei7 -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 -DLIBUUID -DNVME_VERSION='"1.6"' -c parser.c nvme-cli-1.6: x86_64-cros-linux-gnu-clang -D_GNU_SOURCE -D__CHECK_ENDIAN__ -O2 -pipe -march=corei7 -g -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -std=gnu99 -DLIBUUID -DNVME_VERSION='"1.6"' -c nvme-print.c ... nvme-cli-1.6: In file included from nvme-print.c:6: nvme-cli-1.6: In file included from ./nvme-print.h:4: nvme-cli-1.6: [1m./nvme.h:27:10: [0m[0;1;31mfatal error: [0m[1m'uuid/uuid.h' file not found[0m nvme-cli-1.6: #include <uuid/uuid.h> nvme-cli-1.6: [0;1;32m ^~~~~~~~~~~~~ nvme-cli-1.6: [0mIn file included from lnvm-nvme.c:4: nvme-cli-1.6: [1m./nvme.h:27:10: [0m[0;1;31mfatal error: [0m[1m'uuid/uuid.h' file not found[0m nvme-cli-1.6: #include <uuid/uuid.h> nvme-cli-1.6: [0;1;32m ^~~~~~~~~~~~~ nvme-cli-1.6: [0m1 error generated. ... Makefile is checking against the host library, not the target environment. Add USE flag uuid, remove USE flag udev as nvme-cli does not depend on udev anymore. [http://lists.infradead.org/pipermail/linux-nvme/2016-December/007493.html]
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca10e85174d27707ad3fe879f664f43f405d43ab commit ca10e85174d27707ad3fe879f664f43f405d43ab Author: Gwendal Grignou <gwendal@chromium.org> AuthorDate: 2018-10-03 06:50:34 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-10-04 17:35:47 +0000 sys-apps/nvme-cli: Use uuid USE variable Remove udev variable, nvme-cli does not use LIBUDEV anymore. Add option to choose uuid based on USE variable. BUG=chromium:891527 TEST=build_package --board fizz nvme-cli compiles, without uuid code. Change-Id: I508d2776f58b7a1c96ed968dfa109acbb90e7b6d Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Zac Medico <zmedico@gentoo.org> Closes: https://bugs.gentoo.org/667634 Package-Manager: Portage-2.3.50, Repoman-2.3.10 sys-apps/nvme-cli/metadata.xml | 3 +++ sys-apps/nvme-cli/nvme-cli-1.6-r1.ebuild | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+)
Thanks!