-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure: pkgsLLVM.kexec-tools #317526
Comments
|
need to edit kexec-tools = callPackage ../os-specific/linux/kexec-tools {
# clangStdenv fails with
# purgatory/arch/i386/entry32-16.S:23:2: error: unknown directive
# .arch i386
# ^
# purgatory/arch/i386/entry32-16.S:115:11: error: unknown token in expression
# ljmp %cs:*(realdest - entry16)
# ^
# make: *** [Makefile:128: purgatory/arch/i386/entry32-16.o] Error 1
stdenv = gccStdenv;
}; will get past configure but fails at link step for a different reason |
Looks like clang doesn't understand the assembly syntax kexec-tools uses which appears to be the GNU/GCC style. I see pixman has had a similar problem before which the solution for them is to disable assembly. We don't have that luxury here. We have two solutions but both requires patches:
With the first one, it sounds like ARM has something called UAL (Unified Assembly Language) so we might be able to use that. With the second one, it looks like kexec-tools just uses the CC for the assembler so we would have to patch the Makefiles. Personally, I think the 2nd option is the best here but it looks like this is a part of the Linux kernel git server I think inquiring upstream to look into this is not a bad idea. |
on x64 linux with
though |
@paparodeo Yeah, I see that error as well but on aarch64-linux. Not sure why it failed to link things right. |
I was able to use
|
I have discovered that adding |
i guess the clang linker is not happy. i can build fine using |
Doesn't work for me. I still get the same error during the build phase. |
? |
Oh no, I'm doing: |
I made a patch for one of the Makefiles and applying the |
seems like an lld problem. it is searching for '.so' files when building a relocatable image but should be searching for error is coming from: case file_magic::elf_shared_object: {
if (config->isStatic || config->relocatable) {
error("attempted static link of dynamic object " + path);
return;
} diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp
index ac7460440..77214aa36 100644
--- a/lld/ELF/DriverUtils.cpp
+++ b/lld/ELF/DriverUtils.cpp
@@ -234,7 +234,7 @@ std::optional<std::string> elf::findFromSearchPaths(StringRef path) {
// search paths.
std::optional<std::string> elf::searchLibraryBaseName(StringRef name) {
for (StringRef dir : config->searchPaths) {
- if (!config->isStatic)
+ if (!(config->isStatic || config->relocatable))
if (std::optional<std::string> s = findFile(dir, "lib" + name + ".so"))
return s;
if (std::optional<std::string> s = findFile(dir, "lib" + name + ".a")) filed llvm/llvm-project#94958 also, i'm not sure that linking with |
Steps To Reproduce
Steps to reproduce the behavior:
pkgsLLVM.kexec-tools
Build log
Additional context
Add any other context about the problem here.
Notify maintainers
No maintainers, pinging @felixsinger from
git blame
.Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: