-
Notifications
You must be signed in to change notification settings - Fork 404
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
JUCE LV2 won't build in unattended/non-XWindows pipeline builds #4030
Comments
Hello @KottV We've started our work on XT-Alpha (we release 1.9 tomorrow which will be our last non-JUCE synth). You can find a version of surge which builds and runs AU VST3 Standalone and (if you have the SDK) VST2 on the https://github.com/surge-synthesizer/surge/tree/xt-alpha By default it will use the juce in the submodule (which is juce 6.0.7) but the cmake file has a variable Would you be willing to work with us to make mergeable changes and write directions on how to build an LV2? xt won't release until summer and it is still alpha, but knowing we have LV2 under control early on and having directions so we can test would be great. I really don't know how to do or test it. Thanks! |
Hi! Sure I will. And I think it's worth to cast the real programmers: @jatinchowdhury18 @falkTX |
Yeah @jatinchowdhury18 has a bunch of stuff in 19 and we’ve discussed how he gets lv2 from juce on our discord. Just I saw you offer up a build to the disco guys on that kvr thread today and thought I’d tag you in case you had time to join in the fun here too! I think it is a pretty easy change oh and if there’s bugs in the lv2 compare with standalone or vst3. The juce port is still rather alpha |
huh, says who? afaik all the issues were fixed. for vitalium release, the lv2 is the version that works the best actually. |
I think the surge juce port is still alpha ) |
ah lol, the surge juce port. not lv2 juce port. |
lol! yeah surge xt is super alpha. its full of bugs even on mac au and standalone. I meant 'if you build the lv2 and it doesn't work, compare with the standalone to make sure that the bug is uniform in surge' |
alright...
it's not a big case, passed it by adding -Wno-error=deprecated-declarations for now
passed by adding
just for compilation, maybe it's the reason of the next error
|
|
Is it means the Debug build? How can I do this? |
Oh sure. For a debug build
|
thanks, will try |
OK cool And thanks for jumping in - welcome to team surge! :) |
In my fork, instead of |
bt from Debug build:
|
The steps:
As we have problems with ttl generator (and it got duplicate target under surge's cmake, do You have any thought?), I commented whole section in
And LV2_URI (I chose this one) in line 849
|
so that crash looks like a crash in getWrapperTypeDescription when the type is LV2. In Juce 6.0.7 it is implemented like this
and your branch is the same. You need to add an LV2 case to that. (So before the default add
) and then merge it and the core dump will go away. |
in ./modules/juce_audio_processors/processors/juce_AudioProcessor.cpp that is |
Oh also I'll try and merge some of these steps into the xt-alpha branch when i'm next doing dev on it today in a way which has a flag (-DJUCE_HAS_LV2_SUPPORT=True or some such) today. I'll update here when I do. |
excellent! wow... 2137 presets.... |
The reason you get the dup on lv2_ttl_generator is because surge makes two plugins in the cmake file and you add the target with the wrong scope. I fixed this by prepending the target name to the lv2 generator target. Also surge-xt didn't have C as a language so it didn't work but I have fixed that. |
Wahey! Got it to all build with internal ttl generator Will merge the surge diffs in a couple but required some diffs to your branch also. Will attach them here in a second. |
Here's the patches I had to install to your branch:
let me know when you merge those. I'm going to merge some changes to the surge-xt branch now to work with them. |
OK so once #4346 is merged (in about 20 minutes) there's a new prescription.
Now, that exports all 2100 presets - we probably don't want to do that. But the prescription above sets all the flags and stuff so it builds, and skips an LV2 in regular juce mode. So now: what's this about a space in a plugin name? |
1. The XT FX Bank is "Surge XT Effects" 2. The LV2 URIs are correct 3. The LV2_SHARED_LIB thing per surge-synthesizer#4030 is in place although requires an upstream merge to be workable
1. The XT FX Bank is "Surge XT Effects" 2. The LV2 URIs are correct 3. The LV2_SHARED_LIB thing per #4030 is in place although requires an upstream merge to be workable
Good and simple solution. Merged. |
Awesome thanks! Lemme check a build from head. I'll keep this open until i get it in CI and the README but it really does all seem to be working. Or at least starting to work. |
Wahey! All works at head of both repos! Pleasure working with you on this. |
great, really) |
So @KottV we are almost done but not quite. The unattended pipeline build I ran crashed because the ttl generator tried to connect to a display. While I could spin up a fake x server on our build host, we should really debug this. So let me re-purpose this issue for that. The problem, I think, is that juce_LV2_WRapper_Exporter.cpp at the top of createLv2Files creates a const ScopedJuceInitiaiser_GUI which sets up the GUI pipeline. It then goes on to use non of the GUI code, though. If I comment it out it still works fine in my environment but I need to figure out how to apply that in the pipeline also to test. |
May I take a look at the crash's output ? My builds of LV2 JUCE in Open Build Server doesn't requires running X server. I guess it tries to dlopen such libs, perhaps. |
Ok, I reproduced it. Weird... |
OK cool.
that's the error I see. Azure is running standard ubuntu-20.04 with up to date packages. |
Is it possible that Surge XT has calls for X11 outside of JUCE? |
Not that I know of no. But maybe there's some lingering goobits from the pre-juce port. I will scan. If it helps, when I start an XVFB I get this
so here's what I'm gonna do I'm going to disable but keep the code intact for our pipeline builds and merge our README change then go onto other surge bugs for a bit Right now users can build and run an LV2. Our pipeline builds can come later in the cycle (I mean, were in day 4 of a 5 month cycle or what not now so we have plenty of time). I'll leave this issue open but change the subject. Sound good? |
Of course. But let me notice once more that other JUCE plugins builds fine in such way. I'll try to figure out where is the case. |
Yeah i still have some of the old pre-juce code in the codebase so it entirely could be that that is getting triggered and screwing us up. I'm ripping it out now. 100% confident we can get this fixed. But want to update that README now. Also would be good if some folks can start testing this. I'll hit up @unfa and @selenologist to see what their experience with the XT plugin in Ardour. |
I got it, the error from generating ttl for SurgeXT_FX.so led me out. generator initializes the loading of presets , surge tries to find them in /usr/share/surge and other dirs, not found then throws the error window (I guess) |
also we need no cairo, xcb etc and all dependencies check in CMakeLists.txt, JUCE will take care of this:
|
Oh thanks |
Oh wow right. Great sleuthing. So I am going to re-write all of that stuff shortly. My plan is to make it so it prints to stderr if no UI has been created. Let me get to that next in my stack and then try and re-set-up the LV2 Super cool. |
Do you ever sleep, Paul? |
it's the middle fo the day here! I also have 2 days where I have a bit of time but anyway I just pushed a PR with a fix. Lets see if it works. I've made it so i you set the variable PIPLINE_OVERRIDE_DATA_HOME on linux it looks there. The popup problem still needs solving of course and have a plan for that but it is a bit more involved. but i bet this will get us to a pipeline build. |
OK that hack didn't do it. |
Oh ha no got it now. This will all work. |
OK awesome out CI pipeline just built the LV2 by setting that environment variable. I'm going to close this. It's a separate issue to not make the un-edited surge pop up that dialog but I'll link that to this. Wahey. We have Surge-XT LV2 building and have a successful build of it as a gate-to-merge So now the question is: does it work? But those are gonna be separate issues. Thanks @KottV for all your help |
thanx) |
Did a lot today so basically so you know, with the code at head
So really everything is great! |
Moving conversation with @KottV over here from DISTRHO/JUCE#14 (comment)
replace libs/juce-6.0.7/juce with that fork https://github.com/lv2-porting-project/JUCE/tree/lv2
change from line 1493 in https://github.com/surge-synthesizer/surge/blob/main/CMakeLists.txt#L1493
URI can be any different of course:
configure:
cmake -Bbuildxt -DBUILD_SURGE_JUCE_PLUGINS=True -DLV2_TTL_GENERATOR=/usr/bin/lv2_ttl_generator
make
cmake --build buildxt --config Debug --target surge-xt_LV2 -j8
/usr/bin/lv2_ttl_generator is from https://github.com/lv2-porting-project/lv2-ttl-generator you might replace it with your own
as it fails to generate .ttl the cmake will delete Surge XT.so
so it's worth to comment generation part https://github.com/lv2-porting-project/JUCE/blob/lv2/extras/Build/CMake/JUCEUtils.cmake#L1325 from L1325 to L1339 for testing
The text was updated successfully, but these errors were encountered: