Error when building the 5.10.17 Kernel on the newest version of Ubuntu.
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Error when building the 5.10.17 Kernel on the newest version of Ubuntu.
When I run the make command in the directory for the 5.10.17 kernel, after about 30 seconds I get the error included below. I'm unsure why this is happening, as I've successfully built this kernel version before on a different distro. I am doing this on the newest version of Ubuntu,for context on the distro.
Code:
subcmd-util.h: In function ‘xrealloc’:
subcmd-util.h:58:31: error: pointer ‘ptr’ may be used after ‘realloc’ [-Werror=use-after-free]
58 | ret = realloc(ptr, 1);
| ^~~~~~~~~~~~~~~
subcmd-util.h:52:21: note: call to ‘realloc’ here
52 | void *ret = realloc(ptr, size);
| ^~~~~~~~~~~~~~~~~~
subcmd-util.h:56:23: error: pointer ‘ptr’ may be used after ‘realloc’ [-Werror=use-after-free]
56 | ret = realloc(ptr, size);
| ^~~~~~~~~~~~~~~~~~
subcmd-util.h:52:21: note: call to ‘realloc’ here
52 | void *ret = realloc(ptr, size);
| ^~~~
You're unsure what is happening - so am I. You're pointing out header issues, but they don't appear to be fatal, as=n sending a snippet like you did doesn't allow a diagnosis. A compile can have an awful lot of those warnings and still work.
Let the compile run until it errors out. You should see the word error. Whart we want to see is the first error, and down to the end. Pastebin it if it's too long. And with Ubuntu, they do precompiled kernels. So you can just upgrade the package. Why not do that?
You're unsure what is happening - so am I. You're pointing out header issues, but they don't appear to be fatal, as=n sending a snippet like you did doesn't allow a diagnosis. A compile can have an awful lot of those warnings and still work.
Let the compile run until it errors out. You should see the word error. Whart we want to see is the first error, and down to the end. Pastebin it if it's too long. And with Ubuntu, they do precompiled kernels. So you can just upgrade the package. Why not do that?
Seems like that to me too, seems more like a warning than a fatal error. Besides, the OP never posted an end sequence happening in the context.
Gladf it worked. Make sure your headers match your kernel, as appears to be the practise these days. In particular, there's differences between kernel-4.x.x kernels & 5.x.x ones.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.