pkoutoupis / rapiddisk

An Advanced Linux RAM Drive and Caching kernel modules. Dynamically allocate RAM as block devices. Use them as stand alone drives or even map them as caching nodes to slower local disk drives. Access those volumes locally or export them across an NVMe Target network. Manage it all from a web API.
http://www.rapiddisk.org
GNU General Public License v2.0
296 stars 49 forks source link

Current master 139 not compiling #146

Closed Augusto7743 closed 1 year ago

Augusto7743 commented 1 year ago

Hello. Only reporting ... Ubuntu 20.04.5 updated current date. Downloaded the master 139 of 12-27-2022.

when doing make

make -C module make[1]: Entering directory '/tmp/3/11/module' make -C /lib/modules/6.0.6-060006-generic/build M=/tmp/3/11/module make[2]: Entering directory '/usr/src/linux-headers-6.0.6-060006-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/11/module/rapiddisk.o CC [M] /tmp/3/11/module/rapiddisk-cache.o MODPOST /tmp/3/11/module/Module.symvers CC [M] /tmp/3/11/module/rapiddisk-cache.mod.o LD [M] /tmp/3/11/module/rapiddisk-cache.ko BTF [M] /tmp/3/11/module/rapiddisk-cache.ko Skipping BTF generation for /tmp/3/11/module/rapiddisk-cache.ko due to unavailability of vmlinux CC [M] /tmp/3/11/module/rapiddisk.mod.o LD [M] /tmp/3/11/module/rapiddisk.ko BTF [M] /tmp/3/11/module/rapiddisk.ko Skipping BTF generation for /tmp/3/11/module/rapiddisk.ko due to unavailability of vmlinux make[2]: Leaving directory '/usr/src/linux-headers-6.0.6-060006-generic' make[1]: Leaving directory '/tmp/3/11/module' make -C src make[1]: Entering directory '/tmp/3/11/src' Creating Makefile utils.d Creating Makefile sys.d Creating Makefile rdsk.d Creating Makefile rapiddiskd.d Creating Makefile nvmet.d Creating Makefile net.d Creating Makefile main.d Creating Makefile json.d cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c main.c -o main_ndebug.o cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c utils.c -o utils_ndebug.o utils.c:33:10: fatal error: pcre2.h: No such file or directory 33 | #include | ^~~~~ compilation terminated. make[1]: [Makefile:141: utils_ndebug.o] Error 1 make[1]: Leaving directory '/tmp/3/11/src' make: [Makefile:37: src] Error 2

In same OS the previous master is compiled correctly. Have an nice week.

pkoutoupis commented 1 year ago

@Augusto7743 Since the last merge (which will soon be 9.0.0, thanks to the hard work from @matteotenca), the minimum requirements have changed. This information is being updated in PR https://github.com/pkoutoupis/rapiddisk/pull/145. Anyway, you will now need the following library and development packages to build the user space utilities:

libjansson, libpcre2-dev, libdevmapper and libmicrohttpd

Augusto7743 commented 1 year ago

Thanks for replying sharing the new requirements. Thus I had installed the new requirements.

In Ubuntu 20.04.5 are installed libjansson-dev 2.12-1build1 libpcre2-dev 10.39-3ubuntu0.1~20.04.sav0 libdevmapper-dev 2:1.02.167-1ubuntu1 libmicrohttpd-dev 0.9.66-1 libselinux1-dev 3.0-1build2

continue not being possible run make

the error message

