swesterfeld / spectmorph

SpectMorph: spectral audio morphing
http://www.spectmorph.org
GNU Lesser General Public License v2.1
64 stars 5 forks source link

lv2lint fails on lv2 plugin #8

Closed dvzrv closed 4 years ago

dvzrv commented 4 years ago

Hi! When packaging 0.5.1 for Arch Linux I ran lv2lint on the lv2 plugin:

cp -v lv2/.libs/*.so lv2/
LV2_PATH="${PWD}" lv2lint "http://spectmorph.org/plugins/spectmorph"
rm -v lv2/*.so

However, there are errors (and warnings):

Error opening '/usr/share/spectmorph/templates/2-instruments-linear-lfo.smplan'.
<http://spectmorph.org/plugins/spectmorph>
    [FAIL]  Symbols
              binary exports superfluous globally visible symbols: 
                * lv2ui_descriptor
              seeAlso: <http://lv2plug.in/ns/lv2core#binary>
    [WARN]  Linking
              binary links to non-whitelisted shared libraries: 
                * libspectmorph.so.0
                * libspectmorphglui.so.0
                * libfftw3f_threads.so.3
                * libfftw3f.so.3
                * libsndfile.so.1
                * libz.so.1
                * libX11.so.6
                * libGL.so.1
                * libfreetype.so.6
                * libglib-2.0.so.0
              seeAlso: <http://lv2plug.in/ns/lv2core#binary>
    [WARN]  Class
              type is just lv2:Plugin
              seeAlso: <http://lv2plug.in/ns/lv2core#Plugin>
    [FAIL]  Worker
              work:interface not returned by 'extention_data'
              seeAlso: <http://lv2plug.in/ns/ext/worker#interface>
    [WARN]  Hard RT Capable
              not advertized as real-time safe
              seeAlso: <http://lv2plug.in/ns/lv2core#hardRTCapable>
  <http://spectmorph.org/plugins/spectmorph#ui>
    [FAIL]  Symbols
              binary exports superfluous globally visible symbols: 
                * lv2_descriptor
              seeAlso: <http://lv2plug.in/ns/lv2core#binary>
    [WARN]  Instance Access
              usage of instance-access is highly discouraged
              seeAlso: <http://lv2plug.in/ns/ext/instance-access>
    [WARN]  Mixed DSP/UI
              mixing DSP and UI code in same binary is discouraged
              seeAlso: <http://lv2plug.in/ns/extensions/ui#>
    [FAIL]  Toolkit
              UI toolkit <http://lv2plug.in/ns/extensions/ui#X11UI> unkown
              seeAlso: <http://lv2plug.in/ns/extensions/ui#ui>

Note, I'm running lv2lint on the plugin before the files are installed into the "filesystem" using fakeroot (hence the first error message I assume, but I also don't know if this is a error message that will make lv2lint fail or not).

swesterfeld commented 4 years ago

It seems lv2lint is right about the Worker extension which is really no longer needed (fixed here https://github.com/swesterfeld/spectmorph/commit/db96a7de56563f5a06689192abd3b6c51276af09).

I believe the [FAIL] Symbols are false positive - I filed this here https://github.com/OpenMusicKontrollers/lv2lint/issues/4 - i.e. SpectMorph is correct and lv2lint is wrong.

Finally the [FAIL] Toolkit doesn't happen here (with lv2lint from git). I think you are responsible for this one by calling

LV2_PATH="${PWD}" lv2lint "http://spectmorph.org/plugins/spectmorph"

If you do it without setting LV2_PATH, the [FAIL] goes away.

As for the [WARN] entries, this seems more like a matter of taste than a real technical problem. Btw, the statically linked generic linux 64bit binaries from spectmorph.org don't have the [WARN] Linking warnings. However I am not sure if for a linux distribution fully statically linked lv2 plugins would be what you want to have.

dvzrv commented 4 years ago

Thanks for looking into this!

If you do it without setting LV2_PATH, the [FAIL] goes away.

Hm, without giving it the location, lv2lint will try /usr/lib/lv2 and then quit.

swesterfeld commented 4 years ago

If you do it without setting LV2_PATH, the [FAIL] goes away.

Hm, without giving it the location, lv2lint will try /usr/lib/lv2 and then quit.

Ok, try

LV2_PATH="$LV2_PATH:$PWD" lv2lint ...
or
LV2_PATH="/usr/lib/lv2:$PWD" lv2lint ...

In any case the lv2lint author confirmed that the two [FAIL] Symbols needs fixing in lv2lint. So there is nothing more for me to fix in SpectMorph, I'll close the issue.