siderolabs / pkgs

Mozilla Public License 2.0
35 stars 119 forks source link

kernel menuconfig issue related to musl #1084

Closed samip5 closed 1 week ago

samip5 commented 1 week ago

It appears that currently the menuconfig is failing on a Gentoo host, but I thought it's running inside of Docker, so it should work even if host lacks musl?

Host is amd64, glibc-based.

Docker info:

Server:
 Engine:
  Version:          27.3.1
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.23.2
  Git commit:       41ca978a0a5400cc24b274137efa9f25517fcc0b
  Built:            Mon Nov  4 12:24:13 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.7.23
  GitCommit:        57f17b0a6295a39009d861b89e3b3b87b005ca27
 runc:
  Version:          1.1.14
  GitCommit:        2c9f5602f0ba3d9da1c2596322dfc4e156844890
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad007797e0dcd8b7126f27bb87401d224240
 make kernel-menuconfig PLATFORM=linux/amd64
for platform in linux/amd64; do \
  arch=`basename $platform` ; \
  make docker-kernel-prepare PLATFORM=$platform TARGET_ARGS="--tag=ghcr.io/siderolabs/kernel:ac329c9-$arch --load"; \
  docker run --rm -it --entrypoint=/toolchain/bin/bash -e PATH=/toolchain/bin:/bin -w /src -v $PWD/kernel/build/config-$arch:/host/.hostconfig ghcr.io/siderolabs/kernel:ac329c9-$arch -c 'cp /host/.hostconfig .config && make menuconfig && cp .config /host/.hostconfig'; \
