all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Error when Kernel configed with "CONFIG_DEBUG_INFO_BTF=y"
@ 2024-05-15 14:29 shaqtsui
  2024-05-17 14:33 ` Maxim Cournoyer
  0 siblings, 1 reply; 2+ messages in thread
From: shaqtsui @ 2024-05-15 14:29 UTC (permalink / raw)
  To: help-guix

Hi Guix team,

I am struggling on this error but can not get it resolved.
Please kindly help.


Config code snippet
```
(kernel (customize-linux
				 #:linux linux-libre-with-bpf
				 #:configs '(
										 "CONFIG_DEBUG_INFO_BTF=y"
										 )))

```

Error log:
```
.config:12161:warning: override: reassigning to symbol VIRTIO_MMIO
.config:12162:warning: override: reassigning to symbol FUSE_FS
.config:12163:warning: override: reassigning to symbol CIFS
.config:12164:warning: override: reassigning to symbol 9P_FS
*
* Restart config...
*
*
* BPF subsystem
*
Enable bpf() system call (BPF_SYSCALL) [Y/?] y
Enable BPF Just In Time compiler (BPF_JIT) [Y/n/?] y
  Permanently enable BPF JIT and remove BPF interpreter (BPF_JIT_ALWAYS_ON) [Y/n/?] y
Disable unprivileged BPF by default (BPF_UNPRIV_DEFAULT_OFF) [Y/n/?] y
Enable BPF LSM Instrumentation (BPF_LSM) [N/y/?] (NEW) 
Error in reading or end of file.

*
* Mitigations for speculative execution vulnerabilities
*
Mitigations for speculative execution vulnerabilities (SPECULATION_MITIGATIONS) [Y/n/?] y
  Remove the kernel mapping in user mode (PAGE_TABLE_ISOLATION) [Y/n/?] y
  Avoid speculative indirect branches in kernel (RETPOLINE) [Y/n/?] y
    Enable return-thunks (RETHUNK) [Y/n/?] y
      Enable UNRET on kernel entry (CPU_UNRET_ENTRY) [Y/n/?] y
  Mitigate RSB underflow with call depth tracking (CALL_DEPTH_TRACKING) [Y/n/?] y
    Enable call thunks and call depth tracking debugging (CALL_THUNKS_DEBUG) [N/y/?] n
  Enable IBPB on kernel entry (CPU_IBPB_ENTRY) [Y/n/?] y
  Enable IBRS on kernel entry (CPU_IBRS_ENTRY) [Y/n/?] y
  Mitigate speculative RAS overflow on AMD (CPU_SRSO) [Y/n/?] y
  Mitigate Straight-Line-Speculation (SLS) [Y/n/?] y
  Force GDS Mitigation (GDS_FORCE_MITIGATION) [N/y/?] n
  RFDS Mitigation (MITIGATION_RFDS) [Y/n/?] y
  Mitigate Spectre-BHB (Branch History Injection) (MITIGATION_SPECTRE_BHI) [Y/n/?] (NEW) 
Error in reading or end of file.

*
* Bootup logo
*
Bootup logo (LOGO) [Y/n/?] y
  Standard black and white Linux logo (LOGO_LINUX_MONO) [N/y/?] n
  Standard 16-color Linux logo (LOGO_LINUX_VGA16) [N/y/?] n
  Standard 224-color Linux logo (LOGO_LINUX_CLUT224) [N/y/?] n
  224-color Linux-libre logo (LOGO_LIBRE_CLUT224) [Y/n/?] (NEW) 
Error in reading or end of file.

*
* Speakup console speech
*
Speakup core (SPEAKUP) [M/n/y/?] m
  Accent SA synthesizer support (SPEAKUP_SYNTH_ACNTSA) [N/m/?] (NEW) 
Error in reading or end of file.

  Apollo II synthesizer support (SPEAKUP_SYNTH_APOLLO) [N/m/?] (NEW) 
Error in reading or end of file.

  Audapter synthesizer support (SPEAKUP_SYNTH_AUDPTR) [N/m/?] (NEW) 
Error in reading or end of file.

  Braille 'n' Speak synthesizer support (SPEAKUP_SYNTH_BNS) [N/m/?] (NEW) 
Error in reading or end of file.

  DECtalk Express synthesizer support (SPEAKUP_SYNTH_DECTLK) [N/m/?] (NEW) 
Error in reading or end of file.

  DECtalk External (old) synthesizer support (SPEAKUP_SYNTH_DECEXT) [N/m/?] (NEW) 
