After moving to v1-gpl, can't compile

Getting the stb_image_write.h issue building rack itself.

g++ -std=c++11 -Wsuggest-override -Iinclude -Idep/include -MMD -MP -g -O3 -march=nocona -funsafe-math-optimizations -Wall -Wextra -Wno-unused-parameter -DARCH_WIN -D_USE_MATH_DEFINES -c -o build/src/window.cpp.o src/window.cpp
src/window.cpp:23:10: fatal error: stb_image_write.h: No such file or directory
#include <stb_image_write.h>

Sounds like the dependencies are not updated?

Have you tried a git submodule update --recursive --remote followed by a make dep and make?

Yes, tried that. Now trying a clean in dep first.

cleaning dep did it. tx!


What command should be input into terminal to run the clean command mentioned above?

I’m also having some issues compiling Rack V1 stable branch. After running the make command I get this error:

src/random.cpp:14:1 error: thread-local storage is not supported for the current target

thread_local uin64_t xoroshiro128plus_state[2];

1 error generated.
make: *** [build/src/random.cpp.o] Error 1

I found the random.cpp file in the src folder and line 14 in the code matches the unsupported target.

Any suggestions to fix this? Thanks for taking the time to answer with possible solutions :slight_smile:

make clean; cd dep; make clean should do it.

Your error is unrelated and probably has to do with using an old compiler. What’s your compiler version?

Thank you, I’ll try what you mentioned above. How do I check the compiler version? Are you referring to the version of python installed or Xcode? If it’s Xcode, I’m running 7.2.1 on OS 10.10.5.

C/C++ compiler. clang --version

Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

Looks like Xcode 8+ is required to build Rack of Mac now.

Is this also true for building modules?

No, I think I’ve even built plugins on MacOS 10.7, but I haven’t in a while.
The difficulty with something as old as 10.7 is that Homebrew has dropped support, but with 10.10, you might still be fine.

Okay, so I guess unless I’m able to upgrade to 10.11, I can just cd to the plugin folder on the dev version of Rack 1 and git clone, etc etc in there.

You could download the Rack SDK and build with RACK_DIR=<Rack SDK dir> make. Rack v1 development blog

Okay, I guess I’ll have to wait until the SDK is available and learn which commands to use. Maybe it’s worth while to try and upgrade to 10.11.

Thanks Andrew.

The SDK is already available, just posted a link to it.

1 Like

Oh yes I see now, thank you!

I just updated my laptop OS to 10.11.6 and Xcode to 8.2.1 along with the command line tools to see if I could resolve some issues regarding compiling some binaries for the V1 stable branch. Some git repos will build, but most won’t as I’ll get some errors while trying to build. I’ve been trying to build the Audible Instruments Plugin using the SDK, and I get this error:

eurorack/tides2/ error: call to 'abs' is ambiguous
        if (abs(new_period - period_) > 1) {
/Applications/ note: 
      candidate function
abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
/Applications/ note: 
      candidate function
abs(double __lcpp_x) _NOEXCEPT {return fabs(__lcpp_x);}
/Applications/ note: 
      candidate function
abs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
1 error generated.
make: *** [build/eurorack/tides2/] Error 1

I haven’t had success using the method described above when building other modules; “RACK_DIR=(Rack SDK dir) make”, as I’m assuming we just enter the exact command into terminal where (Rack SDK dir) is the path to the SDK folder (I just drag the folder to terminal to enter in the exact path).

Instead, I read on github, that we can just create a “plugins” folder in the SDK folder, and build directly in there. So that’s how I’ve been building since.

Maybe now that I upgraded to OS 10.11.6, I should be able to build Rack from source again, but I’d still like to learn to build using the SDK as well, using “make dist”.

I’ll start by cding to the plugins folder,
Then “git clone” in the plugins folder (in the SDK folder),
Then cd to the plugin root,
Then “git checkout V1”,
Then “git submodule update --init --recursive”,
Then “make dist”,
If the “make dist” doesn’t work, I will try “make dep” and “make”.

don’t know if this has anything to do with your problem ,but when I have problems with abs I get very explicit, like instead of abs(a, b) I might say std:abs<float>(a, b)