Open EvanKrall opened 1 year ago
Oof. The basic situation here is:
llama
has to ensure that any other files it depends on are also present in the Lambda instance.gcc
and clang
) to discover those dependencies.LLAMACC_REMOTE_ASSEMBLE
is not enabled by default. That option only affects assembly source files (.S
); we still assemble the output of the C compiler remotely, because the C compiler does not use assembly-level include mechanisms.The obvious avenues to fix are:
.include
/ .incbin
dependencies along. I'm not sure how hard that is.First things first, llama is awesome, thanks @nelhage!
I'm running into the same issue while trying to rebuild a Ubuntu x86 kernel from their Ubuntu-6.5.0-25.25 tag, no cross-compilation involved. It fails with the following:
/tmp/ccplWhxP.s: Assembler messages:
/tmp/ccplWhxP.s:10: Error: file not found: kernel/kheaders_data.tar.xz
And it's the same problem, really:
$ git grep kheaders_data.tar.xz
kernel/kheaders.c:23:" .incbin \"kernel/kheaders_data.tar.xz\" \n"
Tempted to grep for .incbin
in llamacc
and have it do the local build if it finds it...
I've added the workaround you were suggesting, but taking a big hammer approach of always doing the local build if it fails, keyed off by default under a new environment variable LLAMACC_LOCAL_FALLBACK=1. Tested both with/without and it did for my build.
I'm working on a Raspberry Pi project, and I often need to recompile the kernel for it. I've been cross-compiling from my (fairly old; i7-6500U) intel box, so llama seems like it should save me a bunch of time.
I've got this sorta working. I've got a directory
_toolchain
with two scripts in it:_toolchain/activate
(which yousource
like you would to activate a python virtualenv):_toolchain/aarch64-linux-gnu-gcc
:As well as this Dockerfile at
images/gcc-aarch64-linux-gnu-jammy/Dockerfile
:(and, of course,
gcc-aarch64-linux-gnu
installed locally on my local box, which is also running jammy.)Much of the build seems to work, but I'm getting stuck building the
configs
module:LLAMACC_REMOTE_ASSEMBLE
is unset, so I'm not sure why it's trying to assemble remotely. I guess becausekernel/configs.c
has an inline assembly block:With
LLAMACC_VERBOSE=1
: gist because github doesn't like comments over 65kNotably, I don't see anything about kernel/config_data.gz in the
LLAMACC_VERBOSE
output. The file does exist locally.Calling
LLAMACC_LOCAL=1 make kernel/configs.o
succeeds, and seems to allow the rest of the build to continue. :tada: