Status report: I can build Prototype with working Faust or working Supercollider but not both. Everything else is no problem. I understood (?) @baconpaul’s message and tried renaming things in SC3’s PyrLexer.* and bison code in the lang directory, got no joy. Builds failed with very little error messaging, I’m not even sure where things are going wrong. At any rate, the SC3examples worked, as did the examples in the other supported languages. Alas, the details of flex and bison are beyond me. Clearly I could use a brief tutorial in how to avoid this kind of namespace collision. The build error I posted tells me what files are producing the error, I assumed I’d need to work on those files. I suppose it’d help if I knew what I was doing.
I uncommented the line in faust/compiler/parser/Makefile and rebuilt the Faust stuff. Again, no problem with the build, and the examples work in Prototype. But if I edit the Prototype Makefile so:
Then as noted before, running ‘make’ will end with the following error:
duplicate symbol 'yyerror(char const*)' in:
dep/lib/libfaust.a(errormsg.cpp.o)
dep/supercollider/build/lang/libsclang.a(PyrLexer.cpp.o)
duplicate symbol 'yylex()' in:
dep/supercollider/build/lang/libsclang.a(PyrLexer.cpp.o)
dep/lib/libfaust.a(faustlexer.cpp.o)
duplicate symbol '_yytext' in:
dep/supercollider/build/lang/libsclang.a(PyrLexer.cpp.o)
dep/lib/libfaust.a(faustlexer.cpp.o)
ld: 3 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [plugin.dylib] Error 1
Oh well. I have occasion to use Supercollider, but I don’t use Faust very often and can probably live without support for it in Prototype. OTOH, if there’s a way to resolve this issue then I’m happy to have both supported.
Apologies for repeating all this, I just want to be clear about where I’m at with the build right now.
However this has been made to the master-dev branch, which is the latest version branch. So what you could try is to delete/backup the faust directory in /dep and edit Prototype Makefile thus:
$(libfaust):
cd dep && git clone -b master-dev "https://github.com/grame-cncm/faust.git" --recursive
You’ll also have to remove this line: cd dep/faust && git checkout 1dfc452a8250f3123b5100edf8c882e1cea407a1
In addition, if you get a configuration error such as: CMake Error at CMakeLists.txt:226 (target_sources): Cannot specify sources for target "faust" which is not built by this project.
you’ll need to alter line 6 of dep/faust/build/targets/interp.cmake
Thanks, Steve, that did the trick. I’ve successfully built and tested Prototype - with all supported deps - on VCV Rack 2.2.3 macOS x64. I’ve run various Lua, JS, Pd, SC3, Vult, and Faust example scripts, it’s been all good so far. I’ll continue testing this evening.
Many thanks to you and @baconpaul for getting us to the solution !
I’m currently trying to figure out what changed between the last release v2.54.9 (Dec 2022) and the latest dev version that borks Prototype into not initializing the Faust engine after loading a script on Windows.
If I can’t figure it out I’ll try and roll back through the commits to find the last one that works. At least I got a build working with everything apart from SC3.
you should be able to make that change also with -DINCLUDE_DYNAMIC=OFF when you run the first cmake rather than editing the source (but will need a clean build when you change it since it is a CACHE variable)
That’s a good point, I often forget to check whether I can use a flag in the Makefile as opposed to editing a file after cloning.
Yeah I had to restart the build because that config error I mentioned in my post above to Dave stops the build in it’s tracks if one uses the master-dev branch - on Windows anyway i.e. INCLUDE_DYNAMIC=ON
Found the problem: in my various tryouts of different versions of Faust I accidentally deleted this file when using the latest dev version. It’s not a standard Faust lib.
Faust is big. a --rebase for builds with a course (educational establishment) learning interval. The .git is large. Would go some way to making a reasonable download size. Plus I’ve done .sc and got used to the “clock sync” step delay thing. I mean it might be nice, but I don’t build Airwin2Rack that often, as it takes an age (serious bugs or many new modules/features only for me). The Chromebook dies just running vscode sometimes. C++ in node.js.
The python/numpy feature had a few red errors, but linked, so I’m not sure, so I marked it experimental. But today I’ve been mostly doing MenuItem/std::atomic.
This is interesting. I guess VCV-Prototype is sort of “open source” in the traditional way where pull requests from “outside” are merged? Unlike VCV Rack which is more read-only open source? Who has commit rights to this repo?
I am very interested in scripting languages for VCV Rack. Do we know if VCV Prototype has a viable path forward? If there is a viable path forward (one that is not prohibted), would that include Prototype being distributed in the VCV library or would it be limited to distributions outside of the library?
Is there a topic here that is a more appropriate place to ask this and similar questions?
with the help of your suggestions i managed to build VCV-Prototype and it finally even links (based on libpd 2.59.5 which seems to be the next proper release after the yacc/lex prefix addition), but when i try to run it as plugin i get an unresolved symbol “sys_gui_midipreferences” and following a quick look at the code i’m not really sure why it is unresolved as it seems to be compiled in and a strings on libpd.a also shows it … does this maybe ring a bell for anyone where the problem might come from? this is on linux debian bookworm with a fully self compiled rack (which is otherwise working perfectly fine with plenty of other plugins).
a lot of thanks in advance and best wishes - hexdump