Closed shakfu closed 9 months ago
The Interpreter is not built al all inmake liball.
Have a look https://github.com/grame-cncm/faust/wiki/Building ?
Hacking https://github.com/grame-cncm/faust/blob/master-dev/build/backends/interp.cmake ?
Thanks for the advice. I will look into this more closely.
@sletz I figured it out by adding a target to the main faust/Makefile
:
interp : updatesubmodules
$(MAKE) -C $(BUILDLOCATION) cmake BACKENDS=interp.cmake TARGETS=interp.cmake
$(MAKE) -C $(BUILDLOCATION)
then
make interp
PREFIX=`pwd`/prefix make install
cp tests/interp-tests/interp-test.cpp ./prefix/
cd prefix
g++ -DINTERP_DSP=1 -std=c++11 -O3 interp-test.cpp -I./include -L./lib -L`brew --prefix`/lib ./lib/libfaust.a -o interp-test
then
./interp-test --help
Libfaust version : 2.69.3
=============================
Test createInterpreterDSPFactoryFromFile
Cannot create factory : File Extension is not the one expected (.dsp expected)
I would like to add some further info since I ended it with the following custom backend config which I called interp_plus.cmake
so thatI could build the faust
executable and set the path to the lib folder correct for both interp tests:
# this file may be used to select different backends
# it's always read by the default makefile target
# values are among:
# OFF don't include the backend
# COMPILER embed the backend in the faust compiler
# STATIC embed the backend in the faust static library
# DYNAMIC embed the backend in the faust dynamic library
# WASM embed the backend in the faust wasm library
set ( C_BACKEND STATIC DYNAMIC CACHE STRING "Include C backend" FORCE )
set ( CPP_BACKEND STATIC DYNAMIC CACHE STRING "Include CPP backend" FORCE )
set ( CMAJOR_BACKEND OFF CACHE STRING "Include Cmajor backend" FORCE )
set ( CSHARP_BACKEND OFF CACHE STRING "Include CSharp backend" FORCE )
set ( DLANG_BACKEND OFF CACHE STRING "Include Dlang backend" FORCE )
set ( FIR_BACKEND OFF CACHE STRING "Include FIR backend" FORCE )
set ( INTERP_BACKEND OFF CACHE STRING "Include Interpreter backend" FORCE )
set ( INTERP_COMP_BACKEND STATIC DYNAMIC CACHE STRING "Include Interpreter/Cmmpiler backend" FORCE )
set ( JAVA_BACKEND OFF CACHE STRING "Include JAVA backend" FORCE )
set ( JAX_BACKEND OFF CACHE STRING "Include JAX backend" FORCE )
set ( JULIA_BACKEND OFF CACHE STRING "Include Julia backend" FORCE )
set ( JSFX_BACKEND OFF CACHE STRING "Include JSFX backend" FORCE )
set ( LLVM_BACKEND OFF CACHE STRING "Include LLVM backend" FORCE )
set ( OLDCPP_BACKEND OFF CACHE STRING "Include old CPP backend" FORCE )
set ( RUST_BACKEND OFF CACHE STRING "Include Rust backend" FORCE )
# Template is deactivated
set ( TEMPLATE_BACKEND OFF CACHE STRING "Include Template backend" FORCE )
set ( WASM_BACKEND OFF CACHE STRING "Include WASM backend" FORCE )
and also a custom target, called interp_plus.cmake
:
# this file may be used to select different target
# values are among ON or OFF
set ( INCLUDE_EXECUTABLE ON CACHE STRING "Include Faust compiler" FORCE )
set ( INCLUDE_STATIC ON CACHE STRING "Include static Faust library" FORCE )
set ( INCLUDE_DYNAMIC ON CACHE STRING "Include dynamic Faust library" FORCE )
set ( INCLUDE_OSC OFF CACHE STRING "Include Faust OSC static library" FORCE )
set ( INCLUDE_HTTP OFF CACHE STRING "Include Faust HTTPD static library" FORCE )
set ( INCLUDE_ITP OFF CACHE STRING "Include Faust Machine library" FORCE )
set ( ITPDYNAMIC OFF CACHE STRING "Include Faust Machine library" FORCE )
set ( OSCDYNAMIC OFF CACHE STRING "Include Faust OSC dynamic library" FORCE )
set ( HTTPDYNAMIC OFF CACHE STRING "Include Faust HTTP dynamic library" FORCE )
This was called in a custom target in the main Makefile
as follows:
interp : updatesubmodules
$(MAKE) -C $(BUILDLOCATION) cmake BACKENDS=interp_plus.cmake TARGETS=interp_plus.cmake
$(MAKE) -C $(BUILDLOCATION)
I'm on macOS M1 Ventura 13.6.1 and I want a non-llvm-dependent build of libfaust.a and libfaust.dylib (with the intent to wrap some parts of the interface in cython).
I've tried the following sequence:
Then the first test
Clearly there are symbols missing, so add
/faust/dsp/faust-dynamic-engine.cpp
At this point, I throw the kitchen sink:
So clearly
createInterpreterDSPFactoryFromFile
andcreateInterpreterDSPFactoryFromString
are not built using themake libsall
option... how do I incorporate them into such a build?