martin-lueders / ML_modules

free modules for VCV Rack
BSD 3-Clause "New" or "Revised" License
90 stars 18 forks source link

Build currently failing on MacOS 10.13 #8

Closed PatchworkBoy closed 6 years ago

PatchworkBoy commented 6 years ago

Build fails on MacOS 10.13 with latest VCVRack Master branch (commit ed90da9)

MCO-rMBP:plugins marci$ git clone https://github.com/martin-lueders/ML_modules.git
Cloning into 'ML_modules'...
remote: Counting objects: 286, done.
remote: Compressing objects: 100% (148/148), done.
remote: Total 286 (delta 169), reused 250 (delta 133), pack-reused 0
Receiving objects: 100% (286/286), 1.94 MiB | 411.00 KiB/s, done.
Resolving deltas: 100% (169/169), done.
MCO-rMBP:plugins marci$ cd ML_modules/
MCO-rMBP:ML_modules marci$ git submodule update --init --recursive
MCO-rMBP:ML_modules marci$ make
c++ -D v032 -fPIC -I../../include -I../../dep/include -DVERSION=dev -DVERSION_dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_MAC -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -o build/src/ML_modules.cpp.o src/ML_modules.cpp
c++ -D v032 -fPIC -I../../include -I../../dep/include -DVERSION=dev -DVERSION_dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_MAC -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -o build/src/Quant.cpp.o src/Quant.cpp
src/Quant.cpp:83:2: error: no matching function for call to 'stepChannel'
        stepChannel(inputs[IN1_INPUT], params[AMOUNT1_PARAM], outputs[OU...
        ^~~~~~~~~~~
src/Quant.cpp:40:13: note: candidate function not viable: no known conversion
      from 'value_type' (aka 'rack::Input') to 'const float *' for 1st argument
static void stepChannel(const float *in, const float amount, float *out) {
            ^
src/Quant.cpp:84:2: error: no matching function for call to 'stepChannel'
        stepChannel(inputs[IN2_INPUT], params[AMOUNT2_PARAM], outputs[OU...
        ^~~~~~~~~~~
src/Quant.cpp:40:13: note: candidate function not viable: no known conversion
      from 'value_type' (aka 'rack::Input') to 'const float *' for 1st argument
static void stepChannel(const float *in, const float amount, float *out) {
            ^
2 errors generated.
make: *** [build/src/Quant.cpp.o] Error 1
PatchworkBoy commented 6 years ago

Removing all the if / endif from Quant.cpp and Quantum.cpp (so it’s all hardcoded for v0.4.0) then fails at...

MCO-rMBP:ML_modules marci$ make
c++ -D v032 -fPIC -I../../include -I../../dep/include -DVERSION=dev -DVERSION_dev -MMD -O3 -march=nocona -ffast-math -g -Wall -DARCH_MAC -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++ -c -o build/src/Quantum.cpp.o src/Quantum.cpp
src/Quantum.cpp:162:46: error: use of undeclared identifier 'plugin'
                panel->setBackground(SVG::load(assetPlugin(plugin,"res/Quantum.svg")));
                                                           ^
1 error generated.
make: *** [build/src/Quantum.cpp.o] Error 1
martin-lueders commented 6 years ago

Instead of removing the directives, you should edit the Makefile and change the -Dv032 to -Dv040. That should do the trick. Make sure you have completely built the current rack sources.

martin-lueders commented 6 years ago

Please, let me know whether this solves your problem, so that I can either close the issue, or try to work out where the problem lies.

ghost commented 6 years ago

Hi yes changing the flag fixes the compile error on mac 10.13

The following warnings are generated

freeverb/revmodel.hpp:48:12: warning: private field 'wet1' is not used [-Wunused-private-field] float wet,wet1,wet2; ^ freeverb/revmodel.hpp:48:17: warning: private field 'wet2' is not used [-Wunused-private-field] float wet,wet1,wet2; ^ freeverb/revmodel.hpp:54:8: warning: private field 'math_e' is not used [-Wunused-private-field] float math_e = 2.71828;

However the plugins load and run fine.

Great plugins! thank you

martin-lueders commented 6 years ago

Thanks!

Yes, these are leftovers from the development. I still have to clean up all codes and graphics, and also see where I can optimise them a bit more.

I will close this issue for now.