Opened 3 years ago

Closed 3 years ago

#850 closed defect (duplicate)

Uniprocessor ia32/amd64 build is broken

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone: 0.12.1
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on: #820
See also:

Description

As of HelenOS master, Jan 11 2022, if CONFIG_SMP=n for ia32 or amd64, the build fails:

[jirka@omelette build]$ ninja image_path
[2/1377] Linking target kernel/kernel.1.elf
FAILED: kernel/kernel.1.elf 
/usr/local/cross/bin/amd64-helenos-gcc  -o kernel/kernel.1.elf kernel/kernel.1.elf.p/meson-generated_.._empty_map.S.o -Wl,--as-needed -Wl,--no-undefined -Wl,--whole-archive -Wl,--start-group kernel/libinstrumentables.a kernel/libnoninstrumentables.a -Wl,--end-group -Wl,--no-whole-archive -Wl,--gc-sections -Wl,--warn-common -Wl,--fatal-warnings -O3 -fexec-charset=UTF-8 -finput-charset=UTF-8 -Wa,--fatal-warnings -Wall -Wextra -Werror-implicit-function-declaration -Wwrite-strings -Wunknown-pragmas -Wno-unused-parameter -pipe -ffunction-sections -fno-common -fdebug-prefix-map=/data/helenos/master=. -Wsystem-headers -fvar-tracking-assignments -Werror -Wmissing-prototypes -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -Wno-clobbered -Wno-nonnull-compare -fno-builtin-strftime -D__LE__ -fno-omit-frame-pointer -mno-sse -mno-sse2 -mcmodel=kernel -mno-red-zone -fno-unwind-tables -march=opteron -imacros /data/helenos/master/build/config.h -D_HELENOS_SOURCE -DKERNEL -DHELENOS_RELEASE=0.11.2 '-DHELENOS_COPYRIGHT=Copyright (c) 2001-2021 HelenOS project' -DHELENOS_CODENAME=Kiev -D__64_BITS__ -ffreestanding -Wno-cast-function-type -Wl,-z,max-page-size=0x1000 -nostdlib -Wl,--no-gc-sections -Wl,--nmagic -T /data/helenos/master/build/kernel/_link.ld -Wl,-Map,/data/helenos/master/build/kernel/kernel.1.elf.map
/usr/local/cross/lib/gcc/amd64-helenos/8.2.0/../../../../amd64-helenos/bin/ld:/data/helenos/master/build/kernel/_link.ld:27: undefined symbol `unmapped_ap_boot' referenced in expression
collect2: error: ld returned 1 exit status
[7/1377] Compiling C object uspace/lib/libc.so.0.0.p/c_generic_elf_elf_mod.c.o
ninja: build stopped: subcommand failed.

The error being:

../build/kernel/_link.ld:27: undefined symbol `unmapped_ap_boot' referenced in expression

Change History (3)

comment:1 by Jiri Svoboda, 3 years ago

The problem *only* happens if you first enable CONFIG_SMP, build and then change the configuration to CONFIG_SMP=n. kernel/_link.ld is not correctly rebuilt in this case and retains the #ifdef CONFIG_SMP section.

comment:2 by Jakub Jermář, 3 years ago

This sounds like a duplicate of #820.

comment:3 by Jiri Svoboda, 3 years ago

Depends on: #820
Resolution: duplicate
Status: newclosed

Closing as duplicate of #820.

Note: See TracTickets for help on using tickets.