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
build fails w/linux-4.4+ due to renamed linux/nvme.h include #52
Comments
|
O'joy, I'll have to look at this. |
|
Sorry that I have created a second issue for the problem but there should be a fix for the problem in the pull request #56 |
|
Hi everyone. I've been reading the project for a while and recently I had to install another distro. That's pushed me into kernel 4.4.0-45 and now I am facing this issue too. With the help from @JanLuca, I could compile the project on my machine but instead of adding the whole nvme.h file with structures and stuff, I realized that just including the file that comes with kernel headers suffices for it to compile so I wrote another approach to try to fix this issue. imho, doing like this we are always tied up to kernel headers and we don't need to keep our own copy of it updated. @r0m30, is this solution acceptable for the project? Can you take a look at it please? If you judge that it is acceptable, we can open a pull request and merge it to sedutil. Before leaving, I'd like to thank you and everyone on this project. Also JanLuca for making things clear for me to compile the project. Here is the link of the proposed solution: Hope to hear soon from you. |
|
@bcarmo-caio your solution alters the makefile, I use the Netbeans IDE for my linux dev and it treats the makefiles as it's own and will replace them as the project is updated so I can't use any method that relies on changing the makefiles |
|
So what is the solution here? Two solutions have been proposed and neither (nor any other) has been adopted for almost a year now. |
|
Fixed in v1.15 |
|
This is still a problem on CentOS 7 / Redhat. It appears the kernel change that moved nvme.h to nvme_ioctl.h was back ported to the 3.10.0 kernel so checking for kernel version 4.4 using macros breaks on these systems. |
|
Ahhh yes. The pitfalls of using versions as capability gates. It's always much better to test for the actual capability rather than infer it from a version. |
|
Pull request #174 resolves this issue by using autoconf to check for the nvme header instead of relying on kernel versions. |
The header linux/nvme.h was replaced by linux/nvme_ioctl.h in kernel versions greater than 4.4: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9d99a8dda154 The needed structs and opcodes are copied into a new header file from nvme.h. Author: Jan Luca Naumann <j.naumann@fu-berlin.de> Origin: Drive-Trust-Alliance#56 Bug: Drive-Trust-Alliance#52 Forwarded: Drive-Trust-Alliance#56 Applied-Upstream: Drive-Trust-Alliance#56 Last-Update: 2016-06-01
The header linux/nvme.h was replaced by linux/nvme_ioctl.h in kernel versions greater than 4.4: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9d99a8dda154 The needed structs and opcodes are copied into a new header file from nvme.h. Author: Jan Luca Naumann <j.naumann@fu-berlin.de> Origin: Drive-Trust-Alliance#56 Bug: Drive-Trust-Alliance#52 Forwarded: Drive-Trust-Alliance#56 Applied-Upstream: Drive-Trust-Alliance#56 Last-Update: 2016-06-01
starting with the linux-4.4 release, the linux/nvme.h header no longer exists. it's been renamed & stripped down to linux/nvme_ioctl.h. it seems like sedutil is using a bunch of constants that the kernel guys considered "not part of the ABI", so that'll need address too.
The text was updated successfully, but these errors were encountered: