LV2 plugin includes the C++ header lv2plugin.hpp and fails with mod-plugin-builder

I have a working buildroot but when I run the ./build command it can’t find the C++ interface for this plugin.

I’m using the stereopanner example from the ll plugins tutorial

make[1]: Entering directory '/home/noise/mod-workdir/plugins-dep/build/stereopanner-ll-lv2-1/source'
lv2peg stereopanner.ttl stereopanner.peg
g++ -shared -fPIC -DPIC stereopanner.cpp `pkg-config --cflags --libs lv2-plugin` -o stereopanner.so
g++ -shared -fPIC -DPIC stereopanner_gui.cpp `pkg-config --cflags --libs lv2-gui` -o stereopanner_gui.so
Package lv2-plugin was not found in the pkg-config search path.
Perhaps you should add the directory containing `lv2-plugin.pc'
to the PKG_CONFIG_PATH environment variable
Package 'lv2-plugin', required by 'world', not found
Package lv2-gui was not found in the pkg-config search path.
Perhaps you should add the directory containing `lv2-gui.pc'
to the PKG_CONFIG_PATH environment variable
Package 'lv2-gui', required by 'world', not found
stereopanner.cpp:1:25: fatal error: lv2plugin.hpp: No such file or directory
 #include <lv2plugin.hpp>
                         ^
compilation terminated.
Makefile:10: recipe for target 'stereopanner.so' failed
make[1]: *** [stereopanner.so] Error 1
make[1]: *** Waiting for unfinished jobs....
stereopanner_gui.cpp:1:19: fatal error: gtkmm.h: No such file or directory
 #include <gtkmm.h>
                   ^
compilation terminated.
Makefile:13: recipe for target 'stereopanner_gui.so' failed
make[1]: *** [stereopanner_gui.so] Error 1
make[1]: Leaving directory '/home/noise/mod-workdir/plugins-dep/build/stereopanner-ll-lv2-1/source'
package/pkg-generic.mk:195: recipe for target '/home/noise/mod-workdir/plugins-dep/build/stereopanner-ll-lv2-1/.stamp_built' failed
make: *** [/home/noise/mod-workdir/plugins-dep/build/stereopanner-ll-lv2-1/.stamp_built] Error 2

You could only use library’s which are included in the MOD, btw. in the buildroot.
Check out
/mod-workdir/plugins-dep/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include
to find what is there. Otherwise, you need to include the used headers (if it been header only implementations) in your source tree.
Btw. ll plugins tutorial is a bit outdated and shouldn’t be used any-more, You may have a look at
http://lv2plug.in/book/

to get going. Also, you can’t build plugs with a GUI, gtk, Qt, or whatever. There is no gui toolkit on the MOD.

The ll plugin tutorials are excellent. The most clear and comprehensive I’ve found. I completed some in the LV2 book and was left more confused than when I began. I guess I can’t depend on C++ being available.

Regarding the GUI, I know there are plugins on the mod that have a GUI in their source tree. How could these run on the mod duo if no GUI code is allowed?

They provide a “make” without GUI. Check out my GxPlugins here:

They all have a GUI, but for the MOD they build without the GUI. check the makefiles and the .mk files for the here:

1 Like