grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.48k stars 315 forks source link

faust CLI broken on macOS (Apple Silicon) #1012

Open mrkev opened 3 months ago

mrkev commented 3 months ago

When running any command that does not error, the shell reports a trace trap:

faust -v
FAUST Version 2.72.14
Embedded backends: 
   DSP to C
   DSP to C++
   DSP to Cmajor
   DSP to Codebox
   DSP to CSharp
   DSP to DLang
   DSP to FIR
   DSP to Interpreter
   DSP to Java
   DSP to JAX
   DSP to Julia
   DSP to JSFX
   DSP to LLVM IR
   DSP to old C++
   DSP to Rust
   DSP to WebAssembly (wast/wasm)
Build with LLVM version 17.0.6
Copyright (C) 2002-2024, GRAME - Centre National de Creation Musicale. All rights reserved. 
zsh: trace trap  faust -v

Note the last line: zsh: trace trap faust -v.

This breaks faust2wasm and other bash scripts that use faust and rely on faustpath since it prevents faust -libdir from being successfully used to return the libdir path. Note that this tests script prints nothing:

% echo $(faust -libdir)

% 

When running faust2wasm:

$ faust2wasm 
ERROR : /opt/homebrew/bin/faust2wasm cannot find Faust directories (normally /usr/local/include/faust and /usr/local/share/faust)
kevin@Stolen-Dance tmp-10808-WtwHOYICQE3M % 

macOS by default uses zsh now. running on bash, this is what the trace trap message looks like:

bash-5.2$ faust --version
FAUST Version 2.72.14
Embedded backends: 
   DSP to C
   DSP to C++
   DSP to Cmajor
   DSP to Codebox
   DSP to CSharp
   DSP to DLang
   DSP to FIR
   DSP to Interpreter
   DSP to Java
   DSP to JAX
   DSP to Julia
   DSP to JSFX
   DSP to LLVM IR
   DSP to old C++
   DSP to Rust
   DSP to WebAssembly (wast/wasm)
Build with LLVM version 17.0.6
Copyright (C) 2002-2024, GRAME - Centre National de Creation Musicale. All rights reserved. 
Trace/BPT trap: 5

Here the trace trap prints: Trace/BPT trap: 5. Also note that running just faust (no arguments) errors by default. No trace trap is reported:

bash-5.2$ faust
ERROR : no files specified; for help type "faust --help"
bash-5.2$ 

My setup:

macOS: 14.4.1 (23E224)
CPU: Apple M1
RAM: 16 GB
bash: GNU bash, version 5.2.26(1)-release (aarch64-apple-darwin23.2.0)
zsh: zsh 5.9 (x86_64-apple-darwin23.0)
sletz commented 3 months ago

How have you installed Faust ?

mrkev commented 3 months ago

@sletz Using homebrew, just attempted attempted to manually install via releases and I don't see the error anymore

sletz commented 3 months ago

Possibly report on home brew ?