Open RossComputerGuy opened 5 months ago
@RossComputerGuy An error must be present, please post full logs to a pastebin service.
@Titaniumtown I looked through and no error besides that one make mentions. Garnix run confirms that too https://garnix.io/build/jgN5KqQ9 on the nixpkgs LLVM workspace project.
@RossComputerGuy Found your error here with the logs you provided:
CC [M] drivers/acpi/acpi_extlog.mod.o
LD arch/x86/boot/setup.elf
x86_64-unknown-linux-gnu-ld: error: ../arch/x86/boot/setup.ld:15: unable to move location counter backward for: .bstext
x86_64-unknown-linux-gnu-ld: error: ../arch/x86/boot/setup.ld:15: unable to move location counter backward for: .bstext
x86_64-unknown-linux-gnu-ld: error: ../arch/x86/boot/setup.ld:15: unable to move location counter backward for: .bstext
make[2]: *** [../arch/x86/boot/Makefile:107: arch/x86/boot/setup.elf] Error 1
make[1]: *** [../arch/x86/Makefile:283: bzImage] Error 2
make[1]: *** Waiting for unfinished jobs....
CC [M] drivers/acpi/acpi_configfs.mod.o
CC [M] drivers/clk/xilinx/xlnx_vcu.mod.o
CC [M] drivers/clk/clk-cdce706.mod.o
CC [M] drivers/clk/clk-cs2000-cp.mod.o
CC [M] drivers/clk/clk-lmk04832.mod.o
CC [M] drivers/clk/clk-max9485.mod.o
How far into the build was that? I had a hard time finding it when I was building locally.
Near the end; I would recommend checking logs and grepping for error
for future reference.
Found this thread which seems to be related: https://www.linuxquestions.org/questions/slackware-14/error-building-kernel-6-1-44-on-current-with-clang-4175727865/
Looks like we'll have to get this patch in: https://lore.kernel.org/lkml/20230809-gds-v1-1-eaac90b0cbcc@google.com/
One possible option to fix this is also to add some -static
to relevant places in the Linux kernel. The way the ld wrapper the dynamic linking magic is turned off when there is an explicit -static
on the command line.
E.g. here: https://github.com/torvalds/linux/blob/master/arch/x86/boot/Makefile#L91
Other architectures in the Linux kernel actually do that. :thinking:
There's already a kernel patch which does implement some flags. However, it doesn't look like it's going to be accepted so I wonder if a patch which adds static would get accepted. The current idea right now is to get ld wrapper to remove the dynamic linker flag when not needed and/or get LLVM lld to have similar behavior to GNU ld.
Steps To Reproduce
Steps to reproduce the behavior:
pkgsLLVM.linux
Build log
Note: error message is not present and could not be found even with scrolling for several hundred lines.
Additional context
Builds on aarch6-linux, x86_64-linux fails.
Notify maintainers
@TredwellGit @Ma27 @NeQuissimus @alyssais @thoughtpolice
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.