make -C module make[1]: Entering directory '/tmp/3/2/module' make -C /lib/modules/6.0.6-060006-generic/build M=/tmp/3/2/module make[2]: Entering directory '/usr/src/linux-headers-6.0.6-060006-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/2/module/rapiddisk.o CC [M] /tmp/3/2/module/rapiddisk-cache.o MODPOST /tmp/3/2/module/Module.symvers CC [M] /tmp/3/2/module/rapiddisk-cache.mod.o LD [M] /tmp/3/2/module/rapiddisk-cache.ko BTF [M] /tmp/3/2/module/rapiddisk-cache.ko Skipping BTF generation for /tmp/3/2/module/rapiddisk-cache.ko due to unavailability of vmlinux CC [M] /tmp/3/2/module/rapiddisk.mod.o LD [M] /tmp/3/2/module/rapiddisk.ko BTF [M] /tmp/3/2/module/rapiddisk.ko Skipping BTF generation for /tmp/3/2/module/rapiddisk.ko due to unavailability of vmlinux make[2]: Leaving directory '/usr/src/linux-headers-6.0.6-060006-generic' make[1]: Leaving directory '/tmp/3/2/module' make -C src make[1]: Entering directory '/tmp/3/2/src' Creating Makefile utils.d Creating Makefile sys.d Creating Makefile rdsk.d Creating Makefile rapiddiskd.d Creating Makefile nvmet.d Creating Makefile net.d Creating Makefile main.d Creating Makefile json.d cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c main.c -o main_ndebug.o cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c utils.c -o utils_ndebug.o cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c json.c -o json_ndebug.o cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c rdsk.c -o rdsk_ndebug.o In file included from /usr/include/string.h:495, from common.h:36, from rdsk.h:36, from rdsk.c:30: In function ‘strncpy’, inlined from ‘read_info’ at rdsk.c:148:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘strncpy_chk’ specified bound depends on the length of the source argument [-Wstringop-overflow=] 106 | return _builtinstrncpy_chk (dest, src, len, bos (dest)); | ^~~~~~~~~~~~~~ rdsk.c: In function ‘read_info’: rdsk.c:147:8: note: length computed here 147 | len = strlen(buf); | ^~~ cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c nvmet.c -o nvmet_ndebug.o cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c sys.c -o sys_ndebug.o cc -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -o rapiddisk main_ndebug.o utils_ndebug.o json_ndebug.o rdsk_ndebug.o nvmet_ndebug.o sys_ndebug.o -ljansson -ldevmapper -lpcre2-8 In function ‘strncpy’, inlined from ‘read_info’ at rdsk.c:148:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘builtin_strncpy_chk’ specified bound depends on the length of the source argument [-Wstringop-overflow=] 106 | return builtin_strncpy_chk (dest, src, len, bos (dest)); | ^ rdsk.c: In function ‘read_info’: rdsk.c:147:8: note: length computed here 147 | len = strlen(buf); | ^ cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c rapiddiskd.c -o rapiddiskd_ndebug.o cc -Wdate-time -DSERVER -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c utils.c -o utils-server_ndebug.o cc -Wdate-time -DSERVER -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c json.c -o json-server_ndebug.o cc -Wdate-time -DSERVER -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c nvmet.c -o nvmet-server_ndebug.o cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c net.c -o net_ndebug.o cc -Wdate-time -DSERVER -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c rdsk.c -o rdsk-server_ndebug.o In file included from /usr/include/string.h:495, from common.h:36, from rdsk.h:36, from rdsk.c:30: In function ‘strncpy’, inlined from ‘read_info’ at rdsk.c:148:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘strncpy_chk’ specified bound depends on the length of the source argument [-Wstringop-overflow=] 106 | return _builtinstrncpy_chk (dest, src, len, bos (dest)); | ^~~~~~~~~~~~~~ rdsk.c: In function ‘read_info’: rdsk.c:147:8: note: length computed here 147 | len = strlen(buf); | ^~~ cc -Wdate-time -DSERVER -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c sys.c -o sys-server_ndebug.o cc -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -o rapiddiskd rapiddiskd_ndebug.o utils-server_ndebug.o json-server_ndebug.o nvmet-server_ndebug.o net_ndebug.o rdsk-server_ndebug.o sys-server_ndebug.o -ljansson -ldevmapper -lpcre2-8 -lmicrohttpd In function ‘strncpy’, inlined from ‘read_info’ at rdsk.c:148:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘builtin_strncpy_chk’ specified bound depends on the length of the source argument [-Wstringop-overflow=] 106 | return builtin_strncpy_chk (dest, src, len, bos (dest)); | ^ rdsk.c: In function ‘read_info’: rdsk.c:147:8: note: length computed here 147 | len = strlen(buf); | ^ make[1]: Leaving directory '/tmp/3/2/src' make -C test make[1]: Entering directory '/tmp/3/2/test' cc rxflush.c -o rxflush cc rxio.c -o rxio cc rxioctl.c -o rxioctl cc rxro.c -o rxro make[1]: Leaving directory '/tmp/3/2/test'

