Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling on Linux Ubuntu CleanUnitOnMemFailed not declared in this scope #5

Open
jreus opened this issue Aug 24, 2023 · 2 comments

Comments

@jreus
Copy link

jreus commented Aug 24, 2023

I've been struggling to compile from source. Getting the following error where ClearUnitOnMemFailed cannot be found. Where should this be located?
Thanks!

/home/Dev/nn-supercollider/plugins/NNModel/cpp/NNUGens.cpp: In constructor ‘NN::NNUGen::NNUGen()’:
/home/Dev/nn-supercollider/plugins/NNModel/cpp/NNUGens.cpp:261:5: error: ‘ClearUnitOnMemFailed’ was not declared in this scope
  261 |     ClearUnitOnMemFailed;
      |     ^~~~~~~~~~~~~~~~~~~~
/home/Dev/nn-supercollider/plugins/NNModel/cpp/NNUGens.cpp:269:5: error: ‘ClearUnitOnMemFailed’ was not declared in this scope
  269 |     ClearUnitOnMemFailed;
      |     ^~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/NNUGens_scsynth.dir/build.make:76: CMakeFiles/NNUGens_scsynth.dir/plugins/NNModel/cpp/NNUGens.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/NNUGens_scsynth.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

@elgiano
Copy link
Owner

elgiano commented Aug 24, 2023

It should be in supercollider sources, more precisely in include/plugin_interface/SC_Unit.h. Which version of supercollider sources are you using? This macro is in both latest main and develop, it was merged in version 3.13 as part of a PR to fix some memory allocation errors and mainly remove exception throwing from the main DSP loop.

I should add to the README that sc 3.13 is required. If for any reason you can't compile with sc 3.13, you can define the macro yourself, here is the source:

https://github.com/supercollider/supercollider/blob/a80436ac2cb22b8cef62192c86be2951639c184f/include/plugin_interface/SC_Unit.h#L83-L92

@elgiano
Copy link
Owner

elgiano commented Oct 29, 2023

@jreus how is it going? did you manage to build from source in the end?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants