PaulBatchelor / Sporth

A small stack-based audio language.
MIT License
12 stars 1 forks source link

making on Mac (Apple Silicon) #1

Closed retteghy closed 8 months ago

retteghy commented 8 months ago

Installed soundpipe first, then tried to make sporth, failed with below errors.

/cdb/jsmn/ -DSTANDALONE=0 -Iugens/polysporth -DUSE_DL -g -c -Ih -I. ugens/jitter.c -o ugens/jitter.o ugens/jitter.c:32:10: error: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Werror,-Wimplicit-function-declaration] *p = malloc(sizeof(sp_jitter)); ^ ugens/jitter.c:32:10: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc' ugens/jitter.c:38:5: error: implicitly declaring library function 'free' with type 'void (void *)' [-Werror,-Wimplicit-function-declaration] free(*p); ^ ugens/jitter.c:38:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'free' 2 errors generated. make: *** [ugens/jitter.o] Error 1

I added #include to ugens/jitter.c, then it failed to make with following error:

`cc -O3 -fPIC -I/usr/local/include -Wall -ansi -g -DLIVE_CODING -I ugens/cdb/ -I ugens/cdb/jsmn -I ugens/cdb/jsmn/ -DSTANDALONE=0 -Iugens/polysporth -DUSE_DL -g -c -Ih -I. plumber.c -o plumber.o plumber.c:11:10: fatal error: 'sndfile.h' file not found

include

     ^~~~~~~~~~~

1 error generated. make: *** [plumber.o] Error 1`

retteghy commented 8 months ago

Alright, found sndfile.h in homebrew, ran

export CPATH=/opt/homebrew/include
export LIBRARY_PATH=/opt/homebrew/lib

and then could successfully make, it is working now! :)