@@ -165,6 +165,7 @@ DawDreamer uses a **multi-step build process**:
165165# - CMake (can install via Homebrew: brew install cmake)
166166# - Faust compiler (can install via Homebrew: brew install faust)
167167# - Python 3.11-3.14 installed
168+ # Note: ncurses/tinfo NOT needed on macOS (part of system)
168169
169170# Setup environment
170171export PYTHONMAJOR=3.11
@@ -209,21 +210,113 @@ python3.11 -c "import dawdreamer as daw; print('Success!')"
209210
210211#### Linux (CMake/Makefile)
211212``` bash
212- # Setup Python paths
213- export PYTHONLIBPATH=/usr/lib/python3.10
214- export PYTHONINCLUDEPATH=/usr/include/python3.10
213+ # Prerequisites:
214+ # - build-essential, clang, pkg-config
215+ # - libboost-all-dev, libfreetype6-dev
216+ # - X11 development libraries (libx11-dev, libxinerama-dev, libxrandr-dev, libxcursor-dev, libxcomposite-dev)
217+ # - ALSA/audio libraries (libasound2-dev, freeglut3-dev, mesa-common-dev)
218+ # - ncurses library (libncurses-dev or libtinfo-dev) - required for Faust LLVM linking (Linux only, not needed on macOS)
219+ # - CMake, Python 3.11-3.14 with development headers
220+ # - Git
215221
216- # Build libsamplerate
222+ # Step 1: Initialize git submodules (required on first build)
223+ git submodule update --init --recursive
224+
225+ # Step 2: Download prebuilt libfaust libraries
226+ cd thirdparty/libfaust
227+ python3 download_libfaust.py
228+ cd ../..
229+
230+ # Step 3: Build libsamplerate dependency
217231cd thirdparty/libsamplerate
218232cmake -DCMAKE_BUILD_TYPE=Release -Bbuild_release
219- make -C build_release
233+ cmake --build build_release --config Release
220234cd ../..
221235
222- # Build via Makefile
236+ # Step 4: Build DawDreamer via Makefile (for Python 3.12, adjust version as needed)
237+ export PYTHONLIBPATH=/usr/lib/python3.12
238+ export PYTHONINCLUDEPATH=/usr/include/python3.12
239+
223240cd Builds/LinuxMakefile
224241make CONFIG=Release CXXFLAGS=" -I$PYTHONINCLUDEPATH " LDFLAGS=" -L$PYTHONLIBPATH "
225242cd ../..
243+
226244# Output: dawdreamer/dawdreamer.so
245+
246+ # Step 5: Install Python package in development mode
247+ python3 setup.py develop
248+
249+ # Note: On WSL2/NTFS, setup.py develop can take 1-2 minutes due to processing
250+ # thousands of Faust library files with slower cross-filesystem I/O.
251+
252+ # Step 6: Verify installation
253+ python3 -c " import dawdreamer as daw; engine = daw.RenderEngine(44100, 512); print('Success!')"
254+ ```
255+
256+ ** Quick Install (if C++ library is already built):**
257+ ``` bash
258+ # If dawdreamer/dawdreamer.so already exists, just install the Python package:
259+ python3 setup.py develop
260+
261+ # This installs in editable mode - changes to Python code take effect immediately
262+ # The installation processes many Faust library files, which can take time on WSL2
263+ ```
264+
265+ ** Streamlined Install for LLMs/Automation (Minimal Output):**
266+ ``` bash
267+ # If C++ library is already built, install with minimal output:
268+ python3 setup.py develop --quiet 2>&1 | grep -E ' (Successfully|ERROR|Failed|Traceback)' || \
269+ (echo " Installation in progress (this takes 1-2 min on WSL2)..." && \
270+ python3 setup.py develop --quiet && \
271+ echo " ✓ DawDreamer installed successfully" )
272+
273+ # Or use pip for even quieter installation:
274+ pip install -e . --quiet --disable-pip-version-check 2>&1 | \
275+ grep -vE ' (Preparing|Building|Installing build dependencies)' || \
276+ echo " ✓ Installation complete"
277+
278+ # Verify silently (exit code 0 = success):
279+ python3 -c " import dawdreamer; dawdreamer.RenderEngine(44100, 512)" && \
280+ echo " ✓ DawDreamer working" || echo " ✗ Import failed"
281+ ```
282+
283+ ** Full Build (Streamlined for Automation):**
284+ ``` bash
285+ # Complete build with minimal output (Linux)
286+ set -e # Exit on any error
287+
288+ # Check if already built
289+ if [ -f dawdreamer/dawdreamer.so ]; then
290+ echo " ✓ C++ library already built, skipping to installation..."
291+ else
292+ echo " Building C++ library..."
293+
294+ # Build libsamplerate if needed
295+ if [ ! -f thirdparty/libsamplerate/build_release/src/libsamplerate.a ]; then
296+ cd thirdparty/libsamplerate
297+ cmake -DCMAKE_BUILD_TYPE=Release -Bbuild_release > /dev/null 2>&1
298+ cmake --build build_release --config Release > /dev/null 2>&1
299+ cd ../..
300+ echo " ✓ libsamplerate built"
301+ fi
302+
303+ # Build DawDreamer (requires PYTHONLIBPATH/PYTHONINCLUDEPATH set)
304+ cd Builds/LinuxMakefile
305+ make CONFIG=Release 2>&1 | grep -E ' (error|Error|ERROR|warning:)' || true
306+ cd ../..
307+ echo " ✓ DawDreamer C++ library built"
308+ fi
309+
310+ # Install Python package quietly
311+ echo " Installing Python package (1-2 min on WSL2)..."
312+ python3 setup.py develop --quiet 2>&1 | grep -E ' (Successfully installed|ERROR|Failed)' || \
313+ python3 setup.py develop --quiet
314+ echo " ✓ Installation complete"
315+
316+ # Verify
317+ python3 -c " import dawdreamer; dawdreamer.RenderEngine(44100, 512)" && \
318+ echo " ✓ DawDreamer verified and ready" || \
319+ (echo " ✗ Verification failed" && exit 1)
227320```
228321
229322#### Windows (Visual Studio 2022)
@@ -246,7 +339,7 @@ msbuild Builds/VisualStudio2022/DawDreamer.sln /property:Configuration=Release
246339### Wheel Packaging (setup.py)
2473401 . Expects pre-compiled native binary at expected path
2483412 . Copies binary to ` dawdreamer/ ` package directory (renamed to .so/.pyd/.dll)
249- 3 . Includes Faust architecture files and faustlibraries as package data
342+ 3 . Includes Faust architecture files and faustlibraries as package data ( ~ 200+ files)
2503434 . Creates multi-platform wheel with native extension
2513445 . Uses ` BinaryDistribution ` class to force platform-specific wheel tag
252345
@@ -255,6 +348,13 @@ msbuild Builds/VisualStudio2022/DawDreamer.sln /property:Configuration=Release
255348- Platform-specific binary path detection
256349- Bundles licenses and Faust resources
257350- Creates non-zip-safe wheel (binary extension)
351+ - Processes many files during editable install (can take 1-2 min on WSL2)
352+
353+ ** Reducing Verbosity (for LLMs/Automation):**
354+ - Use ` --quiet ` flag: ` python3 setup.py develop --quiet `
355+ - Filter output: ` python3 setup.py develop 2>&1 | grep -E '(Successfully|ERROR|Failed)' `
356+ - Use pip: ` pip install -e . --quiet --disable-pip-version-check `
357+ - The verbose package_data list (~ 200 lines) is suppressed with ` --quiet `
258358
259359---
260360
@@ -649,6 +749,30 @@ audio = engine.get_audio()
649749 - Intel Mac: ` export ARCHS=x86_64 `
650750 - Check your architecture: ` uname -m `
651751
752+ ** setup.py develop is very slow (Linux/WSL2)**
753+ - ** Cause** : Processing thousands of Faust library files across NTFS filesystem boundary
754+ - ** Behavior** : Installation can take 1-2 minutes (normal on WSL2)
755+ - ** What's happening** :
756+ - Building editable wheel with ~ 200+ architecture files and ~ 50+ Faust library files/directories
757+ - Cross-filesystem I/O between WSL2 Linux and Windows NTFS is slow
758+ - You'll see "Building editable for dawdreamer (pyproject.toml): still running..." for ~ 30-60 seconds
759+ - ** Solution** : Be patient, this is expected. Process will complete successfully.
760+ - ** Verification** : Once complete, you'll see "Successfully installed dawdreamer-0.8.4"
761+
762+ ** Python version compatibility (Linux)**
763+ - ** Supported** : Python 3.11-3.14 (tested with 3.12 on WSL2)
764+ - ** Note** : No special environment variables needed for installation step on Linux
765+ - ** Check version** : ` python3 --version `
766+
767+ ** Missing libtinfo.so dependency (Linux)**
768+ - ** Symptom** : ` ImportError: libtinfo.so.6: cannot open shared object file `
769+ - ** Cause** : Missing ncurses/tinfo library
770+ - ** Solution** :
771+ - Ubuntu/Debian: ` sudo apt-get install libncurses-dev ` or ` libtinfo-dev `
772+ - RedHat/CentOS/Fedora: ` sudo yum install ncurses-devel `
773+ - Verify: ` ldd dawdreamer/dawdreamer.so | grep tinfo `
774+ - ** Why needed** : Faust compiler uses LLVM which depends on libtinfo for terminal handling
775+
652776### Runtime Issues
653777
654778** ImportError: cannot import dawdreamer**
0 commit comments