Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux/nvme.h has been renamed in linux 4.4 #37

Closed
floppym opened this issue Jan 11, 2016 · 5 comments
Closed

linux/nvme.h has been renamed in linux 4.4 #37

floppym opened this issue Jan 11, 2016 · 5 comments

Comments

@floppym
Copy link
Contributor

@floppym floppym commented Jan 11, 2016

When building with linux 4.4 headers, one will hit this:

gcc -O2 -g -Werror -Wall -Wsign-compare -Wstrict-aliasing -std=gnu11 -fshort-wchar -fPIC -flto -fvisibility=hidden -D_GNU_SOURCE -I/home/floppym/src/efivar/src/include/efivar/  -Wmaybe-uninitialized   -c -o linux.o linux.c
linux.c:25:24: fatal error: linux/nvme.h: No such file or directory
compilation terminated.

See kernel commit 9d99a8dda154f38307d43d9c9aa504bd3703d596.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9d99a8dda154f38307d43d9c9aa504bd3703d596

@woutershep

This comment has been minimized.

Copy link

@woutershep woutershep commented Jan 14, 2016

I don't think that error is related to the listed commit but merely that you seem to be missing the linux headers. Atleast my linux headers of 4.4 seems to include a linux/nvme.h when doing make headers_install

However that linux/nvme.h that i have doesn't define all the needed things anymore since that mentioned commit. I think the error that you meant to paste was:

linux.c: In function 'eb_nvme_ns_id':
linux.c:48:27: error: 'NVME_IOCTL_ID' undeclared (first use in this function)
  uint64_t ret = ioctl(fd, NVME_IOCTL_ID, NULL);
                           ^
linux.c:48:27: note: each undeclared identifier is reported only once for each function it appears in

Instead that one is in the new uapi/linux/nvme_ioctl.h which is not installed through make headers_install.

@floppym

This comment has been minimized.

Copy link
Contributor Author

@floppym floppym commented Jan 14, 2016

Gentoo's linux-headers-4.4 packaging includes several patches. One of them changes headers_install to include nvme_ioctl.h instead of nvme.h. This patch is pending review on LKML.

https://lkml.org/lkml/2016/1/10/332

I guess we will have to see how this turns out in linux-4.5.

@floppym

This comment has been minimized.

Copy link
Contributor Author

@floppym floppym commented Jan 23, 2016

@floppym

This comment has been minimized.

Copy link
Contributor Author

@floppym floppym commented Jan 23, 2016

I'm applying this patch downstream; if you find the solution acceptable, feel free to merge it.

https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-libs/efivar/files/0.21-nvme_ioctl.h.patch

@vathpela

This comment has been minimized.

Copy link
Contributor

@vathpela vathpela commented Feb 15, 2016

Thanks, I've pulled this in to master.

@vathpela vathpela closed this Feb 15, 2016
joachifm referenced this issue in NixOS/nixpkgs May 15, 2016
I don't know why it matters here; the error was:
linux.c:25:24: fatal error: linux/nvme.h: No such file or directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.