kinetikeith / CyShock

VCV Rack plugin with some modules I've made, notably one that uses my sine-tracking algorithm dstrack
GNU General Public License v3.0
1 stars 0 forks source link

won't build on Ubuntu 18.04 #2

Closed davephillips closed 3 years ago

davephillips commented 3 years ago

Greetings !

I'm trying to build your plugin on Ubuntu 18.04 but its requirements appear to want the latest & greatest GCC. For some time Ubuntu 18.04 has been the base system for VCV Rack compatibility - at least that's so for inclusion in the library - and I'm not sure if there's a way to proceed with my current system (with GCC 7.5.0). Any suggestions short of a system upgrade ?

CMake Error in src/CMakeLists.txt:
  Target "dstrack" requires the language dialect "CXX20" (with compiler
  extensions), but CMake does not know the compile flags to use to enable it.

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Best regards,

Dave Phillips

kinetikeith commented 3 years ago

Interestingly enough, the dstrack library itself is not strongly dependent on c++20. There are a few minor changes I can make that will make it compatible with c++11 or c++17. Will do that as soon as possible! Thanks for taking interest.

davephillips commented 3 years ago

@kinetikeith Thank you !

kinetikeith commented 3 years ago

Just fixed with commit 63f7e66f99802191f074b8d7fa0d1441a500c602. Hope everything else works well!

davephillips commented 3 years ago

@kinetikeith Thanks for the note, I've built the dependencies without problems but I've hit a different error:

g++  -std=c++11 -Wsuggest-override  -Idstrack/include -fPIC -I../../include -I../../dep/include -MMD -MP -g -O3 -march=athlon-fx -funsafe-math-optimizations -Wall -Wextra -Wno-unused-parameter -DARCH_LIN  -c -o build/src/Sinusoid.cpp.o src/Sinusoid.cpp
src/Sinusoid.cpp: In member function ‘virtual void Sinusoid::process(const rack::engine::Module::ProcessArgs&)’:
src/Sinusoid.cpp:67:24: error: ‘float DSTracker::resMag’ is private within this context
   float ampOut = (dst->resMag * params[GAIN_PARAM].getValue()) - params[THRESHOLD_PARAM].getValue();
                        ^~~~~~
In file included from src/Sinusoid.cpp:5:0:
dstrack/include/DSTracker.hpp:59:8: note: declared private here
  float resMag;
        ^~~~~~
src/Sinusoid.cpp:73:38: error: ‘float DSTracker::resArg’ is private within this context
    lastVOct = std::log((sRate * dst->resArg) / dsp::FREQ_C4) / std::log(2);
                                      ^~~~~~
In file included from src/Sinusoid.cpp:5:0:
dstrack/include/DSTracker.hpp:60:8: note: declared private here
  float resArg;
        ^~~~~~
../../compile.mk:68: recipe for target 'build/src/Sinusoid.cpp.o' failed
make: *** [build/src/Sinusoid.cpp.o] Error 1

Let me know if you need more information.

Best regards,

dp

davephillips commented 3 years ago

Just got the latest fix, the plugin builds fine now. On to testing. :)

kinetikeith commented 3 years ago

:facepalm: lol nothing like not testing before doing a push to master. Thanks for your detailed reports @davephillips . It should be good now, I tested the latest commit 10c43eac1ae3b1923638d9dd1d81397d7376e1d4 and it compiled and runs perfectly for me.

This repo is my first experience working with publicly available code btw. Thank you for your patience!