Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error 255 in kernel 5.7 compiling arch/x86/events/amd/ibs.o
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
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2202

PostPosted: Thu Jun 25, 2020 11:57 am    Post subject: Error 255 in kernel 5.7 compiling arch/x86/events/amd/ibs.o Reply with quote

Ever since kernel 5.7.0, it won't compile. (This is gentoo-sources). The error is at the end of the following listing, I've included the lines before in case the context is important. I copied my 5.6.x .config and ran "make oldconfig" beforehand.
Code:
 make clean
  CLEAN   arch/x86/entry/vdso
  CLEAN   arch/x86/realmode/rm
  CLEAN   arch/x86/tools
hp /usr/src/linux-5.7.6-gentoo # make -j1
  HOSTCC  scripts/basic/fixdep
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
...
  CC      arch/x86/events/amd/core.o
arch/x86/events/amd/core.o: warning: objtool: amd_pmu_handle_irq()+0x28: stack state mismatch: cfa1=7+8 cfa2=7+0
  CC      arch/x86/events/amd/uncore.o
  CC      arch/x86/events/amd/power.o
  CC      arch/x86/events/amd/ibs.o
arch/x86/events/amd/ibs.o: warning: objtool: perf_ibs_init()+0x25: can't find jump dest instruction at .text+0x37
make[3]: *** [scripts/Makefile.build:267: arch/x86/events/amd/ibs.o] Error 255
make[3]: *** Deleting file 'arch/x86/events/amd/ibs.o'
make[2]: *** [scripts/Makefile.build:488: arch/x86/events/amd] Error 2
make[1]: *** [scripts/Makefile.build:488: arch/x86/events] Error 2
make: *** [Makefile:1732: arch/x86] Error 2

AFAIK the warning messages are irrelevant; my 5.6 kernel produces tons of them during compilation.

I suspect the problem may be down to some kernel reorganization of the AMD IBS code that I can't now locate. What I don't understand is why I'm (almost) the only user in the world hitting this (almost - someone seems to have reported it against genkernel.
_________________
Greybeard
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6214
Location: Dallas area

PostPosted: Thu Jun 25, 2020 12:02 pm    Post subject: Reply with quote

Do you have the kernel set for a particular CPU? If so which one?

And which gcc are you using?
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2202

PostPosted: Thu Jun 25, 2020 12:16 pm    Post subject: Reply with quote

Anon-E-moose, good call! It was my KCFLAGS="-march=native" that caused the problem.
_________________
Greybeard
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6214
Location: Dallas area

PostPosted: Thu Jun 25, 2020 12:39 pm    Post subject: Reply with quote

I've seen mixed results with "native", better to set the cpu chip directly, and if there isn't one available, then use the next best option (prev version cpu)
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2892

PostPosted: Thu Jun 25, 2020 2:09 pm    Post subject: Reply with quote

Considering the kernel goes out of its way to disable a lot of -m options (such as -mno-avx, likely for a reason).. but not every single that exists (especially newer things), and -march=native enables those, I imagine it could have all sort of strange implications.
Back to top
View user's profile Send private message
Jimmy Jazz
Guru
Guru


Joined: 04 Oct 2004
Posts: 333
Location: Strasbourg

PostPosted: Fri Jun 26, 2020 12:30 am    Post subject: Reply with quote

Ionen wrote:
Considering the kernel goes out of its way to disable a lot of -m options (such as -mno-avx, likely for a reason).. but not every single that exists (especially newer things), and -march=native enables those, I imagine it could have all sort of strange implications.


it is the missing -mno-tbm flag
_________________
« La seule condition au triomphe du mal, c'est l'inaction des gens de bien » E.Burke
Code:

+----+----+----+
|    |::::|    |
|    |::::|    |
+----+----+----+

motto: WeLCRO
WritE Less Code, Repeat Often
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