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

Make failing to compile kvdo & uds modules on Debian #49

Open
albertdipp opened this issue Mar 14, 2022 · 8 comments
Open

Make failing to compile kvdo & uds modules on Debian #49

albertdipp opened this issue Mar 14, 2022 · 8 comments

Comments

@albertdipp
Copy link

Hi There,

I am trying to compile the kvdo and uds modules on Debian 11.2 running kernel "5.10.0-12-amd64"

I haven't updated in a wee while and now it seems that I can't compile the modules anymore under the latest Debian version.

Steps to reproduce:

  1. Fully up to date - fresh Debian install
  2. Install all pre-reqs like linux-headers, make etc...
  3. After a git clone, under the kvdo directory run "make -C /usr/src/linux-headers-uname -r M=pwd" I get the following error:
    CC [M] /root/modules/vdo/kvdo/vdo/allocatingVIO.o
    CC [M] /root/modules/vdo/kvdo/vdo/allocationSelector.o
    CC [M] /root/modules/vdo/kvdo/vdo/batchProcessor.o
    CC [M] /root/modules/vdo/kvdo/vdo/bio.o
    /root/modules/vdo/kvdo/vdo/bio.c: In function ‘vdo_bio_copy_data_in’:
    /root/modules/vdo/kvdo/vdo/bio.c:45:3: error: implicit declaration of function ‘memcpy_from_bvec’; did you mean ‘memcpy_fromio’? [-Werror=implicit-function-declaration]
    45 | memcpy_from_bvec(data_ptr, &biovec);
    | ^~~~~~~~~~~~~~~~
    | memcpy_fromio
    /root/modules/vdo/kvdo/vdo/bio.c: In function ‘vdo_bio_copy_data_out’:
    /root/modules/vdo/kvdo/vdo/bio.c:57:3: error: implicit declaration of function ‘memcpy_to_bvec’; did you mean ‘memcpy_toio’? [-Werror=implicit-function-declaration]
    57 | memcpy_to_bvec(&biovec, data_ptr);
    | ^~~~~~~~~~~~~~
    | memcpy_toio
    cc1: all warnings being treated as errors
    make[3]: *** [/usr/src/linux-headers-5.10.0-12-common/scripts/Makefile.build:285: /root/modules/vdo/kvdo/vdo/bio.o] Error 1
    make[2]: *** [/usr/src/linux-headers-5.10.0-12-common/scripts/Makefile.build:502: /root/modules/vdo/kvdo/vdo] Error 2
    make[1]: *** [/usr/src/linux-headers-5.10.0-12-common/Makefile:1846: /root/modules/vdo/kvdo] Error 2
    make: *** [/usr/src/linux-headers-5.10.0-12-common/Makefile:185: __sub-make] Error 2
    make: Leaving directory '/usr/src/linux-headers-5.10.0-12-amd64'
    [root@hawea]~/modules/vdo/kvdo

Not sure if I am doing something wrong? I followed my notes and history to retrace my steps but never recalled bumping my head in to this issue on an earlier version of Debian.

@sweettea
Copy link

Good morning!

Which VDO version/branch of the repository are you trying to compile?

@albertdipp
Copy link
Author

Good Morning :) if it still is morning for you :)

I was cloning master [Version 8.1.1.371]

@albertdipp
Copy link
Author

albertdipp commented Mar 14, 2022

Some more testing later, seems that the issue was brought in with version 8.1.1.360.

Versions including 8.1.1.287 and earlier compile just fine.

edit: wrong version :)

@sweettea
Copy link

Ah, you're right. Specifically, if you search for "// XXX workaround for LINUX_VERSION_CODE < KERNEL_VERSION(5,15,0)" in 819203a, you'll see the code that was taken out which had a conditional for older kernels.

@corwin, which major/minor version is most suitable for a 5.10 kernel?

@lorelei-sakai
Copy link
Member

I tried to respond to this yesterday, but apparently I haven't figured out the right technique for replying by mail.

I think there are really only a few options. Either stick with the 8.1.1.287 release, or restore the workaround Sweet Tea mentioned. The code in that workaround should still work. But I believe no version under active development will work with a 5.10 kernel.

We don't test with a 5.10 kernel much and I guess we got overzealous about removing support for it. As the comment indicates, the 8.1.x versions are aimed at 5.15+ kernels, while older versions expect older (4.18+) kernels that will likely have different compilation problems.

I'll look into possibly restoring that support in a future version.

@tigerblue77
Copy link

tigerblue77 commented Apr 23, 2022

Hello there,

I encounter exactly the same error : memcpy_to_bvec() is missing on vdo/bio.c file.
I'm using Debian 11.3 with 5.10.0-13 kernel. It's stable Debian's branch so it could be a great idea to recover support 🥺 I want to use VDO on my almost-production environnent 😄

Don't hesitate to tell me if I can help.

@tigerblue77
Copy link

tigerblue77 commented Apr 24, 2022

restore the workaround Sweet Tea mentioned

Done, tested locally and create a PR and now it compiles well !!! 😁

image

Edit : Don't hesitate to check my installation script and improve it by following this link ! 😉

@lorelei-sakai
Copy link
Member

lorelei-sakai commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants