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

Unable to build for kernel 5.4 on Centos 7 #267

Closed
EvgeniySpinov opened this issue Jan 18, 2022 · 8 comments
Closed

Unable to build for kernel 5.4 on Centos 7 #267

EvgeniySpinov opened this issue Jan 18, 2022 · 8 comments

Comments

@EvgeniySpinov
Copy link

First of all thank you for the great tool. I'm using dattobd on multiple systems where it works without issues.

However currently I have not typical setup:

  • I have elrepo kernel for Centos 7 (kernel-lt-5.4.172-1.el7.elrepo.x86_64)
  • I'm trying to install dattobd.

Build fails with a huge error log with errors all over the place (make.log). Googling on few of them leads me to a dead end.

To my understanding kernel 5.4 is supported and module should be compiled without issues. Am I right?

@nickchen-cpu
Copy link

Hi
All of your pre-compile is not present
I guess it's because GPL
Please try following method:
insert this line in include.h
image

make clean
make

to see if it's ok .

@EvgeniySpinov
Copy link
Author

Thank you for prompt response.

Did exactly what is on the image in the file is called "src/includes.h".

It doesn't seemed to have changed anything - I still get the same amount and type of errors.

@nickchen-cpu
Copy link

nickchen-cpu commented Jan 18, 2022

Did you ever update your kernel-devel-$(uname -r).rpm?
After updating kernel, you also need to update the kernel-devel-rpm which is the API headers lib so that datto can understand your kernel.

https://centos.pkgs.org/7/elrepo-kernel-x86_64/kernel-lt-devel-5.4.172-1.el7.elrepo.x86_64.rpm.html
Please try to install it from this page.

yum install ./kernel-lt-devel-5.4.172-1.el7.elrepo.x86_64.rpm

then please try again.
By the way, you can remove the GPL line in your include.h

@EvgeniySpinov
Copy link
Author

Sure, I have these packages in the system initially (otherwise it refuses to even start compilation):
kernel-lt-devel-5.4.172-1.el7.elrepo.x86_64
kernel-lt-5.4.172-1.el7.elrepo.x86_64
kernel-lt-headers-5.4.172-1.el7.elrepo.x86_64

As well as I'm currently booted in the same kernel:
Linux hostname 5.4.172-1.el7.elrepo.x86_64 #1 SMP Fri Jan 14 13:01:57 EST 2022 x86_64 x86_64 x86_64 GNU/Linux

@nickchen-cpu
Copy link

nickchen-cpu commented Jan 18, 2022

Please remove &>/dev/null in genconfig.sh and make again then update the result.
This should show the root cause.
Because not present for all API is weird.
5.4 kernel shouldn't know nothing from all of these API
image

@EvgeniySpinov
Copy link
Author

Thank you. Please see updated log file: make.log

@nickchen-cpu
Copy link

nickchen-cpu commented Jan 18, 2022

aabc/ipt-netflow#171
Found a person who also used CentOS 7 kernel 5.4 and resolved the compilation issue.
Your compilation error message is the same as his one.
Can you try this method?

Root cause seems like the missing support for asm __inline syntax
updating gcc should work

@EvgeniySpinov
Copy link
Author

Thank you for help! That solution works for me.

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

2 participants