Building from Source¶
The build script produces identical output whether run locally or in CI —
both use the same manylinux_2_34_x86_64 Docker image for reproducibility.
Prerequisites¶
Docker
bash/shInternet access (clones upstream repos and downloads dnf packages)
Local build¶
# Clone this repo
git clone https://github.com/EDAPack/nextpnr-bin.git
cd nextpnr-bin
# Run inside manylinux container (sets CI_BUILD=1 to install system packages)
docker run --rm \
--volume "$(pwd):/io" \
--env CI_BUILD=1 \
--workdir /io \
quay.io/pypa/manylinux_2_34_x86_64 \
/io/scripts/build.sh
The tarball is written to release/nextpnr-bin-manylinux-x64-<version>.tar.gz.
Build phases¶
scripts/build.sh runs the following phases in order:
System packages (
CI_BUILD=1only) —dnf installof cmake, Boost, Eigen3, bzip2, zstd, gcc-c++, etc.Python packages —
pip install intervaltree apycula(needed by nextpnr CMake configure for Gowin chipdb generation)Clone nextpnr — latest tag from
YosysHQ/nextpnrIceStorm — clone & build
YosysHQ/icestorm(ICEPROG=0)Trellis — clone & build
YosysHQ/prjtrellis(out-of-tree,INSTALL_LIBDIR=lib)Mistral — clone
Ravenslofty/mistralbranchnextpnr-latest(source-only; built inline by nextpnr CMake)Peppercorn — clone
YosysHQ/prjpeppercorn(device files only)nextpnr CMake + build — all backends enabled,
STATIC_BUILD=OFF,Boost_USE_STATIC_LIBS=ON,-static-libstdc++ -static-libgccStrip —
strip --strip-unneededon all binariesldd check — warns if any unexpected shared libraries are linked
Package —
tar.gzcreated inrelease/
Key CMake flags¶
Flag |
Purpose |
|---|---|
|
Avoids global |
|
Links Boost |
|
No Python embedding → no libpython runtime dep |
|
No Qt dependency |
|
Builds separate |
|
Avoids link-time optimisation issues in the container |
Cleaning build artifacts¶
Build artifacts are created inside Docker as root. To remove them:
docker run --rm \
--volume "$(pwd):/io" \
quay.io/pypa/manylinux_2_34_x86_64 \
sh -c "rm -rf /io/icestorm /io/prjtrellis /io/nextpnr /io/mistral \
/io/prjpeppercorn /io/deps-install /io/nextpnr-build /io/release"