You are not logged in.

#1 2018-05-07 13:01:25

Batou
Member
Registered: 2017-01-03
Posts: 259

Kernel build fails after thousands of 'warning: objtool call ...'

After updating packages (new kernel, gcc, gcc-libs etc) today, I had to rebuild my custom kernel due to nvidia-dkms failing to load, and when I started compiling with ABS, I was greeted with (thousands) of warning messages of the type:

 
...
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/.tmp_sw.o: warning: objtool: rtl8821ae_init_sw_vars.cold.1()+0x17: return with modified stack frame
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/.tmp_phy.o: warning: objtool: rtl8821ae_phy_bb_config()+0xda7: sibling call from callable instruction with modified stack frame
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/.tmp_phy.o: warning: objtool: rtl8821ae_phy_set_bw_mode_callback()+0x390: sibling call from callable instruction with modified stack frame
  CC [M]  drivers/net/wireless/ti/wlcore/boot.o
....
drivers/net/wireless/ti/wlcore/.tmp_sdio.o: warning: objtool: wl12xx_sdio_raw_write()+0x51: sibling call from callable instruction with modified stack frame
drivers/net/wireless/ti/wlcore/.tmp_sdio.o: warning: objtool: wl12xx_sdio_raw_read()+0x8f: sibling call from callable instruction with modified stack frame
drivers/net/wireless/ti/wlcore/.tmp_sdio.o: warning: objtool: wl12xx_sdio_raw_write.cold.3()+0x3a: sibling call from callable instruction with modified stack frame
drivers/net/wireless/ti/wlcore/.tmp_sdio.o: warning: objtool: wl12xx_sdio_raw_read.cold.4()+0x3a: sibling call from callable instruction with modified stack frame
  LD [M]  drivers/net/wireless/ti/wlcore/wlcore_spi.o
  LD [M]  drivers/net/wireless/ti/wlcore/wlcore_sdio.o
  AR      drivers/net/wireless/ti/built-in.o
  AR      drivers/net/wireless/built-in.o
  AR      drivers/net/built-in.o
  AR      drivers/built-in.o
==> ERROR: A failure occurred in build().
    Aborting...

After some searching, I found a bunch of pages on Gentoo forums about this issue but none of those solutions worked for me (https://forums.gentoo.org/viewtopic-t-1075862.html). It appears to be the linker issue and I'm guessing it's due to new gcc. I diff'ed my makepkg.conf against the .pacnew one and the only difference was MAKEFLAGS="-j$(nproc)" but I don't think this could be causing this (correct me if I'm wrong). I'm in the process of rolling back the upgrade so I can get my old kernel working.

Anyone seen the same issue? Any workarounds? Thanks.

Edit: After rolling back updates, I decided to try to compile 4.16.7 again (with old gcc) and I don't see any errors... for now anyway, still 20 min left till compilation is over. All these warnings are due to new gcc. I suggest you compile your new kernel with old gcc.

Last edited by Batou (2018-05-07 13:16:55)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#2 2018-05-07 15:56:55

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Kernel build fails after thousands of 'warning: objtool call ...'

Batou wrote:

Any workarounds?

Did you try the ones in the gentoo forums thread you linked?

My custom kernel seemed to build fine with kpti and retpoline disabled. Although I also got the same objtool warnings, that you can get rid of by disabling stack validation IIUC.

Offline

#3 2018-05-07 16:11:43

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: Kernel build fails after thousands of 'warning: objtool call ...'

ooo wrote:

My custom kernel seemed to build fine with kpti and retpoline disabled. Although I also got the same objtool warnings, that you can get rid of by disabling stack validation IIUC.

Did you need to disable kpti and retpoline for the build to succeed?  I had the same warnings but build completed with both kpti and retpoline left enabled for 4.16.7 and 4.17-rc4.

Offline

#4 2018-05-07 16:22:45

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: Kernel build fails after thousands of 'warning: objtool call ...'

ooo wrote:
Batou wrote:

Any workarounds?

Did you try the ones in the gentoo forums thread you linked?

Yeah, none of them did anything.
I rolled back gcc, recompiled and there were no warnings, no errors.  I haven't installed the .7 yet, however (will do it in the evening when I'm done with a project).


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#5 2018-05-07 16:29:51

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Kernel build fails after thousands of 'warning: objtool call ...'

loqs wrote:
ooo wrote:

My custom kernel seemed to build fine with kpti and retpoline disabled. Although I also got the same objtool warnings, that you can get rid of by disabling stack validation IIUC.

Did you need to disable kpti and retpoline for the build to succeed?

They were already disabled in my .config, didn't try enabling them.

This was also 4.16.7. Looks like there was one gcc8 build fix during .6->.7: https://git.kernel.org/pub/scm/linux/ke … 208a31a6e3

Offline

#6 2018-05-07 18:48:19

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Kernel build fails after thousands of 'warning: objtool call ...'

Building the stock [core] PKGBUILD with extra-x86_64-build works fine for me, even with the warnings. The repo package used gcc 8 to build.

You're correct in thinking nproc is not the answer, non-parallelizable builds wouldn't care which gcc version you used... but I used -j$(nproc) anyway, when testing for myself. So consider it confirmed. smile


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2018-05-07 18:57:22

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: Kernel build fails after thousands of 'warning: objtool call ...'

Makes bisecting slightly more troublesome as  at least 4.16-4.16.6 need 4b0110291ae1d618384cab105b1e2d208a31a6e3 or gcc < 8 or change Werror=restrict.

Offline

#8 2018-05-09 14:18:57

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: Kernel build fails after thousands of 'warning: objtool call ...'

Just compiled 4.16.8 with gcc 8.1.0 and there were tons of warnings but no errors smile Haven't rebooted yet but I've installed the kernel without any issues. It took 33min to compile (not sure what the average time is) and I think it was few min slower than 4.16.7.

Thanks Eli!

Last edited by Batou (2018-05-09 14:19:39)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

Board footer

Powered by FluxBB