Skip to content

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

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

Closed
ravenrothkopf opened this issue Apr 7, 2024 · 2 comments
Closed

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

ravenrothkopf opened this issue Apr 7, 2024 · 2 comments

Comments

@ravenrothkopf
Copy link

ravenrothkopf commented Apr 7, 2024

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
Copy link
Member

vk2seb commented Apr 7, 2024

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 #3 with the following changes:

  • Adds some basic CI for Linux & Mac (I don't have a Mac but just to check it compiles...)
  • Fixes the C++ compiler flag at the inclusion point in the makefile (no need for you to change the Rack SDK)
  • Adds the extra dependency that Verilator introduced so the plugin doesn't crash on load

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
Copy link
Author

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 :)

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