Shadow Build & Install

Orbstack

Build and install the Shadow project on macOS using Orbstack.

brew install orbstack

Open the Orbstack application (change the image repository, optional).

Install Dependencies

Enter the container.

docker run -it --name shadow ubuntu:22.04 /bin/bash

First, update the packages, otherwise nothing can be installed.

apt-get update

Install vim and git.

apt-get install -y vim git

Refer to the shadow project documentation to install the necessary dependencies.

apt-get build-dep -y shadow

The following error is usually reported.

E: You must put some 'deb-src' URIs in your sources.list

Use vim to edit /etc/apt/sources.list and add the deb-src source.

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted

Remove the comment from the # deb-src line above, then run again.

apt-get update

Install the necessary dependencies again, this time it should not report an error.

apt-get build-dep -y shadow

Configuration

Download the source code.

git clone https://github.com/shadow-maint/shadow.git

Run the project’s configuration script autogen.sh.

./autogen.sh --without-selinux --enable-man --with-yescrypt

The following errors occur.

autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force
autoreconf: running: /usr/bin/autoconf --force
configure.ac:35: error: possibly undefined macro: LT_LIB_DLLOAD
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:135: error: possibly undefined macro: AC_MSG_WARN
autoreconf: error: /usr/bin/autoconf failed with exit status: 1

There are a few errors here, first handle LT_LIB_DLLOAD.

apt-get install -y libltdl-dev

Run ./autogen.sh again.

configure.ac:135: error: possibly undefined macro: AC_MSG_WARN
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: error: /usr/bin/autoconf failed with exit status: 1

Then install pkg-config.

apt-get install -y pkg-config

Running ./autogen.sh again will still report an error.

configure: error: readpassphrase() is missing, either from libc or libbsd

Install libbsd-dev.

apt-get install -y libbsd-dev

Running ./autogen.sh again should not report an error.

Build & Install

make -j4
make install