brummer10/guitarix

0.46.0: overlinking with libzita-resampler.so

Closed this issue ยท 4 comments

Hi! ๐Ÿ‘‹

After upgrading to 0.46.0 I noticed that the lv2 plugins are overlinked against libzita-resampler.so:

guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_alembic.lv2/gx_alembic.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_fuzzfacefm.lv2/gx_fuzzfacefm.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_oc_2.lv2/gx_oc_2.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_phaser.lv2/gx_phaser.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_rangem.lv2/gx_rangem.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_reverb.lv2/gx_reverb.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_room_simulator.lv2/gx_room_simulator.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_scream.lv2/gx_scream.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_studiopre.lv2/gx_studiopre.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_studiopre_st.lv2/gx_studiopre_st.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_susta.lv2/gx_susta.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_switched_tremolo.lv2/gx_switched_tremolo.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_tremolo.lv2/gx_tremolo.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_w20.lv2/gx_w20.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gx_zita_rev1.lv2/gx_zita_rev1.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gxechocat.lv2/gxechocat.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gxtape.lv2/gxtape.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gxtape_st.lv2/gxtape_st.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gxtilttone.lv2/gxtilttone.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gxts9.lv2/gxts9.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gxtubedelay.lv2/gxtubedelay.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gxtubetremelo.lv2/gxtubetremelo.so')
guitarix W: Unused shared library '/usr/lib/libzita-resampler.so.1' by file ('usr/lib/lv2/gxtubevibrato.lv2/gxtubevibrato.so')

For all waf based builds I pass in our distribution linker flags via the custom waf LINKFLAGS:
https://gitlab.archlinux.org/archlinux/packaging/packages/guitarix/-/blob/c2b53464ba1555aec63910bb106a6061246a0d88/PKGBUILD#L88

This usually prevents overlinking like this, as we link with --as-needed:

https://gitlab.archlinux.org/archlinux/devtools/-/blob/01b6b0849ed098d4d3d8db3591443db3df6aa11b/config/makepkg/x86_64.conf#L48-49

For some reason this does not seem to be the case for the plugins and libzita-resampler.so anymore though.

Yep, thanks for the hint. I'll recheck the link flags provided by the build scripts. Seems I've overdone some.

I've pushed a fix for that now to the repository.

Issue with build now. Fixed this locally by adding GX_RESAMPLER back to fuzzfacefm.

Ups, yes, that was broken. I've fixed it in the repository. There was wrongly gx_resampler.h included in fuzzfacefm which I've removed now.