trixi-framework / libtrixi

Interface library for using Trixi.jl from C/C++/Fortran
https://trixi-framework.github.io/libtrixi/
MIT License
3 stars 1 forks source link

PackageCompiler requires 7z #142

Open benegee opened 1 year ago

benegee commented 1 year ago

If you do not have it installed, you might see something like:

~/libtrixi_main/examples (main *) $ ./trixi_controller_simple_c ~/install/libtrixi-julia ../LibTrixi.jl/examples/libelixir_p4est2d_dgsem_euler_sedov.jl

*** Trixi controller ***   Initialize Trixi
  Downloaded artifact: MKL
  Downloaded artifact: MKL
fatal: error thrown and no exception handler available.
InitError(mod=:MKL_jll, error=ErrorException("Unable to automatically download/install artifact 'MKL' from sources listed in '/home/bene/.julia/packages/MKL_jll/8Hu7G/Artifacts.toml'.
Sources attempted:
- https://pkg.julialang.org/artifact/d670351e2fcdac07d02cf73bda5f53e9bea796a6
    Error: IOError: could not spawn setenv(`7z x /tmp/jl_KNK5I7o7of-download.gz -so`,...
sloede commented 1 year ago

Where was this reported?

benegee commented 1 year ago

I am sure that things had worked at some point on the same machine without 7z.

sloede commented 1 year ago

Is this Roci?

benegee commented 1 year ago

No, this was on my machine. I would assume roci and the github runners have 7z installed.

benegee commented 1 year ago

It seems strange to me, though, because before I tried PackageCompiler (and installed p7zip) I ran libtrixi-init-julia, which reported

 MKL_jll [856f044c-d86e-5d09-b602-aeab76dc8ba7]
│   Downloading artifact: MKL
└

without errors.

sloede commented 1 year ago

Yes, PackageCompiler does not bundle the 7z library, while Julia itself does. Maybe it needs to be included in the libraries that are bundled by PC with libraries/apps - I had a discussion with Kristoffer Carlsson of JuliaHub about this on Slack today.

mashu commented 1 year ago

I think I might have similar issue

I had similar error with MKL being downloaded and then program crashing as it wasn't unable to find MKL and load it. Build app with include_transitive_dependencies=false seems to have helped to solve the issue.

benegee commented 1 year ago

Just to document what I tried:

Full error message ``` *** Trixi controller *** Initialize Trixi Downloaded artifact: MKL Downloaded artifact: MKL fatal: error thrown and no exception handler available. InitError(mod=:MKL_jll, error=ErrorException("Unable to automatically download/install artifact 'MKL' from sources listed in '/home/bgeihe/.julia/packages/MKL_jll/8Hu7G/Artifacts.toml'. Sources attempted: - https://pkg.julialang.org/artifact/d670351e2fcdac07d02cf73bda5f53e9bea796a6 Error: IOError: could not spawn setenv(`7z x /tmp/jl_bS1IVKzUdg-download.gz -so`,["PATH=:/opt/valgrind/bin:/opt/paraview/5.9.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/julia/bin:/usr/local/cuda-11.2/bin:/opt/codon/bin", "PWD=/home/bgeihe/libtrixi/examples", "XDG_SESSION_CLASS=user", "XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop", "SHELL=/bin/bash", "SSH_CONNECTION=89.0.59.168 48994 134.95.213.116 22", "LD_LIBRARY_PATH=/mnt/ssd/home/bgeihe/libtrixi/examples/../lib/julia:/mnt/ssd/home/bgeihe/libtrixi/examples/../lib", "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/28745/bus", "MOTD_SHOWN=pam", "LANG=en_US.UTF-8", "LOGNAME=bgeihe", "SHLVL=1", "XDG_RUNTIME_DIR=/run/user/28745", "XDG_SESSION_ID=6307", "OLDPWD=/home/bgeihe/libtrixi", "SCRATCH=/mnt/hd1/scratch/bgeihe", "SSH_CLIENT=89.0.59.168 48994 22", "XDG_SESSION_TYPE=tty", "_=./trixi_controller_simple_c", "JULIA_LOAD_PATH=/mnt/ssd/home/bgeihe/libtrixi/LibTrixi.jl/lib/build/share/julia", "OPENBLAS_DEFAULT_NUM_THREADS=1", "USER=bgeihe", "SSH_TTY=/dev/pts/6", "HOME=/home/bgeihe", "TERM=xterm-256color", "JULIA_DEPOT_PATH=/mnt/ssd/home/bgeihe/libtrixi/LibTrixi.jl/lib/build/share/julia", "OPENBLAS_MAIN_FREE=1"]): no such file or directory (ENOENT) - https://github.com/JuliaBinaryWrappers/MKL_jll.jl/releases/download/MKL-v2023.2.0+0/MKL.v2023.2.0.x86_64-linux-gnu.tar.gz Error: IOError: could not spawn setenv(`7z x /tmp/jl_ZMR6nuJ8Te-download.gz -so`,["PATH=:/opt/valgrind/bin:/opt/paraview/5.9.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/julia/bin:/usr/local/cuda-11.2/bin:/opt/codon/bin", "PWD=/home/bgeihe/libtrixi/examples", "XDG_SESSION_CLASS=user", "XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop", "SHELL=/bin/bash", "SSH_CONNECTION=89.0.59.168 48994 134.95.213.116 22", "LD_LIBRARY_PATH=/mnt/ssd/home/bgeihe/libtrixi/examples/../lib/julia:/mnt/ssd/home/bgeihe/libtrixi/examples/../lib", "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/28745/bus", "MOTD_SHOWN=pam", "LANG=en_US.UTF-8", "LOGNAME=bgeihe", "SHLVL=1", "XDG_RUNTIME_DIR=/run/user/28745", "XDG_SESSION_ID=6307", "OLDPWD=/home/bgeihe/libtrixi", "SCRATCH=/mnt/hd1/scratch/bgeihe", "SSH_CLIENT=89.0.59.168 48994 22", "XDG_SESSION_TYPE=tty", "_=./trixi_controller_simple_c", "JULIA_LOAD_PATH=/mnt/ssd/home/bgeihe/libtrixi/LibTrixi.jl/lib/build/share/julia", "OPENBLAS_DEFAULT_NUM_THREADS=1", "USER=bgeihe", "SSH_TTY=/dev/pts/6", "HOME=/home/bgeihe", "TERM=xterm-256color", "JULIA_DEPOT_PATH=/mnt/ssd/home/bgeihe/libtrixi/LibTrixi.jl/lib/build/share/julia", "OPENBLAS_MAIN_FREE=1"]): no such file or directory (ENOENT) ")) error at ./error.jl:35 jfptr_error_29797 at /mnt/ssd/home/bgeihe/libtrixi/LibTrixi.jl/lib/build/lib/libtrixi.so.0.1 (unknown line) _jl_invoke at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined] ijl_apply_generic at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2940 #ensure_artifact_installed#23 at /mnt/hd1/opt/julia/1.9.3/share/julia/stdlib/v1.9/Pkg/src/Artifacts.jl:443 ensure_artifact_installed at /mnt/hd1/opt/julia/1.9.3/share/julia/stdlib/v1.9/Pkg/src/Artifacts.jl:387 unknown function (ip: 0x7fb4bd9ed1b2) _jl_invoke at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined] ijl_apply_generic at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2940 #ensure_artifact_installed#22 at /mnt/hd1/opt/julia/1.9.3/share/julia/stdlib/v1.9/Pkg/src/Artifacts.jl:383 unknown function (ip: 0x7fb4bd9de78f) _jl_invoke at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined] ijl_apply_generic at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2940 ensure_artifact_installed at /mnt/hd1/opt/julia/1.9.3/share/julia/stdlib/v1.9/Pkg/src/Artifacts.jl:372 unknown function (ip: 0x7fb4bd9de51d) _jl_invoke at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined] ijl_apply_generic at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2940 _artifact_str at /mnt/hd1/opt/julia/1.9.3/share/julia/stdlib/v1.9/Artifacts/src/Artifacts.jl:551 unknown function (ip: 0x7fb4bd9d9498) _jl_invoke at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined] ijl_apply_generic at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2940 jl_apply at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/julia.h:1880 [inlined] jl_f__call_latest at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/builtins.c:774 #invokelatest#2 at ./essentials.jl:819 [inlined] invokelatest at ./essentials.jl:816 [inlined] macro expansion at /mnt/hd1/opt/julia/1.9.3/share/julia/stdlib/v1.9/Artifacts/src/Artifacts.jl:703 [inlined] find_artifact_dir at /home/bgeihe/.julia/packages/JLLWrappers/pG9bm/src/wrapper_generators.jl:17 [inlined] __init__ at /home/bgeihe/.julia/packages/MKL_jll/8Hu7G/src/wrappers/x86_64-linux-gnu.jl:9 jfptr___init___68179 at /mnt/ssd/home/bgeihe/libtrixi/LibTrixi.jl/lib/build/lib/libtrixi.so.0.1 (unknown line) _jl_invoke at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2758 [inlined] ijl_apply_generic at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/gf.c:2940 jl_apply at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/julia.h:1880 [inlined] jl_module_run_initializer at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/toplevel.c:75 _finish_julia_init at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/init.c:855 julia_init at /cache/build/default-amdci5-5/julialang/julia-release-1-dot-9/src/init.c:804 trixi_initialize at /mnt/ssd/home/bgeihe/libtrixi/LibTrixi.jl/lib/build/lib/libtrixi.so.0.1 (unknown line) main at ./trixi_controller_simple_c (unknown line) __libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) _start at ./trixi_controller_simple_c (unknown line) ```