done
make[1]: Entering directory '/home/sky/code/gh/tmi/talos-pkgs'
make[2]: Entering directory '/home/sky/code/gh/tmi/talos-pkgs'
[+] Building 110.9s (28/28) FINISHED                                                                                                                                                                      docker-container:agitated_wozniak
 => [internal] load build definition from Pkgfile                                                                                                                                                                                      0.0s
 => => transferring dockerfile: 14.36kB                                                                                                                                                                                                0.0s
 => resolve image config for docker-image://ghcr.io/siderolabs/bldr:v0.3.2                                                                                                                                                             1.5s
 => docker-image://ghcr.io/siderolabs/bldr:v0.3.2@sha256:09de89a613e38321ce471caada5052cc63a71169e968239a1f6ff0bc7c262b55                                                                                                              0.8s
 => => resolve ghcr.io/siderolabs/bldr:v0.3.2@sha256:09de89a613e38321ce471caada5052cc63a71169e968239a1f6ff0bc7c262b55                                                                                                                  0.0s
 => => sha256:318ce91f35c137e2b37328c7dc38b0369685eac4cbf54933a7d72cb74884fa14 130.17kB / 130.17kB                                                                                                                                     0.3s
 => => sha256:f49d5e8903ca31279aae0972e15f04a99f93d79748ec16bc302571a816318cae 431B / 431B                                                                                                                                             0.5s
 => => sha256:991afec7b1d83cc3456d4d92edc405bd462a1c7f03a892a8514054228264f2aa 6.46MB / 6.46MB                                                                                                                                         0.6s
 => => extracting sha256:991afec7b1d83cc3456d4d92edc405bd462a1c7f03a892a8514054228264f2aa                                                                                                                                              0.1s
 => => extracting sha256:f49d5e8903ca31279aae0972e15f04a99f93d79748ec16bc302571a816318cae                                                                                                                                              0.0s
 => => extracting sha256:318ce91f35c137e2b37328c7dc38b0369685eac4cbf54933a7d72cb74884fa14                                                                                                                                              0.0s
 => load Pkgfile, pkg.yamls and vars.yamls                                                                                                                                                                                             0.2s
 => => transferring dockerfile: 31.43MB                                                                                                                                                                                                0.1s
 => linux/amd64 cksum                                                                                                                                                                                                                  2.9s
 => => resolve docker.io/library/alpine:3.20                                                                                                                                                                                           2.1s
 => => sha256:da9db072f522755cbeb85be2b3f84059b70571b229512f1571d9217b77e1087f 3.62MB / 3.62MB                                                                                                                                         0.7s
 => => extracting sha256:da9db072f522755cbeb85be2b3f84059b70571b229512f1571d9217b77e1087f                                                                                                                                              0.1s
 => linux/amd64 mkdir /pkg                                                                                                                                                                                                             0.0s
 => docker-image://ghcr.io/siderolabs/tools:v1.9.0-alpha.0-9-ge061b6f                                                                                                                                                                  8.0s
 => => resolve ghcr.io/siderolabs/tools:v1.9.0-alpha.0-9-ge061b6f                                                                                                                                                                      1.4s
 => => sha256:da99f1fc40b5f9b118a9b992c9b7cd974aa4599b93ab4c284057e7e40e50034b 272.65MB / 272.65MB                                                                                                                                     6.6s
 => linux/amd64 context                                                                                                                                                                                                                0.1s
 => => transferring context: 5.94MB                                                                                                                                                                                                    0.0s
 => linux/amd64 kernel-prepare:download https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.60.tar.xz -> linux.tar.xz                                                                                                               2.9s
 => linux/amd64 kernel-prepare:copy                                                                                                                                                                                                    6.5s
 => => extracting sha256:da99f1fc40b5f9b118a9b992c9b7cd974aa4599b93ab4c284057e7e40e50034b                                                                                                                                              4.4s
 => => merging                                                                                                                                                                                                                         2.1s
 => linux/amd64 cksum-apkinstall                                                                                                                                                                                                       1.1s 
 => linux/amd64 kernel-prepare:cksum-prepare                                                                                                                                                                                           0.3s 
 => linux/amd64 kernel-prepare:cksum-verify                                                                                                                                                                                            0.3s 
 => linux/amd64 kernel-prepare:download finalize                                                                                                                                                                                       0.0s 
 => linux/amd64 kernel-prepare:context /kernel/prepare -> /pkg                                                                                                                                                                         1.8s 
 => linux/amd64 kernel-prepare:mkdir /tmp/build/0                                                                                                                                                                                      0.1s
 => linux/amd64 kernel-prepare:download                                                                                                                                                                                                2.2s
 => => merging                                                                                                                                                                                                                         2.2s
 => linux/amd64 kernel-prepare:prepare-0                                                                                                                                                                                              15.2s
 => linux/amd64 kernel-prepare:prepare-0                                                                                                                                                                                               2.2s 
 => linux/amd64 kernel-prepare:install-0                                                                                                                                                                                               7.4s 
 => linux/amd64 kernel-prepare:finalize /lib -> /lib                                                                                                                                                                                   0.7s 
 => linux/amd64 kernel-prepare:finalize /bin -> /bin                                                                                                                                                                                   0.1s 
 => linux/amd64 kernel-prepare:finalize /usr -> /usr                                                                                                                                                                                   0.1s 
 => linux/amd64 kernel-prepare:finalize /toolchain -> /toolchain                                                                                                                                                                       2.9s 
 => linux/amd64 kernel-prepare:finalize /src -> /src                                                                                                                                                                                   8.7s
 => linux/amd64 kernel-prepare:finalize                                                                                                                                                                                                0.6s
 => exporting to oci image format                                                                                                                                                                                                     42.0s
 => => exporting layers                                                                                                                                                                                                               29.7s
 => => exporting manifest sha256:9b0013079956fb9d262fb8fdcbbc378294e8f84f9e1d73e5bbfe5adc3209fe2e                                                                                                                                      0.0s
 => => exporting config sha256:6f249b874832e5b89ee86d7726df57cafcfaaeea4e278d25c4c705c7c99203cc                                                                                                                                        0.0s
 => => exporting manifest list sha256:17d5c3b9b7edad0322e10cba7c94c481552fed6ab11092d1101187e82e69156f                                                                                                                                 0.0s
 => => sending tarball                                                                                                                                                                                                                12.3s
 => importing to docker                                                                                                                                                                                                                0.0s
make[2]: Leaving directory '/home/sky/code/gh/tmi/talos-pkgs'
make[1]: Leaving directory '/home/sky/code/gh/tmi/talos-pkgs'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/menu.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  HOSTLD  scripts/kconfig/mconf
/toolchain/lib/gcc/x86_64-linux-musl/14.2.0/../../../../x86_64-linux-musl/bin/ld: cannot find -lncursesw: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:123: scripts/kconfig/mconf] Error 1
make[1]: *** [/src/Makefile:697: menuconfig] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: *** [Makefile:196: kernel-menuconfig] Error 2
smira commented 1 week ago

yes, this seems to be a regression in main at the moment, we don't use it much, but it should be fixed anyways

samip5 commented 1 week ago

So I think I'm understanding the error right as it's a missing ncurses (ncursesw) library?

smira commented 1 week ago

Yes, in the toolchain I switched ncurses to build non-wide character version, as bash needs that, it's a long story. But it doesn't affect Talos itself in any way, just the stuff around kernel.

samip5 commented 1 week ago

Yes, in the toolchain I switched ncurses to build non-wide character version, as bash needs that, it's a long story. But it doesn't affect Talos itself in any way, just the stuff around kernel.

Referring to https://github.com/siderolabs/tools/commit/0a443c6d5a1ac6764b22990be0945ef4cae8c32e?

smira commented 1 week ago

yes.