Does anyone know how to build a package? The documentation is not helpful It says that I should use dep/build.jl but never describes or shows an example of what is in that file. What would be a good reference?
The short answer is that normally you don’t need a dep/build.jl
at all and when it’s needed it’s usually for building a binary dependency, e.g. if you want to call into a C library. For Julia 1.3+ this is increasingly rare though since pre-built binary dependencies from GitHub - JuliaPackaging/Yggdrasil: Collection of builder repositories for BinaryBuilder.jl is a much better solution.
For a better answer you need to provide more context of what you are trying to accomplish.
I am trying to build a library which is not supported by BinaryBuilder, as it depends on a more recent version of glibc (>v2.14, from 2011).
How would I go about using a build script in build.jl
, so that the C library would be built on the machine using the package using the local (surely more recent the 2.14) version of glibc?
Is there a project with a reference build.jl
script that downloads and build a library which can be later used by the Julia package