apfelaudio / verilog-vcvrack

An example of simulating Verilog / FPGA gateware inside a VCV Rack plugin.
37 stars 3 forks source link

"error: Verilator requires a C++14 or newer compiler" #2

Closed ravenrothkopf closed 7 months ago

ravenrothkopf commented 7 months ago

I am installing on macOS x64. after installing VCV Rack, the Rack SDK, and Verilator, when I run make I get this error message:

c++ -std=c++14 -std=c++11 -stdlib=libc++  -I/usr/local/Cellar/verilator/5.022/share/verilator/include -faligned-new -fPIC -IRack-SDK/include -IRack-SDK/dep/include -MMD -MP -g -O3 -funsafe-math-optimizations -fno-omit-frame-pointer -Wall -Wextra -Wno-unused-parameter -DARCH_X64 -march=nehalem -DARCH_MAC -mmacosx-version-min=10.9  -c -o build/src/eurorack-pmod.cpp.o src/eurorack-pmod.cpp
In file included from src/eurorack-pmod.cpp:7:
In file included from src/../build/rtl-verilated/Vcore.h:11:
In file included from /usr/local/Cellar/verilator/5.022/share/verilator/include/verilated.h:42:
/usr/local/Cellar/verilator/5.022/share/verilator/include/verilatedos.h:265:3: error: "Verilator requires a C++14 or newer compiler"
# error "Verilator requires a C++14 or newer compiler

after modifying the Rack SDK compile.mk file from

# C++ standard CXXFLAGS += -std=c++11 to # C++ standard CXXFLAGS += -std=c++14

I am able to make and make install the eurorack plugin, but even though the plugin appears to be in the correct location in my file path, Documents/Rack2/plugins-mac-x64/eurorack-pmod-vcvrack, it is not visible after restarting VCV Rack.

Files:

Screen Shot 2024-04-06 at 11 39 43 PM

VCV Rack interface:

Screen Shot 2024-04-06 at 11 37 14 PM

Any help in debugging this problem would be appreciated, thank you!

vk2seb commented 7 months ago

Thanks for the detailed bug report!

I haven't built this project in a while so just tried it out with the latest version of Verilator. Indeed verilator seems to have introduced another dependency in the source tree that was missing when the plugin gets loaded.

I've just merged a small PR https://github.com/apfelaudio/verilog-vcvrack/pull/3 with the following changes:

I also added some info to the README on debugging. I'd recommend launching Rack with the --dev flag, that way you can see if it is trying to load the plugin (i.e seeing it at all), and if it doesn't it will show you why.

ravenrothkopf commented 7 months ago

Thank you so much for your prompt and thorough response!! After merging your updates, the plugin loads and appears in VCV Rack as expected. My Creative Embedded Systems class is using your plugin for a class project, so we all really appreciate your attentiveness :)