Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo Kernel fails to compile: emake failed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ian848uig
n00b
n00b


Joined: 21 Sep 2023
Posts: 33
Location: Latin America

PostPosted: Sun Jun 16, 2024 10:59 pm    Post subject: Gentoo Kernel fails to compile: emake failed Reply with quote

With the attempt to update from version 6.9.3 to version 6.9.5 the kernel fails to compile: https://pastebin.com/ESkJi0cT
NOTE: it happened when trying to update also to 6.9.4
Any suggestions? Also enlarge the /boot partition since before its capacity was from 300MB to 900MB (approximately) by shrinking /home
_________________
I like everything that is Linux, free and open source software. I am a teenager
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 231
Location: Pennsylvania, USA

PostPosted: Mon Jun 17, 2024 1:28 am    Post subject: Reply with quote

In your build log I see:
Code:
make -j32 O=/var/tmp/portage/sys-kernel/gentoo-kernel-6.9.5/work/modprep [... rest of line elided ...]
and further down, 3 lines above the first line with the word "Error",
Code:
make: cannot create temporary file /var/tmp/portage/sys-kernel/gentoo-kernel-6.9.5/temp/Gmpgmbwg: Too many open files

If you really have 32 cores (or hyperthreads) and 64 GB to support -j32, you could try to increase your ulimit for open files at the command prompt before running emerge (ulimit -n 2048 maybe). Otherwise, try lowering the -j setting.
Back to top
View user's profile Send private message
ian848uig
n00b
n00b


Joined: 21 Sep 2023
Posts: 33
Location: Latin America

PostPosted: Mon Jun 17, 2024 1:59 am    Post subject: Reply with quote

I tried ulimit -n 2048 and 8192 but nothing, plus my processor does have 32 cores and is the AMD Ryzen 5 5950X. and activated all cores from the UEFI firmware.
I'll still check the configuration
_________________
I like everything that is Linux, free and open source software. I am a teenager
Back to top
View user's profile Send private message
ian848uig
n00b
n00b


Joined: 21 Sep 2023
Posts: 33
Location: Latin America

PostPosted: Mon Jun 17, 2024 8:04 pm    Post subject: Reply with quote

All 32 cores are activated, all system monitors show 32 instead of 16.
_________________
I like everything that is Linux, free and open source software. I am a teenager
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 231
Location: Pennsylvania, USA

PostPosted: Tue Jun 18, 2024 12:43 am    Post subject: Reply with quote

(Silly me. ulimit is per process. Having 32 of them wouldn't make a difference.)

So maybe it's the global limit ?
Code:
$cat /proc/sys/fs/file-nr
8224   0   3277329
The three numbers are: number of open files; number of open files not in use; maximum number of open files.
(Not sure what "files not in use" means. Anyway.)
What does that show on your system ? Is the number of open files close to the limit before you start emerge ?

This is unusual. I've never seen the "Too many open files" error.

EDIT: You can also run this, in a separate terminal window, while you run emerge:
Code:
watch -n 1 cat /proc/sys/fs/file-nr
Back to top
View user's profile Send private message
ian848uig
n00b
n00b


Joined: 21 Sep 2023
Posts: 33
Location: Latin America

PostPosted: Wed Jun 19, 2024 10:23 pm    Post subject: Reply with quote

The maximum number of files globally returned by cat /proc/sys/fs/file-nr is 2^63 (Approximately) subtracting -1.
In addition, there is not even 1% of file usage with an average of 10,500 (Approximate)
_________________
I like everything that is Linux, free and open source software. I am a teenager
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 231
Location: Pennsylvania, USA

PostPosted: Fri Jun 21, 2024 1:42 am    Post subject: Reply with quote

Maybe I'm sending you down the wrong path. Can you wgetpaste the other outputs suggested by portage ?
Code:
 * If you need support, post the output of `emerge --info '=sys-kernel/gentoo-kernel-6.9.5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/gentoo-kernel-6.9.5::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-kernel/gentoo-kernel-6.9.5/temp/build.log'.

That "Too many open files" error sure is weird, though.
Back to top
View user's profile Send private message
ian848uig
n00b
n00b


Joined: 21 Sep 2023
Posts: 33
Location: Latin America

PostPosted: Fri Jun 21, 2024 4:46 pm    Post subject: Reply with quote

More information is found at: https://pastebin.com/8c2qWJR2
Furthermore, I had put the build log in at the time of creating the first post.
_________________
I like everything that is Linux, free and open source software. I am a teenager
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 231
Location: Pennsylvania, USA

PostPosted: Sat Jun 22, 2024 1:12 am    Post subject: Reply with quote

ian848uig wrote:
Furthermore, I had put the build log in at the time of creating the first post.
That was the emerge output, wasn't it ? The build log is yet another file, as indicated near the end of the emerge output.

At the moment, I'm stumped. I don't know if the build log will help but we won't know until we see it...
Back to top
View user's profile Send private message
ian848uig
n00b
n00b


Joined: 21 Sep 2023
Posts: 33
Location: Latin America

PostPosted: Mon Jun 24, 2024 10:56 pm    Post subject: Reply with quote

I hope this is the build.log: https://pastebin.com/5fL0hD6t
_________________
I like everything that is Linux, free and open source software. I am a teenager
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 231
Location: Pennsylvania, USA

PostPosted: Tue Jun 25, 2024 10:39 pm    Post subject: Reply with quote

Was it /var/tmp/portage/sys-kernel/gentoo-kernel-6.9.6/temp/build.log ?

It looks almost identical to the first file you posted, except that the new one is for gentoo-kernel-6.9.6 instead of gentoo-kernel-6.9.5 .

I'm still stumped. The Error 2 messages stand for No such file or directory and they come a few lines after make: cannot create temporary file <name snipped>: Too many open files . Which makes sense if it went looking for a file that it failed to create, but why were there too many open files in the first place ?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum