Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PackageCompiler requires 7z #142

Open
benegee opened this issue Oct 25, 2023 · 8 comments
Open

PackageCompiler requires 7z #142

benegee opened this issue Oct 25, 2023 · 8 comments
Labels
documentation Improvements or additions to documentation

Comments

@benegee
Copy link
Collaborator

benegee commented Oct 25, 2023

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`,...
@benegee benegee added the documentation Improvements or additions to documentation label Oct 25, 2023
@sloede
Copy link
Member

sloede commented Oct 25, 2023

Where was this reported?

@benegee
Copy link
Collaborator Author

benegee commented Oct 25, 2023

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

@sloede
Copy link
Member

sloede commented Oct 25, 2023

Is this Roci?

@benegee
Copy link
Collaborator Author

benegee commented Oct 25, 2023

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

@benegee
Copy link
Collaborator Author

benegee commented Oct 25, 2023

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
Copy link
Member

sloede commented Oct 25, 2023

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
Copy link

mashu commented Oct 25, 2023

I think I might have similar issue

  • App works just fine on my laptop where I build a tool
  • App does not work on the common server we use in a group

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
Copy link
Collaborator Author

benegee commented Oct 27, 2023

Just to document what I tried:

  • libtrixi on clean main branch
  • cd LibTrixi.jl/lib
  • JULIA_PKG_DEVDIR=./dev julia --project=. -e 'import Pkg; Pkg.develop("PackageCompiler")'
  • cd dev/PackageCompiler
  • git switch msl/bundle-libexec
  • cd ../..
  • set path to libtrixi-julia project directory in Makefile
  • make
  • ls -l build/libexec/julia/7z (exists!)
  • cd ../../examples
  • make -f MakefileCompiled LIBTRIXI_PREFIX=$PWD/../LibTrixi.jl/lib/build
  • JULIA_DEPOT_PATH=./non-exisiting ./trixi_controller_simple_c ./non-existing ../LibTrixi.jl/examples/libelixir_tree2d_dgsem_advection_amr.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/bgeihe/.julia/packages/MKL_jll/8Hu7G/Artifacts.toml'.
    
    
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants