BinaryBuilder cross-coompilation env needs an additional library

I am trying to include a C++ library with julia package. After BinaryBuilder’s wizard drops me into cross-compilation environment, the configure script that I sun within the source directory informs me that I need an additional library, say, libxxx-dev. So what is the correct procedure; do I add this library using apk tool? (the library is included among the ones distributed with julia compiler, in /usr/local/julia-1.5.3/libs)

Thanks

No: https://juliapackaging.github.io/BinaryBuilder.jl/latest/FAQ/#Can-I-install-packages-in-the-build-environment?-1

You need to install the dependencies for the target system, using other JLL packages when the wizard asks you so at the beginning. Inside the wizard build environment you can run

bb add Package_jll

to install that dependency

Aha! Thanks. So, presumably, this will know to add the correct version of libxxx-dev, the same as the one that julia compiler ships with?

Yes (if I understood the question correctly, which I’m not 100% sure about)

The question is, the C++ library configure script stops because libgmp-dev is not available within the cross-compile environment. A version of Libgmp is included within julia distribution. So if I include GMP@ 6.1.2 from Yggdrasil, that will add to the build environment the same version as the one shipped with the compiler, and when my _jll package is installed, it will not need to download libgmp. Correct?

Uhm, the wizard doesn’t handle different versions very nicely. You can continue with whatever the wizard will install and we can fix it when you open the PR for Yggdrasil (which I assume is what you’re going to do?).

I warmly recommend you to write a build_tarballs.sh script, see https://juliapackaging.github.io/BinaryBuilder.jl/dev/building/ or just start from another simple script that you can find in Yggdrasil. It’s way easier if you need to restart from scratch multiple times.

I think you’re misunderstanding me somewhat. I don’t have a preference for any particular version of libgmp. I just want to compile the C++ library with the same libgmp as julia uses.

I’m referring to that :slightly_smiling_face:

1 Like