Error in reading or end of file.

  DoubleTalk LT/LiteTalk synthesizer support (SPEAKUP_SYNTH_LTLK) [N/m/?] (NEW) 
Error in reading or end of file.

  Userspace software synthesizer support (SPEAKUP_SYNTH_SOFT) [M/n/?] m
  Speak Out synthesizer support (SPEAKUP_SYNTH_SPKOUT) [N/m/?] (NEW) 
Error in reading or end of file.

  Transport synthesizer support (SPEAKUP_SYNTH_TXPRT) [N/m/?] (NEW) 
Error in reading or end of file.

  Dummy synthesizer driver (for testing) (SPEAKUP_SYNTH_DUMMY) [N/m/?] (NEW) 
Error in reading or end of file.

#
# configuration written to .config
#
#
# No change to .config
#
error: in phase 'configure': uncaught exception:
misc-error #f "~A ~S" ("Mismatching configurations in .config and arch/x86/configs/guix_defconfig" (("CONFIG_DEBUG_INFO_BTF" (#f "y")))) #f 
phase `configure' failed after 23.3 seconds
Backtrace:
           8 (primitive-load "/gnu/store/gy3w005l9rm0m9i8cxz8b2pcz0x…")
In guix/build/gnu-build-system.scm:
    908:2  7 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
  1752:10  6 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
    634:9  5 (for-each #<procedure 7ffff77c4c80 at guix/build/gnu-b…> …)
In ice-9/boot-9.scm:
  1752:10  4 (with-exception-handler _ _ #:unwind? _ # _)
In guix/build/gnu-build-system.scm:
   929:23  3 (_)
In guix/build/kconfig.scm:
    174:6  2 (verify-config ".config" "arch/x86/configs/guix_defconf…")
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Mismatching configurations in .config and arch/x86/configs/guix_defconfig (("CONFIG_DEBUG_INFO_BTF" (#f "y")))
```


What I have invetigated/tried:
Error is due to failure in verify-config(kconfig.scm).
I understand that this is because can not find correspoding config in `.config`.

So I try to do a manual kernel config via
```
guix system reconfig system.scm -K
cd /tmp/guix-build-linux-libre-bpf-6.8.8.drv-0/top
source environment-variables
cd linux-6.8.8

make menuconfig
```

But `make menuconfig` raise error:
```
*
* Unable to find the ncurses package.
* Install ncurses (ncurses-devel or libncurses-dev
* depending on your distribution).
*
* You may also need to install pkg-config to find the
* ncurses installed in a non-default location.
*
make[2]: *** [scripts/kconfig/Makefile:232: scripts/kconfig/mconf-libs] Error 1
make[1]: *** [/tmp/guix-build-linux-libre-bpf-6.8.8.drv-0/top/linux-6.8.8/Makefile:689: menuconfig] Error 2
make: *** [Makefile:240: __sub-make] Error 2
```

Then I installed ncurses, pkg-config. But still same error.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Error when Kernel configed with "CONFIG_DEBUG_INFO_BTF=y"
  2024-05-15 14:29 Error when Kernel configed with "CONFIG_DEBUG_INFO_BTF=y" shaqtsui
@ 2024-05-17 14:33 ` Maxim Cournoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2024-05-17 14:33 UTC (permalink / raw)
  To: shaqtsui; +Cc: help-guix

Hi,

shaqtsui <shaqtsui@163.com> writes:

> Hi Guix team,
>
> I am struggling on this error but can not get it resolved.
> Please kindly help.
>
>
> Config code snippet
>
> ```
> (kernel (customize-linux
> 				 #:linux linux-libre-with-bpf
> 				 #:configs '(
> 										 "CONFIG_DEBUG_INFO_BTF=y"
> 										 )))
>

[...]

I think I've answered on IRC in #guix, but in case it didn't reach you,
the reason the configure validation step fails is probably due to a
missing KConfig dependency.  CONFIG_DEBUG_INFO_BTF depends on
CONFIG_DEBUG_INFO, among others.

In doubt, you can run 'make menuconfig' from the Linux-libre kernel
source directory in a 'guix shell -D linux-libre ncurses' environment.
There you'll be able to inspect dependencies.

After configuring the kernel to your needs (starting from the base
config of Guix if you like), you can even save a 'defconfig' file, via
'make savedefconfig' and provide that directly to customize-linux.

This way of doing things ensure all the KConfig dependencies are
satisfied and avoids any surprise.

-- 
Thanks,
Maxim


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-17 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-15 14:29 Error when Kernel configed with "CONFIG_DEBUG_INFO_BTF=y" shaqtsui
2024-05-17 14:33 ` Maxim Cournoyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.