Can't build OS image with Scons. Where i made mistake? [FIXED]

72 Views Asked by At

i'm trying to studying in OS development but now have some troubles with SConstruct scripting. First at all, i'm follow the YT tutorial of OS development.

(Link: https://www.youtube.com/watch?v=ohT59ZfXo6k&list=PLFjM7v6KGMpiH2G-kT781ByCNC_0pKpPN&index=18&ab_channel=nanobyte)

And now stopped in the middle of Live, where SCons replace make files.

My tool chain: gcc 13.1.0 + binutils 2.39 (during building with .mk i not getting any problems (In-build gcc is 11.4.0 and binutils 2.38))

SConstruct code taken from source tutorial repository: https://github.com/nanobyte-dev/nanobyte_os/tree/master

All scripts with building are same that I have. But anyway I'm getting an error every time.

Main SConstruct script: https://github.com/nanobyte-dev/nanobyte_os/blob/master/SConstruct

First stage script: https://github.com/nanobyte-dev/nanobyte_os/blob/master/src/bootloader/stage1/SConscript

Second stage script: https://github.com/nanobyte-dev/nanobyte_os/blob/master/src/bootloader/stage2/SConscript

Image creation script: https://github.com/nanobyte-dev/nanobyte_os/blob/master/image/SConscript

I'm getting next error.

> scons: Reading SConscript files ... scons: done reading SConscript
> files. scons: Building targets ... Assembling
> [src/boot_loader/fst_stg/boot.asm] Linking   
> [build/i686_debug/fst_stg_fat12/fst_stg.bin] i686-elf-gcc: fatal
> error: '-fuse-linker-plugin', but liblto_plugin.so not found
> compilation terminated. scons: ***
> [build/i686_debug/fst_stg_fat12/fst_stg.bin] Error 1 scons: building
> terminated because of errors.

My ubuntu distro is Ubuntu 22.04.3 LTS

Also with locate i can see that liblto_plugin.so in my tool chain:

.../tool_chain/gcc-build-13.1.0/gcc/liblto_plugin.so
.../tool_chain/gcc-build-13.1.0/lto-plugin/.libs/liblto_plugin.so
.../tool_chain/i686-elf/libexec/gcc/i686-elf/13.1.0/liblto_plugin.so

UPDATE

I fix this issue by installing another linux distributive (Was Ubuntu -> Now it is Fedora)

0

There are 0 best solutions below