rapiddisk
rapiddisk copied to clipboard
warning: the compiler differs from the one used to build the kernel
Trying compile rapiddisk-8.2.0. When doing make not is possible complete the compilation. Ubuntu 20.04.5 with kernel updated to 5.19.12 Any way to change the makefile ?
make -C src
make[1]: Entering directory '/tmp/3/rapiddisk/src'
cc -c json.c -o json.o
cc -c rdsk.c -o rdsk.o
cc -c nvmet.c -o nvmet.o
cc -c sys.c -o sys.o
cc main.c -o rapiddisk json.o nvmet.o rdsk.o sys.o -ljansson
cc -c json.c -DSERVER -o json-server.o
cc -c net.c -o net.o
cc -c sys.c -DSERVER -o sys-server.o
cc daemon.c -o rapiddiskd json-server.o net.o sys-server.o -lpthread -ljansson -lmicrohttpd
Make has completed.
make[1]: Leaving directory '/tmp/3/rapiddisk/src'
make -C conf
make[1]: Entering directory '/tmp/3/rapiddisk/conf'
Nothing to do.
make[1]: Leaving directory '/tmp/3/rapiddisk/conf'
make -C doc
make[1]: Entering directory '/tmp/3/rapiddisk/doc'
Nothing to do.
make[1]: Leaving directory '/tmp/3/rapiddisk/doc'
make -C module
make[1]: Entering directory '/tmp/3/rapiddisk/module'
make -C /lib/modules/5.19.12-051912-generic/build M=/tmp/3/rapiddisk/module
make[2]: Entering directory '/usr/src/linux-headers-5.19.12-051912-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
You are using: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
CC [M] /tmp/3/rapiddisk/module/rapiddisk.o
/tmp/3/rapiddisk/module/rapiddisk.c: In function ‘rdsk_ioctl’:
/tmp/3/rapiddisk/module/rapiddisk.c:663:24: error: invalid operands to binary <= (have ‘atomic_t’ {aka ‘struct
Looks like I will need to add support for this kernel. I should have something soon.
All good with you ? Thanks for using your time reading and replying. I will try compile in another installed OS and after installing in 5.19.12. In few days will be released the kernel 6.00. Have any way to remove or change any line in makefile to avoid checking kernel or gcc version ? That detail is important ?
Not way ... compiled in another OS and trying in 5.19.12 not work.
It needs an update in the code for the kernel. I am sorry. I promise I will push new code soon. Thank you.
Where are you getting the 5.19 kernel? I installed 20.04.5 (mentioned in your description) server and it still uses 5.4. Are you using a specific repo?
Also, what version of rapiddisk are you running, because the latest supports 5.19 and is part of the rapiddisk master branch? It was merged in August: https://github.com/pkoutoupis/rapiddisk/commit/9d243d9df64c4268f18eb445a11884a6df40254d
Hello.
Ubuntu 20.04.5 use kernel 5.15. https://lubuntu.me/blog/
Rapiddisk latest 8.2.0 Starting OS using alternate kernel 5.15 is possible make and sudo make install for Rapiddisk.
Kernel update from https://launchpad.net/~tuxinvader/+archive/ubuntu/lts-mainline?field.series_filter=focal
Today was released the kernel 6.00.
I can confirm that the compiler is the same version, I think the architecture prefix to the binary name is a quirk of the launchpad build system? It was just a warning anyway.
@pkoutoupis I can also confirm that the master branch is able to build the kernel module successfully with the 5.19.12.
make
make -C src
make[1]: Entering directory '/home/mark/Downloads/check/rapiddisk/src'
Make has completed.
make[1]: Leaving directory '/home/mark/Downloads/check/rapiddisk/src'
make -C conf
make[1]: Entering directory '/home/mark/Downloads/check/rapiddisk/conf'
Nothing to do.
make[1]: Leaving directory '/home/mark/Downloads/check/rapiddisk/conf'
make -C doc
make[1]: Entering directory '/home/mark/Downloads/check/rapiddisk/doc'
Nothing to do.
make[1]: Leaving directory '/home/mark/Downloads/check/rapiddisk/doc'
make -C module
make[1]: Entering directory '/home/mark/Downloads/check/rapiddisk/module'
make -C /lib/modules/5.19.12-051912-generic/build M=/home/mark/Downloads/check/rapiddisk/module
make[2]: Entering directory '/usr/src/linux-headers-5.19.12-051912-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
You are using: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
CC [M] /home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.o
MODPOST /home/mark/Downloads/check/rapiddisk/module/Module.symvers
CC [M] /home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.mod.o
LD [M] /home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.ko
BTF [M] /home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.ko
Skipping BTF generation for /home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.ko due to unavailability of vmlinux
CC [M] /home/mark/Downloads/check/rapiddisk/module/rapiddisk.mod.o
LD [M] /home/mark/Downloads/check/rapiddisk/module/rapiddisk.ko
BTF [M] /home/mark/Downloads/check/rapiddisk/module/rapiddisk.ko
Skipping BTF generation for /home/mark/Downloads/check/rapiddisk/module/rapiddisk.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/linux-headers-5.19.12-051912-generic'
make[1]: Leaving directory '/home/mark/Downloads/check/rapiddisk/module'
make -C test
make[1]: Entering directory '/home/mark/Downloads/check/rapiddisk/test'
cc rxflush.c -o rxflush
cc rxio.c -o rxio
cc rxioctl.c -o rxioctl
cc rxro.c -o rxro
Make has completed.
make[1]: Leaving directory '/home/mark/Downloads/check/rapiddisk/test'
@Augusto7743 - you'll need to build rapiddisk by cloning the git repo, the 8.2.0 release didn't have support for 5.19 kernels.
Also it appears that 6.0 has some breaking changes:
make
make -C src
make[1]: Entering directory '/home/mark/Downloads/check/rapiddisk/src'
cc -c json.c -o json.o
cc -c rdsk.c -o rdsk.o
cc -c nvmet.c -o nvmet.o
cc -c sys.c -o sys.o
cc main.c -o rapiddisk json.o nvmet.o rdsk.o sys.o -ljansson
cc -c json.c -DSERVER -o json-server.o
cc -c net.c -o net.o
cc -c sys.c -DSERVER -o sys-server.o
cc daemon.c -o rapiddiskd json-server.o net.o sys-server.o -lpthread -ljansson -lmicrohttpd
Make has completed.
make[1]: Leaving directory '/home/mark/Downloads/check/rapiddisk/src'
make -C conf
make[1]: Entering directory '/home/mark/Downloads/check/rapiddisk/conf'
Nothing to do.
make[1]: Leaving directory '/home/mark/Downloads/check/rapiddisk/conf'
make -C doc
make[1]: Entering directory '/home/mark/Downloads/check/rapiddisk/doc'
Nothing to do.
make[1]: Leaving directory '/home/mark/Downloads/check/rapiddisk/doc'
make -C module
make[1]: Entering directory '/home/mark/Downloads/check/rapiddisk/module'
make -C /lib/modules/6.0-060000-generic/build M=/home/mark/Downloads/check/rapiddisk/module
make[2]: Entering directory '/usr/src/linux-headers-6.0-060000-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
You are using: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
CC [M] /home/mark/Downloads/check/rapiddisk/module/rapiddisk.o
CC [M] /home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.o
/home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.c: In function ‘dm_io_async_bvec’:
/home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.c:178:7: error: ‘struct dm_io_request’ has no member named ‘bi_op’; did you mean ‘bi_opf’?
178 | iorq.bi_op = rw;
| ^~~~~
| bi_opf
/home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.c:179:6: error: ‘struct dm_io_request’ has no member named ‘bi_op_flags’
179 | iorq.bi_op_flags = 0;
| ^
make[3]: *** [scripts/Makefile.build:249: /home/mark/Downloads/check/rapiddisk/module/rapiddisk-cache.o] Error 1
make[2]: *** [Makefile:1858: /home/mark/Downloads/check/rapiddisk/module] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.0-060000-generic'
make[1]: *** [Makefile:37: all] Error 2
make[1]: Leaving directory '/home/mark/Downloads/check/rapiddisk/module'
Cheers
@TuxInvader Thank you for confirming! I will add support for 6.0 in the next couple of days.
If you need an immediate [but untested] patch for 6.0, here:
diff --git a/module/rapiddisk-cache.c b/module/rapiddisk-cache.c
index 351af22..e04f459 100644
--- a/module/rapiddisk-cache.c
+++ b/module/rapiddisk-cache.c
@@ -175,8 +175,15 @@ int dm_io_async_bvec(unsigned int num_regions, struct dm_io_region *where,
struct dm_io_request iorq;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0)
+ if (rw == WRITE)
+ iorq.bi_opf = REQ_OP_WRITE;
+ else
+ iorq.bi_opf = REQ_OP_READ;
+#else
iorq.bi_op = rw;
iorq.bi_op_flags = 0;
+#endif
#else
iorq.bi_rw = rw;
#endif
In moment creating an custom ISO integrating 5.19 and 6.00 for testing. I will test using the master build.
Please note that I have not pushed or merged the 6.0 patch yet. It is something you will need to manually apply until I do, if you wish to test it yourself.
Rapiddisk compile in 5.19.12. Not is possible install nvidia driver 470 both binary and metapackage in 6.00 too.
Only for test and report any issues with current master. How you have replied above need apply the patch. I had tried some git command and even adding manually in rapiddisk-cache.c the lines below after of line #if LINUX_VERSION_CODE >= KERNEL_VERSION related with kernel 4 not is possible compile
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0)
-
if (rw == WRITE) -
iorq.bi_opf = REQ_OP_WRITE; -
else -
iorq.bi_opf = REQ_OP_READ;
+#else iorq.bi_op = rw; iorq.bi_op_flags = 0; +#endif #else iorq.bi_rw = rw; #endif
I only try kernel upgrade because of btrfs improvements and fixes for using btrfs settings for testing if not happen problem with writeback partial written and also for contributing in rapiddisk project reporting any issue and improvements.
@Augusto7743 No worries. I have pushed a branch: feature/add_6.0_support (https://github.com/pkoutoupis/rapiddisk/tree/feature/add_6.0_support)
If you do a git pull on master and then do a git checkout feature/add_6.0_support (and verify with git branch). You should have this patch to test with on 6.0.
OK. I merged this into master: https://github.com/pkoutoupis/rapiddisk/pull/134. Closing ticket. Thank you for everyone's assistance in this.
Thanks very much. Have an nice week.
You too.
Your amazing software in Kernel 6.00 works very well. I will post an topic about my test in doing an correct wb flush in OS shutdown. I wish for you and users an good week.
@Augusto7743 that is great to hear (all of it) and you too.
Your amazing software work correctly in Kernel 6.00. I need finish more some tests to post an report about using your amazing software in an BTRFS partition using some custom commands in creation and in fstab mount. The added feature "Usage (KB):" have helped very much =)
Have an good week.
You too!
Is possible implement an feature in "rapiddisk -l" showing the total written done used in each writeback cache ? I will update to kernel 6.1 and continuing reporting as your software work. Have an nice week for you and all users.
You can obtain that data from the stats output for the writeback cache device: rapiddisk -s rc-wb_sdb
It is the 4th field: https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/writecache.html.
EDIT: If you use the -j option, it will be the field labeled num_wb_blocks.