LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-27-2023, 11:34 PM   #1
Nucl3arsn3k
LQ Newbie
 
Registered: Nov 2023
Posts: 4

Rep: Reputation: 0
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);
      |                     ^~~~
 
Old 12-01-2023, 05:01 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326
Hello, Nucl3arsn3k & welcome to LQ

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?
 
Old 12-01-2023, 06:39 AM   #3
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,830
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by business_kid View Post
Hello, Nucl3arsn3k & welcome to LQ

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.
 
Old 12-02-2023, 09:39 AM   #4
Nucl3arsn3k
LQ Newbie
 
Registered: Nov 2023
Posts: 4

Original Poster
Rep: Reputation: 0
The kernel compiled and installed just fine despite this error. Thanks for the help.
 
Old 12-02-2023, 10:47 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,309

Rep: Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326Reputation: 2326
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] What is the safest procedure to update stock Libreoffice version provided with Mint distro to newest stable version? mlytle Linux Mint 1 08-20-2017 04:39 PM
[SOLVED] Which Damnsmalllinux version has the newest ndiswrapper and wpasupplicant version? floppy_stuttgart DamnSmallLinux 3 10-06-2011 01:40 PM
Which LXDE version of Linux has the newest version of Firefox and Open Office? coolguy2008 Linux - Newbie 6 09-19-2010 12:04 PM
Is there a version of Debian that is running the newest kernel sanfran49 Linux - Software 3 02-12-2004 07:51 PM
The Linux Kernel (What's the newest version?) jlacroix Fedora 6 01-25-2004 12:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration