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

Can not load KaHyPar shared object file #19

Closed
GiggleLiu opened this issue Jun 20, 2021 · 10 comments
Closed

Can not load KaHyPar shared object file #19

GiggleLiu opened this issue Jun 20, 2021 · 10 comments

Comments

@GiggleLiu
Copy link

GiggleLiu commented Jun 20, 2021

Julia v1.6.1, KaHyPar 0.2.0, Ubuntu 20.04

julia> using KaHyPar
[ Info: Precompiling KaHyPar [2a6221f6-aa48-11e9-3542-2d9e0ef01880]
ERROR: LoadError: InitError: could not load library "/home/leo/.julia/artifacts/1f9c17d74a12ed0de413318dd1f11e2379e4716f/lib/libkahypar.so"
libboost_program_options.so.1.71.0: cannot open shared object file: No such file or directory
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:114
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:114
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/bkwIo/src/products/library_generators.jl:54 [inlined]
  [4] __init__()
    @ KaHyPar_jll ~/.julia/packages/KaHyPar_jll/6UpOK/src/wrappers/x86_64-linux-gnu.jl:9
  [5] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:674
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:760
  [7] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:998
  [8] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:914
  [9] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:901
 [10] include
    @ ./Base.jl:386 [inlined]
 [11] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1213
 [12] top-level scope
    @ none:1
 [13] eval
    @ ./boot.jl:360 [inlined]
 [14] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [15] top-level scope
    @ none:1
during initialization of module KaHyPar_jll
in expression starting at /home/leo/.julia/packages/KaHyPar/YSKB3/src/KaHyPar.jl:1
ERROR: Failed to precompile KaHyPar [2a6221f6-aa48-11e9-3542-2d9e0ef01880] to /home/leo/.julia/compiled/v1.6/KaHyPar/jl_1aVynj.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY)
   @ Base ./loading.jl:1360
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1306
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1021
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:914
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:901

Note: I can fix it by typing

$ sudo apt-get install libboost-program-options-dev

Still wondering why the error took place. I just updated some packages.

@GiggleLiu
Copy link
Author

GiggleLiu commented Sep 6, 2021

My friend also see this error when using google cloud with OS: Debian 9.13. This might be related to specifying a specific version of boost. Why it searches the system path instead of using the boost_jll?

@GiggleLiu
Copy link
Author

GiggleLiu commented Sep 16, 2021

I find required lib file in the artifacts folder, maybe it is just an issue of look up path.

(base) ➜  artifacts find .|grep libboost_program
./9e486cf987b892f0435f3d745c329d3e7a038ab5/lib/libboost_program_options.so.1.76.0
./9e486cf987b892f0435f3d745c329d3e7a038ab5/lib/cmake/boost_program_options-1.76.0/libboost_program_options-variant-shared.cmake
./9e486cf987b892f0435f3d745c329d3e7a038ab5/lib/cmake/boost_program_options-1.76.0/libboost_program_options-variant-static.cmake
./9e486cf987b892f0435f3d745c329d3e7a038ab5/lib/libboost_program_options.so
./9e486cf987b892f0435f3d745c329d3e7a038ab5/lib/libboost_program_options.a
./9960e060b732618174ffd95804d6635833f99513/lib/cmake/boost_program_options-1.71.0/libboost_program_options-variant-shared.cmake
./9960e060b732618174ffd95804d6635833f99513/lib/cmake/boost_program_options-1.71.0/libboost_program_options-variant-static.cmake
./9960e060b732618174ffd95804d6635833f99513/lib/libboost_program_options.so.1.71.0
./9960e060b732618174ffd95804d6635833f99513/lib/libboost_program_options.so.1
./9960e060b732618174ffd95804d6635833f99513/lib/libboost_program_options.so.1.71
./9960e060b732618174ffd95804d6635833f99513/lib/libboost_program_options.so
./9960e060b732618174ffd95804d6635833f99513/lib/libboost_program_options.a
./1f9c17d74a12ed0de413318dd1f11e2379e4716f/logs/KaHyPar/update_rpath_libkahypar.so_libboost_program_options.so.1.71.0.log.gz
./1f9c17d74a12ed0de413318dd1f11e2379e4716f/logs/KaHyPar/update_linkage_libkahypar.so_libboost_program_options.so.1.71.0.log.gz

This problem make KaHyPar.jl installation unsuccessful in most hosts. So I think it is quite urgent. Since I know little about how the binaries are compiled. Can anyone help look into it?

@BarzegarAlireza
Copy link

I have the same issue. Have you found any solution?

@GiggleLiu
Copy link
Author

I have found a temporary solution:
For Ubuntu 20.04, this is fine, just install libboost-program-options-dev,
For older version, compile-install libboost > 1.7 and link the file to target file

sudo ln -s /usr/lib/libboost_program_options.so.1.7x.y /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.71.0

@jalving
Copy link
Member

jalving commented Oct 9, 2021

@GiggleLiu: I agree this is kind of urgent. I will try to take a look at this when I can find the time. Thanks for the temporary solution. I recently ran into this problem on an old Ubuntu 14.04 machine, and could not get it to work no matter what work-around I tried.

@GiggleLiu
Copy link
Author

GiggleLiu commented Oct 9, 2021

@jalving For older version Ubuntu, you need to compile and install latest libboost first, then you need to located the so file and link it to the required file. If this does not work, then I also have no idea.

@BarzegarAlireza
Copy link

BarzegarAlireza commented Oct 10, 2021

@GiggleLiu and @jalving Thanks for the answer, any solution for Windows machines?

@jalving
Copy link
Member

jalving commented Oct 11, 2021

@BarzegarAlireza We haven't managed to get a working windows artifact yet, mostly because neither I or the KaHyPar devs have had time to work with windows compilers. I think some KaHyPar users have managed to compile with Windows, so it's technically possible to create an artifact.

@giordano
Copy link

Fixed by JuliaRegistries/General#49308 (alternatively, you could have installed ]add boost_jll@1.71.0)

@jalving
Copy link
Member

jalving commented Jan 3, 2022

Closing this issue. Feel free to re-open if it persists.

@jalving jalving closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants