Error while compiling kernel from source

i was compiling kernel from source for androidx86 but i got this error

scripts/extract-cert.c: In function ‘display_openssl_errors’:
scripts/extract-cert.c:46:9: warning: ‘ERR_get_error_line’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
46 |         while ((e = ERR_get_error_line(&file, &line))) {
|         ^~~~~
In file included from scripts/extract-cert.c:23:
/usr/include/openssl/err.h:423:15: note: declared here
423 | unsigned long ERR_get_error_line(const char **file, int *line);
|               ^~~~~~~~~~~~~~~~~~
scripts/extract-cert.c: In function ‘drain_openssl_errors’:
scripts/extract-cert.c:59:9: warning: ‘ERR_get_error_line’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
59 |         while (ERR_get_error_line(&file, &line)) {}
|         ^~~~~
/usr/include/openssl/err.h:423:15: note: declared here
423 | unsigned long ERR_get_error_line(const char **file, int *line);
|               ^~~~~~~~~~~~~~~~~~
scripts/extract-cert.c: In function ‘main’:
scripts/extract-cert.c:124:17: warning: ‘ENGINE_load_builtin_engines’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
124 |                 ENGINE_load_builtin_engines();
|                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from scripts/extract-cert.c:24:
/usr/include/openssl/engine.h:358:28: note: declared here
358 | OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
|                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/extract-cert.c:126:17: warning: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
126 |                 e = ENGINE_by_id("pkcs11");
|                 ^
/usr/include/openssl/engine.h:336:31: note: declared here
336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
|                               ^~~~~~~~~~~~
scripts/extract-cert.c:128:17: warning: ‘ENGINE_init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
128 |                 if (ENGINE_init(e))
|                 ^~
/usr/include/openssl/engine.h:620:27: note: declared here
|                           ^~~~~~~~~~~
scripts/extract-cert.c:133:25: warning: ‘ENGINE_ctrl_cmd_string’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
133 |                         ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0), "Set PKCS#11 PIN");
|                         ^~~
/usr/include/openssl/engine.h:479:5: note: declared here
479 | int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
|     ^~~~~~~~~~~~~~~~~~~~~~
scripts/extract-cert.c:134:17: warning: ‘ENGINE_ctrl_cmd’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
134 |                 ENGINE_ctrl_cmd(e, "LOAD_CERT_CTRL", 0, &parms, NULL, 1);
|                 ^~~~~~~~~~~~~~~
/usr/include/openssl/engine.h:450:27: note: declared here
450 | OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,
|                           ^~~~~~~~~~~~~~~
WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
WRAP    arch/x86/include/generated/uapi/asm/errno.h
WRAP    arch/x86/include/generated/uapi/asm/fcntl.h
WRAP    arch/x86/include/generated/uapi/asm/ioctl.h
WRAP    arch/x86/include/generated/uapi/asm/ioctls.h
WRAP    arch/x86/include/generated/uapi/asm/ipcbuf.h
WRAP    arch/x86/include/generated/uapi/asm/param.h
WRAP    arch/x86/include/generated/uapi/asm/poll.h
WRAP    arch/x86/include/generated/uapi/asm/resource.h
WRAP    arch/x86/include/generated/uapi/asm/socket.h
WRAP    arch/x86/include/generated/uapi/asm/sockios.h
WRAP    arch/x86/include/generated/uapi/asm/termbits.h
WRAP    arch/x86/include/generated/uapi/asm/termios.h
WRAP    arch/x86/include/generated/uapi/asm/types.h
WRAP    arch/x86/include/generated/asm/early_ioremap.h
WRAP    arch/x86/include/generated/asm/export.h
WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
WRAP    arch/x86/include/generated/asm/irq_regs.h
WRAP    arch/x86/include/generated/asm/kmap_size.h
WRAP    arch/x86/include/generated/asm/local64.h
WRAP    arch/x86/include/generated/asm/mmiowb.h
WRAP    arch/x86/include/generated/asm/
WRAP    arch/x86/include/generated/asm/rwonce.h
WRAP    arch/x86/include/generated/asm/unaligned.h
UPD     include/config/kernel.release
UPD     include/generated/uapi/linux/version.h
UPD     include/generated/utsrelease.h
CC      scripts/mod/empty.o
HOSTCC  scripts/mod/mk_elfconfig
MKELF   scripts/mod/elfconfig.h
HOSTCC  scripts/mod/modpost.o
CC      scripts/mod/devicetable-offsets.s
UPD     scripts/mod/devicetable-offsets.h
HOSTCC  scripts/mod/file2alias.o
HOSTCC  scripts/mod/sumversion.o
HOSTLD  scripts/mod/modpost
CC      kernel/bounds.s
UPD     include/generated/bounds.h
UPD     include/generated/timeconst.h
CC      arch/x86/kernel/asm-offsets.s
UPD     include/generated/asm-offsets.h
CALL    scripts/
CALL    scripts/atomic/
DESCEND objtool
gcc   -o /home/bhavishya-yadav/build/linux/linux/tools/objtool/fixdep /home/bhavishya-yadav/build/linux/linux/tools/objtool/fixdep-in.o
In file included from help.c:12:
subcmd-util.h: In function ‘xrealloc’:
subcmd-util.h:58:31: error: pointer ‘ptr’ may be used after ‘realloc’ [-Werror=use-after-free]
58 |                         ret = realloc(ptr, 1);
|                               ^~~~~~~~~~~~~~~
subcmd-util.h:52:21: note: call to ‘realloc’ here
52 |         void *ret = realloc(ptr, size);
|                     ^~~~~~~~~~~~~~~~~~
subcmd-util.h:56:23: error: pointer ‘ptr’ may be used after ‘realloc’ [-Werror=use-after-free]
56 |                 ret = realloc(ptr, size);
|                       ^~~~~~~~~~~~~~~~~~
subcmd-util.h:52:21: note: call to ‘realloc’ here
52 |         void *ret = realloc(ptr, size);
|                     ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [/home/bhavishya-yadav/build/linux/linux/tools/build/ /home/bhavishya-yadav/build/linux/linux/tools/objtool/help.o] Error 1
make[3]: *** [Makefile:59: /home/bhavishya-yadav/build/linux/linux/tools/objtool/libsubcmd-in.o] Error 2
make[2]: *** [Makefile:63: /home/bhavishya-yadav/build/linux/linux/tools/objtool/libsubcmd.a] Error 2
make[1]: *** [Makefile:69: objtool] Error 2
make: *** [Makefile:1372: tools/objtool] Error 2

i was able to compile the same on mint 20.3 via liveboot .

Kernel: 5.15.13-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/boot/vmlinuz-linux-zen
root=UUID=56c1bbae-2405-497d-b677-8c1729c71be9 rw quiet quiet splash
rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
pcie_aspm=off ath10k_core.skip_otp=y ibt=off
Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2
dm: SDDM Distro: Garuda Linux base: Arch Linux
Type: Laptop System: Dell product: Vostro 3491 v: N/A
serial: <superuser required> Chassis: type: 10 serial: <superuser required>
Mobo: Dell model: 073DJG v: A00 serial: <superuser required> UEFI: Dell
v: 1.26.0 date: 03/13/2023
ID-1: BAT0 charge: 31.1 Wh (100.0%) condition: 31.1/42.0 Wh (73.9%)
volts: 12.7 min: 11.4 model: SMP DELL VM73297 type: Li-poly serial: <filter>
status: full
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse serial: <filter>
charge: 55% (should be ignored) rechargeable: yes status: discharging
Info: model: Intel Core i3-1005G1 bits: 64 type: MT MCP arch: Ice Lake
gen: core 10 level: v4 note: check built: 2019-21 process: Intel 10nm
family: 6 model-id: 0x7E (126) stepping: 5 microcode: 0xBA
Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
L1: 160 KiB desc: d-2x48 KiB; i-2x32 KiB L2: 1024 KiB desc: 2x512 KiB
L3: 4 MiB desc: 1x4 MiB
Speed (MHz): avg: 2854 high: 3400 min/max: 400/3400 scaling:
driver: intel_pstate governor: performance cores: 1: 2467 2: 2817 3: 3400
4: 2734 bogomips: 9523
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Device-1: Intel Iris Plus Graphics G1 vendor: Dell driver: i915 v: kernel
arch: Gen-11 process: Intel 10nm built: 2019-21 ports: active: eDP-1
empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:8a56 class-ID: 0300
Device-2: Microdia Integrated_Webcam_HD driver: uvcvideo type: USB
rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-6:4 chip-ID: 0c45:671e
class-ID: 0e02
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
compositor: kwin_x11 driver: X: loaded: modesetting
alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
s-diag: 414mm (16.31")
Monitor-1: eDP-1 model: AU Optronics 0xb68d built: 2019 res: 1366x768
hz: 60 dpi: 112 gamma: 1.2 size: 309x173mm (12.17x6.81") diag: 354mm (13.9")
ratio: 16:9 modes: 1366x768
API: OpenGL v: 4.6 Mesa 23.1.3 renderer: Mesa Intel UHD Graphics (ICL GT1)
direct-render: Yes
Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Dell
driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_icl
bus-ID: 00:1f.3 chip-ID: 8086:34c8 class-ID: 0403
API: ALSA v: k5.15.13-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 0.3.71 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Dell driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
port: 3000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp1s0 state: down mac: <filter>
Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
vendor: Dell driver: ath10k_pci v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 bus-ID: 02:00.0 chip-ID: 168c:0042 class-ID: 0280
IF: wlp2s0 state: up mac: <filter>
Device-1: Qualcomm Atheros driver: btusb v: 0.8 type: USB rev: 2.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-10:5 chip-ID: 0cf3:e009
class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 1 state: down
bt-service: enabled,running rfk-block: hardware: no software: yes
address: <filter>
Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
v: 3.0 port: 4060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Local Storage: total: 931.51 GiB used: 60.82 GiB (6.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM035-1RK172
size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 5400 serial: <filter> fw-rev: 1002 scheme: GPT
ID-1: / raw-size: 97.66 GiB size: 95.56 GiB (97.86%) used: 28.02 GiB (29.3%)
fs: ext4 dev: /dev/sda2 maj-min: 8:2
ID-2: /boot/efi raw-size: 378 MiB size: 377.2 MiB (99.80%)
used: 62.3 MiB (16.5%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 27.18 GiB size: 26.59 GiB (97.81%)
used: 15.27 GiB (57.4%) fs: ext4 dev: /dev/sda5 maj-min: 8:5
Kernel: swappiness: 10 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: file size: 6 GiB used: 0 KiB (0.0%) priority: 1
file: /Swap-Garuda
ID-2: swap-2 type: zram size: 7.54 GiB used: 746.2 MiB (9.7%)
priority: 100 dev: /dev/zram0
System Temperatures: cpu: 62.0 C mobo: N/A
Fan Speeds (RPM): cpu: 2571
Processes: 206 Uptime: 2h 6m wakeups: 3 Memory: available: 7.54 GiB
used: 4.1 GiB (54.3%) Init: systemd v: 253 default: graphical
tool: systemctl Compilers: gcc: 13.1.1 clang: 15.0.7 Packages: pm: pacman
pkgs: 1877 libs: 527 tools: octopi,paru,yay Shell: fish v: 3.6.1
default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.27
Garuda (2.6.16-1):
System install date:     2023-06-21
Last full system update: 2023-06-30 ↻
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       No/Undetected
Failed units:            snapper-cleanup.service
[WARN] - (starship::utils): Executing command "/usr/bin/git" timed out.
[WARN] - (starship::utils): You can set command_timeout in your config to a higher value to allow longer-running commands to keep executing.

Mint is using an older version of gcc that is a little less picky about the (safe) use of pointers.

The options are to use an older compiler version or edit the source code to fix the errors(2). There may be a way to disable or limit [-Werror=use-after-free] checking.

Best to check or their forum on how best to proceed.


Which kernel? If it's "linux" you might be better off trying "linux-zen." I'm not sure the normal kernel has the needed modules. Waydroid - ArchWiki

i am compiling for android x86 , i could not find it pre compiled so i need to compile it on my own and i like zen .

thanks for pointing it out , i am compiling with clang this time and its working fine bzImage is done waiting for the modules . Lets hope it boots .

1 Like

Arch no longer produces x86 packages--now solely x86_64--except for necessary libs such as Steam requires. It's been that way for several years, now.

But I know not the ways of the 'droid. :sigh:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.