PackageCompiler.jl icon indicating copy to clipboard operation
PackageCompiler.jl copied to clipboard

Could PackageCompiler install a compiler when run on Linux?

Open PGS62 opened this issue 2 years ago • 4 comments

When running PackageCompiler under Windows, "A suitable compiler will be automatically installed the first time it is needed". However, that's not the case on Linux or MacOS. So my suggestion is to make PackageCompiler do the automatic installation of a compiler if that's necessary when running on Linux or MacOS.

For my current project, which includes automated creation of a system image, that would make things simpler.

PGS62 avatar Dec 07 '21 18:12 PGS62

It could download one on demand if it doesn't find a local one.

KristofferC avatar Dec 13 '21 20:12 KristofferC

@staticfloat On non-Windows systems, could we lazily download Clang_jll?

DilumAluthge avatar Jan 06 '22 20:01 DilumAluthge

Yes, but the complexity is that we don't just need a compiler, we also need the supporting libc and header files and whatnot. While we have those collected for BinaryBuilder already, it's not in a very modular, easy-to-get format. It's something I've been wanting to work on for a while, but realistically is many months away from being at the top of my TODO list.

staticfloat avatar Jan 06 '22 20:01 staticfloat

FWIW, zig cc is very much worth looking at in this context, if folks here haven't already: https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html

Not necessarily as a dependency, but for some of the techniques they've used -- eg they've done some interesting things with export tables to minimize shipped binary size while still supporting multi-targeting a wide range of glibc versions.

ihnorton avatar Jan 10 '22 15:01 ihnorton