Closed oprypin closed 4 years ago
What is missing in the llvm-8 package that is needed for cross-compiling to windows?
make libcrystal
Makefile:55: *** Could not locate llvm-config, make sure it is installed and in your PATH, or set LLVM_CONFIG. Stop
Wait, that's part of llvm-8
, not necessarily llvm-8-dev
.
Was I confused? Is llvm just not installed on those images?
The logs here are very interesting https://github.com/oprypin/crystal/runs/606062333#step:4:29
llvm-8
also pulls in llvm-8-dev
?llvm-8
is part of NEW packages
so apparently it's not installed?Well to me it would make sense to have to kinds of images, one lightweight for using the compiler normally (targeted at the majority of crystal users and CIs for their projects) and one with all the bells and whistles that allow one to recompile the compiler (targeted at compiler devs and the compiler CIs).
I don't use docker though, so no clue what's the current landscape.
Ah that's fine. I was just under the assumption that the image already has LLVM, but without the headers, which would be a tiny addition. But perhaps not.
@jhass That's already the case. There are separate runtime and build images.
@oprypin You need to use crystallang/crystal:0.34.0-build
to get the build image with LLVM.
Ooh maybe I'll try that and it will just work
Yes, thanks. Works in https://github.com/crystal-lang/crystal/pull/9155
This and https://github.com/crystal-lang/distribution-scripts/issues/60#issuecomment-617334835 shows that the base assumption of this issue is incorrect. Everything is good.
To clarify:
It would be nice to not have to install llvm-8-dev when working on Crystal itself in the docker image.
E.g. eliminate this installation step here https://github.com/crystal-lang/crystal/runs/597246816#step:4:1 https://github.com/crystal-lang/crystal/actions/runs/81290075/workflow#L12
Only llvm-8 is provided, though:
https://github.com/crystal-lang/distribution-scripts/blob/cfe843ff938697174afea976f4499fef806b5286/docker/ubuntu.Dockerfile#L24
The -dev package should be a small difference.