Vult on VCV-Prototype works again

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. :slight_smile:

Btw, I’m using Steve’s v2-tmp repo.

1 Like

Does it build on macos? Edit: No it does not.

I let the Faust team know. I think the thing to do is uncimment out that makefile line I highlighted and rebuild Faust clean and see what happens

Slightly tangential.

Since Cockos Reaper (the DAW) supports lua scripting (in ReaScript) I have had a try with that in recent years.

Many things lua in a curated list of quality Lua packages and resources:

2 Likes

I edited the Prototype Makefile so:

DUKTAPE ?= 0
QUICKJS ?= 1
LUAJIT ?= 1
PYTHON ?= 0
SUPERCOLLIDER ?= 0
VULT ?= 1
LIBPD ?= 1
FAUST ?= 1

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:

DUKTAPE ?= 0
QUICKJS ?= 1
LUAJIT ?= 1
PYTHON ?= 0
SUPERCOLLIDER ?= 1
VULT ?= 1
LIBPD ?= 1
FAUST ?= 1

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. :slight_smile:

Apologies for repeating all this, I just want to be clear about where I’m at with the build right now.

Best regards,

dp

yeah if i could make the thing build on my mac i would be able to see the fix i’m sure.

but did you make or make dep after you made the faust change? you will need to cleandep / dep to get the change applied

Dave,

This may help. The following commit has been made to Faust: Use FAUST prefix in lex/yacc parser. · grame-cncm/faust@cb8d0a2 · GitHub which includes changes hinted at by Paul’s post above: Vult on VCV-Prototype works again - #18 by baconpaul

image

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

and change ON to OFF as per line 4.

This will build the latest v2.58.9 version.

HTH.

1 Like

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 !

Best regards,

dp

4 Likes

You’re very welcome! Glad to hear it.

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.

Cheers

Steve

Do you get any error ?

2 Likes

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

If you use a tagged master branch commit or edit Makefile to wget the source archive e.g. https://github.com/grame-cncm/faust/releases/download/2.54.9/faust-2.54.9.tar.gz then you don’t have to use that flag as it’s OFF by default.

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?

Andrew does, along with a few others, sletz (Stéphane Letz) · GitHub / clwe · GitHub / mxa (Max Neupert) · GitHub & mossheim (moss heim) · GitHub who works at Ableton.

1 Like

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?

Here’s the post where Andrew talks about his future plans for Prototype. Is this still a live project? · Issue #64 · VCVRack/VCV-Prototype · GitHub

With that as context, starting a new topic in this forum would be the best way IMO.

2 Likes

Thanks, Steve. I will await Andrew’s redesign of Prototype to Rack V2.

2 Likes

hello,

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

update: it looks like the problem is related to libpd is missing symbols · Issue #2046 · pure-data/pure-data · GitHub - i’ll try a build with the latest libpd version now …

1 Like

Glad to hear you’ve got it built. Unfortuntely I’m on Windows only so I won’t be able to reproduce this.

A quick search seems to point to PureData libpd is missing symbols · Issue #2046 · pure-data/pure-data · GitHub although this was fixed last Summer.