coconut-svsm / svsm

COCONUT-SVSM
MIT License
113 stars 39 forks source link

SVSM build failed #430

Open gramakreddy2024 opened 2 months ago

gramakreddy2024 commented 2 months ago

~/coconut-svsm/svsm$ FW_FILE=/home/amd/coconut-svsm/edk2/Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd make cargo build --manifest-path kernel/Cargo.toml --no-default-features --bin stage2 Compiling svsm v0.1.0 (/home/amd/coconut-svsm/svsm/kernel) Finished dev profile [unoptimized + debuginfo] target(s) in 1.12s objcopy -O binary "target/x86_64-unknown-none/debug/stage2" bin/stage2.bin touch bin/svsm-fs.bin cargo build --features "default" --bin svsm Compiling svsm v0.1.0 (/home/amd/coconut-svsm/svsm/kernel) Finished dev profile [unoptimized + debuginfo] target(s) in 1.43s objcopy -O elf64-x86-64 --strip-unneeded "target/x86_64-unknown-none/debug/svsm" bin/svsm-kernel.elf ln -sf svsm-kernel.elf bin/kernel.elf cc -c -DLOAD_STAGE2 -o stage1/stage1.o stage1/stage1.S rm -f bin/kernel.elf ./utils/gen_meta bin/meta.bin cc -c -o stage1/reset.o stage1/reset.S cc -o bin/stage1 stage1/stage1.o stage1/reset.o -nostdlib -Wl,--build-id=none -Wl,-Tstage1/stage1.lds -no-pie /usr/bin/ld: section .init LMA [00000000fffffe00,00000000ffffffff] overlaps section .data LMA [00000000fffff000,00000001002c664b] stage1/stage1.o: in function startup_32': (.startup.text+0x2d): relocation truncated to fit: R_X86_64_32 against.data' (.startup.text+0x40): relocation truncated to fit: R_X86_64_32 against .data' (.startup.text+0x47): relocation truncated to fit: R_X86_64_32 against.data' (.startup.text+0x4e): relocation truncated to fit: R_X86_64_32 against .data' (.startup.text+0x55): relocation truncated to fit: R_X86_64_32 against.data' collect2: error: ld returned 1 exit status make: *** [Makefile:148: bin/stage1] Error 1

Any suggestions.

I am using GCC 13.1.0

Must be missing something on my host to build successfully.

ramagali24 commented 2 months ago

Issue with Ubuntu OS version. I was using earlier 22.04 and moved to 24.04 and no compilation issues.