v7b1 / mi-UGens

some mutable instruments eurorack modules ported to SuperCollider
176 stars 20 forks source link

missing header ? #2

Closed davephillips closed 4 years ago

davephillips commented 4 years ago

Greetings ! Very cool project, looks like fun, but I'm hitting a wall with this error:

/home/dlphilp/src/mi-UGens/MiBraids/MiBraids.cpp:45:10: fatal error: Accelerate/Accelerate.h: No such file or directory
 #include "Accelerate/Accelerate.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

and this error:

/home/dlphilp/src/mi-UGens/MiPlaits/MiPlaits.cpp: In function ‘void MiPlaits_Ctor(MiPlaits*)’:
/home/dlphilp/src/mi-UGens/MiPlaits/MiPlaits.cpp:84:9: error: ‘printf’ was not declared in this scope
         printf("mem alloc failed!");
         ^~~~~~

Any suggestions ? I'm building on Linux, Ubuntu 18.04, with GCC 7.5.0.

Best regards,

Dave Phillips

v7b1 commented 4 years ago

Hi Dave, thanks for pointing these out. I haven’t thought much about cross-platform support, yet, and still need to update the projects in this respect.

Will update the code later.

davephillips commented 4 years ago

Thank you for the quick assistance, I've successfully compiled all the ugens. A few notes:

The printf can remain in place if I add this header to MiPlaits.cpp:

#include <stdio.h>

The build script should probably include the pull for the libsamplerate dependency. I ran this to retrieve it:

git submodule update --init --update

Finally, libsamplerate's configure script needs to specify the -fPIC option. On my system MiBraids wouldn't build with the default libsamplerate.a until I specified PIC support for the dependency.

./configure --with-pic

Thanks for this project, it's a very cool addition to SuperCollider. I haven't done anything with SC for quite a while, but I have been learning how to use the MI modules through their implementation in VCV Rack. However, I do keep up with SuperCollider development, your code builds here with the latest git pull.

v7b1 commented 4 years ago

Great to hear it's working for you. So, you say you are running this on a PIC?

davephillips commented 4 years ago

Great to hear it's working for you. So, you say you are running this on a PIC?

No, it's a C flag:

The -fPIC flag means Position Independent Code, the code is made to be independent of load location - loaded anywhere.

v7b1 commented 4 years ago

I see, thanks.