JuliaLang / JuliaLang/PackageCompiler.jl
create_app copies entire contents of `/usr/lib` into `app_name/lib` on archlinux
- Dominant language
- Julia
- Stars
- 1.6k
- Forks
- 205
- Avg merge
- 18h 37m
- Merged PRs (30d)
- 7
Description
turns out this behavior isn't exactly desired lol. So the way archlinux packages julia is to install the libs like:
```
> yay -Ql julia
...
julia /usr/lib/julia/
julia /usr/lib/julia/libccalltest.so
julia /usr/lib/julia/libccalltest.so.debug
julia /usr/lib/julia/libdSFMT.so
julia /usr/lib/julia/libllvmcalltest.so
julia /usr/lib/julia/libsuitesparse_wrapper.so
julia /usr/lib/julia/sys.so
julia /usr/lib/libjulia.so (symlink)
julia /usr/lib/libjulia.so.1 (symlink)
julia /usr/lib/libjulia.so.1.5 (actual library)
...
```
But in PackageCompiler.jl in [create_sysimg_from_object_file](https://github.com/JuliaLang/PackageCompiler.jl/blob/master/src/PackageCompiler.jl#L454) the julia install dir is calculated as `julia_libdir = dirname(Libdl.dlpath("libjulia"))`, which because `libjulia.so` is inside `/usr/lib` directly causes `julia_libdir` to get set to `/usr/bin/../lib`, aka `/usr/lib`.
Maybe there's a better check to be done about what libraries to copy? Or if arch is breaking the packaging location rules of julia please link me where these are defined so I can take that back to them and have it changed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/PackageCompiler.jl at create_sysimg_from_object_file, where julia_libdir is calculated from Libdl.dlpath("libjulia"). Reproduce create_app on Arch Linux and trace which files are copied from /usr/lib; done means the generated app no longer copies unrelated system-library contents while retaining the Julia libraries it needs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100