Porting JUCE programs to DISTRHO/juce for LV2 support
Moderators: MattKingUSA, khz
Re: Porting JUCE programs to DISTRHO/juce for LV2 support
I'm currently trying to port AnemoneChorus and LibreArp. My plan was to start the port for LibreArp but since it uses some "weird" stuff then I've decided to properly learn how to make ports using the AnemoneChorus.
-
- Established Member
- Posts: 820
- Joined: Thu Mar 21, 2013 12:55 am
- Location: Vladivostok
- Has thanked: 65 times
- Been thanked: 124 times
Re: Porting JUCE programs to DISTRHO/juce for LV2 support
I've build LibreArp LV2 version.
You may see the tricks to build it in spec https://build.opensuse.org/package/view ... c?expand=1
You may see the tricks to build it in spec https://build.opensuse.org/package/view ... c?expand=1
Re: Porting JUCE programs to DISTRHO/juce for LV2 support
Another problem this time, after all going well I've hit another barrier that is making me quite confused. Basically all the compilation goes well except when calling generate-lv2-ttl.py, it gives this error
At first I thought it was related to the files in the wrong directories, then tested installing lv2_ttl_generator in my system and still got this, after frying my head for days I still can't figure out what is going on.
Code: Select all
Linking AnemoneChorus - LV2
python3 ../../generate-lv2-ttl.py build/AnemoneChorus.lv2/AnemoneChorus.so
Traceback (most recent call last):
File "../../generate-lv2-ttl.py", line 25, in <module>
dll.lv2_generate_ttl(ctypes.c_char_p(dll_basename.encode('utf-8')))
File "/usr/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
func = self.__getitem__(name)
File "/usr/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: build/AnemoneChorus.lv2/AnemoneChorus.so: undefined symbol: lv2_generate_ttl
make: *** [../../LV2.mak:26: build/AnemoneChorus.lv2/AnemoneChorus.so] Error 1
-
- Established Member
- Posts: 820
- Joined: Thu Mar 21, 2013 12:55 am
- Location: Vladivostok
- Has thanked: 65 times
- Been thanked: 124 times
Re: Porting JUCE programs to DISTRHO/juce for LV2 support
Looks like build/AnemoneChorus.lv2/AnemoneChorus.so has not lv2 actually
Could you post here the steps of building?
Could you post here the steps of building?
Re: Porting JUCE programs to DISTRHO/juce for LV2 support
- Add the JUCE port as a submodule
- Make and open Projucer and then add Linux make as one of the builds
- Copy LV2.mak.in to the plugin folder (in this case there's the repo folder and folder for the plugin which has the juce lib code, builds etc) and add "include ../../LV2.mak" in makefile
- Since the other problem related to building the vst2 version I've been using juce6 to build only the vst3 and using it as the source as stated before
- Create the generate-lv2-ttl.py
- Then run make
Here's the full make output (there's some warnings probably related to this plugin using 5.3 or 5.4 version and the submodule is using juce6): https://pastebin.com/5idR6au3
-
- Established Member
- Posts: 820
- Joined: Thu Mar 21, 2013 12:55 am
- Location: Vladivostok
- Has thanked: 65 times
- Been thanked: 124 times
Re: Porting JUCE programs to DISTRHO/juce for LV2 support
Submodule? I guess you mean subdirectory in project's dir.Add the JUCE port as a submodule
Maybe you have system-wide JUCE installed? In Ubuntu it is juce-modules-source.
Anyway check the projects's modules path in Projucer, it must be set to JUCE-LV2 modules dir.
Edit. I see that modules path is right, but you didn't add LV2 defines in JuceLibraryCode/AppConfig.h. It has to include such lines in BEGIN_USER_CODE_SECTION:
Code: Select all
// [BEGIN_USER_CODE_SECTION]
// (You can add your own code in this section, and the Projucer will not overwrite it)
#define JucePlugin_Build_LV2 1
#define JucePlugin_LV2URI "https://github.com/walkerdavis/OceanPlugIns-AnemoneChorus"
#define JucePlugin_MaxNumInputChannels 2
#define JucePlugin_MaxNumOutputChannels 2
// [END_USER_CODE_SECTION]
Re: Porting JUCE programs to DISTRHO/juce for LV2 support
Yeah I mean as a git submodule in the repo.Submodule? I guess you mean subdirectory in project's dir.
Oh I forgot to do this again, I've done this in my other attempts but this time I totally forgot, totally my bad.I see that modules path is right, but you didn't add LV2 defines in JuceLibraryCode/AppConfig.h. It has to include such lines in BEGIN_USER_CODE_SECTION:
@Kott apparently it worked now! thanks for helping in this little adventure and for answering my annoying newbie questions.