electrickery / pd-tof

Collection of control and signal objects by Thomas Ouellet Fredericks, previously part of Pd-extended
Other
5 stars 0 forks source link

Error compiling for darwin-arm64 #5

Open pkstone opened 2 years ago

pkstone commented 2 years ago

I'm getting the following error when compiling on an M1 macbook (darwin-arm64):

➜  pd-tof-master make
++++ info: using Makefile.pdlibbuilder version 0.6.0
++++ info: using Pd API /Applications/Pd-0.52-1-arm64.app/Contents/Resources/src/m_pd.h
++++ info: making target all in lib tof
++++ info: evaluating implicit prerequisites in lib tof.....
++++ info: making src/common~.o in lib tof
cc -DPD -I "/Applications/Pd-0.52-1-arm64.app/Contents/Resources/src" -DUNIX -DMACOSX -I /sw/include    -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing -O3 -ffast-math -funroll-loops -fomit-frame-pointer -arch arm64 -mmacosx-version-min=10.6 -o src/common~.o -c src/common~.c
src/common~.c:220:5: error: implicit declaration of function 'error' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                  error("common~ only works with a block size of 64");
                  ^
src/common~.c:254:3: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]
  CLASS_MAINSIGNALIN(common_tilde_class, t_common_tilde, f);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Pd-0.52-1-arm64.app/Contents/Resources/src/m_pd.h:505:59: note: expanded from macro 'CLASS_MAINSIGNALIN'
    class_domainsignalin(c, (char *)(&((type *)0)->field) - (char *)0)
                                                          ^ ~~~~~~~~~
1 warning and 1 error generated.
make: *** [src/common~.o] Error 1
electrickery commented 2 years ago

Hi Phil, Your error is noted, but certainly the coming weeks I have very little time to invest in this. The function 'error' isn't part of tof, AFAIK. Greetings, Fred Jan

pkstone commented 2 years ago

Hi Fred,

It looks like it's complaining about the syntax of the call to 'error', not 'error' itself. Due to C99 compliance? Not sure.

I will do what I can to figure it out on this end. Thanks!

pkstone commented 2 years ago

I believe IOhannes did an update to [comport] last week because it was exhibiting this same error when compiling for darwin-arm64. He updated to pd-lib-builder v 6.0 and it fixed it. I will investigate further.

electrickery commented 2 years ago

Hi Phil,

Always a safe bet, use the latest pd-lib-builder version.

Success & greetings, Fred Jan

esaruoho commented 2 years ago

any word on the feasibility of M1 / ARM build of tof? I'm trying to move from Rosetta-PD0.50-2 to M1-PD0.52-2 but also trying to retain functionality - i've just been given a supposedly fancy and good reverb that requires tof stuff.

jaffasplaffa commented 1 year ago

@esaruoho

Same here. I got an M1 Macbook a year ago and I also want to take the steps, to run PD as a native M1 app, instead of via Rosetta. Tof is super important, because of the phasorshot~. Haven't found any equivalents. I tried making it in Vanilla but result was not good.

Hoping it will be made one day :)