The lines below are in log above. Here I have added only for reference because in terminal are lines with changed colors about errors.

Creating Makefile json.d cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c main.c -o main_ndebug.o cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c utils.c -o utils_ndebug.o cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c json.c -o json_ndebug.o cc -Wdate-time -O2 -Wno-unused-result -flto=auto -ffat-lto-objects -fstack-protector-strong -c rdsk.c -o rdsk_ndebug.o In file included from /usr/include/string.h:495, from common.h:36, from rdsk.h:36, from rdsk.c:30: In function ‘strncpy’, inlined from ‘read_info’ at rdsk.c:148:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘strncpy_chk’ specified bound depends on the length of the source argument [-Wstringop-overflow=] 106 | return _builtinstrncpy_chk (dest, src, len, bos (__dest)); | ^~~~~~~~~~~~~~ rdsk.c: In function ‘read_info’: rdsk.c:147:8: note: length computed here 147 | len = strlen(buf); | ^~~

In file included from /usr/include/string.h:495, from common.h:36, from rdsk.h:36, from rdsk.c:30: In function ‘strncpy’, inlined from ‘read_info’ at rdsk.c:148:2: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘strncpy_chk’ specified bound depends on the length of the source argument [-Wstringop-overflow=] 106 | return _builtinstrncpy_chk (dest, src, len, bos (__dest)); | ^~~~~~~~~~~~~~ rdsk.c: In function ‘read_info’: rdsk.c:147:8: note: length computed here 147 | len = strlen(buf); | ^~~

pkoutoupis commented 1 year ago

Those aren't errors. Check your source directory. The binary files are built and there. The messages you are seeing are gcc suggestions printed because of the build flags used.

Augusto7743 commented 1 year ago

Thanks very much for saying it. In moment not tested your software in kernel 6.1 or 6.1.1. My kernel sources are having build fails. I need wait for an solution. Have an nice week.

pkoutoupis commented 1 year ago

@Augusto7743 Since it is a non-issue and the build actually completes and the messages are just gcc suggestions, can we close this issue? Or do you believe that it needs to be kept open for another but related reason? Thank you!

pkoutoupis commented 1 year ago

I added a note in the project Wiki: https://github.com/pkoutoupis/rapiddisk/wiki/Frequently-Asked-Questions-(FAQ)#why-am-i-seeing-warning-messages-saying-note-length-computed-here

Augusto7743 commented 1 year ago

Good action done. Today was released kernel 6.1.4 in my source kernel update https://launchpad.net/~tuxinvader/+archive/ubuntu/lts-mainline

Rapiddisk last master is working correctly. I will test with new kernel ... I will try install in another Ubuntu versions too and report the result.

Augusto7743 commented 1 year ago

Installed and tested in Ubuntu 18.04.5 32 bits working correctly too ...

Augusto7743 commented 1 year ago

Tested current master in Kernel 6.1.6. Working correctly. Have an nice week for you and the users.

pkoutoupis commented 1 year ago

@Augusto7743 I will close this issue since the original problem reported ended up being a non-issue. Thank you for testing all distros/kernels. It is very much appreciated. Feel free to continue reporting your testing in this ticket (even after it is closed). :-)

Augusto7743 commented 1 year ago

Thanks for releasing 9.0. Tested version 9.0 in Kernel 6.1.6 working correctly. When possible will be installed kernel 6.2 for tests.

Have an nice week and good luck in your life and for users too.

mhtvsSFrpHdE commented 1 year ago

In case fedora users:
A Beginner's Installation Setup Guide
Installation steps for a dkms install.
Load dependencies (Fedora 35):
sudo dnf install libmicrohttpd libmicrohttpd-devel jansson-devel kernel-headers kernel-devel dkms

Then
sudo dnf install pcre2-devel device-mapper-devel

pkoutoupis commented 1 year ago

@mhtvsSFrpHdE Thank you. I updated the Wiki: https://github.com/pkoutoupis/rapiddisk/wiki/A-Beginner's-Installation---Setup-Guide

Augusto7743 commented 1 year ago

Rapiddisk 9.0 installed on kernel 6.2.1. working correctly. Amazing software ! An nice week for all users.