Setting up a build environment in BinaryBuilder

Hello! I am writing a wrapper for zbar, but the environment of the container is minimized, so I need to install some additional packages.

More precisely, I need to install libmagickwand-dev as mentioned in an issue of zbar. However, the command apk add is invalid in this case. Is there any other solution? Thanks in advance!!

Here is my build script.

cd zbar
apk add gettext-dev # install autopoint for generating `configure`
apk add imagemagick
# apk add libmagickwand-dev # invalid way to install
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target}
make -j${nproc}
make install

The last few lines of the command ./configure are

=> ...
=> the zbarimg file scanner will *NOT* be built
=> GTK support will *NOT* be built
=> ...

Here zbarimg, the crucial part of zbar, requires the ImageMagick-tools to be installed.


I submitted an issue in the BinaryBuilder repo, which solved part of my question. But it might be appropriate to post in discourse as well, since I’m new to these building things and may encounter more issues.

You need to install the package magicwand for the target system, not the host one (this section of the documentation was already linked in the issue you mentioned above). You need to add a JLL package for libmagickwand as dependency, not to install it with apk in the build environment. However we don’t have yet libmagickwand in Yggdrasil, so you need to build that one first. Please read also the section about binary dependencies in the documentation.

1 Like