How to build a package?

I need to use the following package:
https://github.com/kahypar/KaHyPar.jl

However, it is not compatible with macOS and it requires building it before the installation. Can you please help me to do that?
I already downloaded the code but I couldn’t figure out how to build the package.

I am pretty sure you need to build as in follow these instructions: GitHub - kahypar/kahypar: KaHyPar (Karlsruhe Hypergraph Partitioning) is a multilevel hypergraph partitioning framework providing direct k-way and recursive bisection based partitioning algorithms that compute solutions of very high quality.

1 Like

The problem is that I get an error when I type the firs line in terminal:

git clone --depth=1 --recursive git@github.com:SebastianSchlag/kahypar.git

Cloning into 'kahypar'...

git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

Try git clone --depth=1 --recursive https://github.com/SebastianSchlag/kahypar instead

2 Likes

After building the package, when I try to set the environment variable as it is mentioned, I get the following error:

julia> ENV["JULIA_KAHYPAR_LIBRARY_PATH"] = /Desktop/kahypar/build/lib

ERROR: syntax: "/" is not a unary operator

Also when I try this, I get this error:

(@v1.5) pkg> ENV["JULIA_KAHYPAR_LIBRARY_PATH"] = /Desktop/kahypar/build/lib

ERROR: Could not determine command

The right hand side still needs to be a valid Julia string, i.e.:

ENV["JULIA_KAHYPAR_LIBRARY_PATH"] = "/Desktop/kahypar/build/lib"

Of course the most elegant solution here would probably be to try to get KaHyPar into Yggdrasil, so this would just work on all platforms automatically.

1 Like

I would rather install it on my computer since I have to do the run-time comparison between several methods.

So far, everything is installed and I successfully complete all the steps. However, when I run Pkg.test(“KaHyPar”) it returns me an error and asks me to re-run Pkg.build(“KaHyPar”).

By running Pkg.build(“KaHyPar”), I get the following error:

julia> Pkg.build("KaHyPar")
   Building KaHyPar → `~/.julia/packages/KaHyPar/x8xg0/deps/build.log`
┌ Error: Error building `KaHyPar`: 
│ ERROR: LoadError: Could not find the libboost_program_options library

I think that this is related to
The Boost.Program_options library and the boost header files
mentioned in the requirements but I don’t know what it is exactly and how I should deal with that.