Skip to content
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

Uninstall does not remove LV2 folders #83

Open
tank-trax opened this issue Mar 16, 2021 · 27 comments
Open

Uninstall does not remove LV2 folders #83

tank-trax opened this issue Mar 16, 2021 · 27 comments

Comments

@tank-trax
Copy link

running sudo ninja -C build uninstall

does not delete the following folders:

image

also, I was wondering could there be a switch or is there one to install/uninstall locally into ~./lv2

@falkTX
Copy link
Contributor

falkTX commented Mar 16, 2021

I am not used to uninstall steps in meson.
Contributions welcome.

@tank-trax
Copy link
Author

I could certainly try to find a solution.

Could you give me a hint where in the code would I look? I am completely unfamiliar with meson.

@falkTX
Copy link
Contributor

falkTX commented Mar 16, 2021

@alex-tee any hints? I guess you are the most familiar with meson.

@tank-trax
Copy link
Author

perhaps this?

@alex-tee
Copy link
Contributor

meson only deletes files it knows about (like custom_target(), executable() etc.) so my guess is that it doesnt know that it created those directories, but I need to look at the build configs again to check what this does

@eli-schwartz
Copy link

Can you post the contents of meson-logs/install-log.txt, and the output of running sudo ninja -C build/ uninstall

@tank-trax
Copy link
Author

tank-trax commented Mar 16, 2021

oddly enough it does remove the folders from /usr/local/lib/vst3/

@tank-trax
Copy link
Author

tank-trax commented Mar 16, 2021

install-log.txt

@eli-schwartz
Copy link

eli-schwartz commented Mar 16, 2021

According to the install log, meson never created any directories. Are you absolutely positive that they did not exist when you ran meson install?

@tank-trax
Copy link
Author

100% certain, and I tested to make sure
I used chown to give my user write permissions on the folder and removed them all
tried again same thing happened
after uninstall the contents are removed but not the folders with the .lv2 in the name
as stated earlier, it does remove the contents and folders from /usr/local/lib/vst3/

@tank-trax
Copy link
Author

@eli-schwartz my apologies....

this is the correct output of sudo ninja -C build/ uninstall

ninja-uninstall.txt

perhaps this will help

output from sudo ninja -C build/ install

ninja-install.txt

@tank-trax
Copy link
Author

in the example for the installation/removal of vitalium.vst3

Installing /home/studio/dev/git/DISTRHO-Ports/build/ports/vitalium.vst3/Contents/x86_64-linux/vitalium.so to /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux

Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so

Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux
Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents
Deleted: /usr/local/lib/vst3/vitalium.vst3

and vitalium.lv2

Installing /home/studio/dev/git/DISTRHO-Ports/build/ports/vitalium.lv2/vitalium.ttl to /usr/local/lib/lv2/vitalium.lv2
Installing /home/studio/dev/git/DISTRHO-Ports/build/ports/vitalium.lv2/manifest.ttl to /usr/local/lib/lv2/vitalium.lv2
Installing /home/studio/dev/git/DISTRHO-Ports/build/ports/vitalium.lv2/vitalium.so to /usr/local/lib/lv2/vitalium.lv2

Deleted: /usr/local/lib/lv2/vitalium.lv2/vitalium.ttl
Deleted: /usr/local/lib/lv2/vitalium.lv2/manifest.ttl
Deleted: /usr/local/lib/lv2/vitalium.lv2/vitalium.so

uninstall for the VST3 removes the one file and at the end after all the LV2 files have been removed proceeds to one by one remove the folders for VST3, for LV2 removes the files but after all is said and done does not consider the LV2 folder for removal

perhaps it is because there are more than one file being written to the LV2 folders that the uninstall is missing them?

@eli-schwartz
Copy link

It's not clear to me... Is the original install-log.txt the same one that corresponds to the latest ninja-install.txt and ninja-uninstall.txt ?

@tank-trax
Copy link
Author

tank-trax commented Mar 17, 2021

initially I uploaded the wrong file for uninstall, I replaced it with a good one, the install file was OK

@eli-schwartz
Copy link

eli-schwartz commented Mar 17, 2021

install-log.txt

Again, this does not list /usr/local/lib/vst3 or /usr/local/lib/lv2

So, those directories do not get deleted.

However, it does list

/usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so
[...]
/usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux
/usr/local/lib/vst3/vitalium.vst3/Contents
/usr/local/lib/vst3/vitalium.vst3

As you can see, the uninstall log lists:

Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so
[...]
Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux
Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents
Deleted: /usr/local/lib/vst3/vitalium.vst3

So, meson is uninstalling the folders it creates. However, there are one or two folders that meson believes it did not create (either because you ran ninja install twice in a row, and the second run which did not create any directories overwrote the first log, or, because you have other pre-existing software there), therefore it is not trying to uninstall them.

@tank-trax
Copy link
Author

I tried a fresh clone and same result

here are the steps

git clone https://github.com/DISTRHO/DISTRHO-Ports.git
meson build --buildtype release
ninja -C build

usr/local/lib/lv2/ has no folders in it with anything from DISTRHO-Ports

image

ninja -C build install

image

now the DISTRHO-Ports are installed

after running ninja -C build uninstall

image

folders remain

@alex-tee
Copy link
Contributor

alex-tee commented Mar 17, 2021 via email

@eli-schwartz
Copy link

meson setup builddir/ --prefix=$PWD/builddir/pkg -Dbuild-lv2=false -Dbuild-vst2=false -Dbuild-vst3=true
ninja -C builddir
ninja -C builddir install

My install log:

# List of files installed by Meson
# Does not contain files installed by custom scripts.
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents/x86_64-linux/SwankyAmp.so
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2/manifest.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2/presets.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/manifest.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Analog_Brass.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Combat.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Dark_Ambient.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Dark_Bouncy_Groove.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Hardcore_Kick.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Kickbass.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Koto.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Nasty_Growl.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Pianium.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Power_Lead.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Retro_Ambient_Pluck.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sci_Fi_Computer.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sci_Fi_Piano.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sparkly_Dreamy_Pad.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Supersaw.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Trance_Pluck.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Vitalium_Groove.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents/x86_64-linux
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents/x86_64-linux
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib
/home/eschwartz/DISTRHO-Ports/builddir/pkg

Uninstall:

$ ninja uninstall
[0/1] /usr/bin/meson --internal uninstall
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents/x86_64-linux/SwankyAmp.so
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2/manifest.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2/presets.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/manifest.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Analog_Brass.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Combat.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Dark_Ambient.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Dark_Bouncy_Groove.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Hardcore_Kick.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Kickbass.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Koto.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Nasty_Growl.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Pianium.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Power_Lead.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Retro_Ambient_Pluck.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sci_Fi_Computer.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sci_Fi_Piano.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sparkly_Dreamy_Pad.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Supersaw.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Trance_Pluck.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Vitalium_Groove.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents/x86_64-linux
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents/x86_64-linux
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg

Uninstall finished.

Deleted: 34
Failed: 0

Remember that files created by custom scripts have not been removed.

@eli-schwartz
Copy link

FWIW, while I still cannot reproduce your issue you did lead me to discover another one -- I have a case where install: true on a custom target installs a directory without subdirectories, and this did not get tracked.

@tank-trax
Copy link
Author

try -Dbuild-lv2=true

meson setup builddir/ --prefix=$PWD/builddir/pkg -Dbuild-lv2=true -Dbuild-vst2=true -Dbuild-vst3=true

for an LV2 there are 3 or 4 files written per folder

my guess is that whenever meson is writing to the target folder and creates the plugin.lv2 folders, when each folder is created on the 1st file write, it is then then written to a 2nd, 3rd or 4th time... and meson assumes that each of those plugin.lv2 folders already existed and does not remove them when uninstall is invoked

@eli-schwartz
Copy link

eli-schwartz commented Mar 19, 2021

My goal in only enabling part of the build was to create a reasonably reproducible test case demonstrating a subset of this repo, which doesn't go even further past 600MB as that was quite bloated on its own.

I don't have endless time and compute to spend on this. And I'm fairly sure none of this should matter. I found and fixed one case where meson neglected to do its usual tracking of installed directories, but in general the principle is sound and should work. (And no, creating the same directory multiple times won't mess up install tracking... mainly because mesonbuild.minstall.DirMaker only makes directories that don't exist yet.)

Side note: you're welcome to try meson from eli-schwartz/meson@f7b0238 (now merged to meson git master) and see if that somehow fixes the problem for you. I don't think it is your exact issue, but you never know.

@falkTX
Copy link
Contributor

falkTX commented Mar 19, 2021

You can build only specific plugins, so that it takes less time.
For one of the smallest builds out of this repo, try:

meson build --buildtype release -Dbuild-lv2=true -Dbuild-vst2=false -Dbuild-vst3=false -Dbuild-legacy-only=true -Dplugins=vex

@tank-trax
Copy link
Author

My goal in only enabling part of the build was to create a reasonably reproducible test case demonstrating a subset of this repo, which doesn't go even further past 600MB as that was quite bloated on its own.

By not building the LV2 you are not reproducing the issue

@eli-schwartz
Copy link

eli-schwartz commented Mar 19, 2021

I'm not playing this game. If you'd like me to go out of my way to try to reproduce your bug, give me a minimal test case that you have verified causes a problem on your end. I'm not building this multiple GB kitchen sink repo with all the everything enabled because you're not sure whether it matters.

I tried to make a point. The point has not been accepted. If you want a better point out of me (or to convince me that meson has another edge case) you'll need to work with me here.

@tank-trax
Copy link
Author

I've will repeat again...

when installing without any switches following the instructions.... when the uninstall is invoked folders will remain in /usr/local/lib/lv2 and this is when those folders were not there initially

I am having a hard time understanding why you cannot grasp this

on a personal level it doesn't affect me because I have a workaround solution plus the '--prefix=' provides a good place to deposit the builds ...

but not everybody is able to figure out workarounds

this no longer affects me... as you don't want to test it properly I will close this ticket

@falkTX
Copy link
Contributor

falkTX commented Mar 19, 2021

issue is still present, so please leave the ticket open.

is this issue reproducible with a smaller build? we can check for that first. again, we can use this to build only 1 plugin:

meson build --buildtype release -Dbuild-lv2=true -Dbuild-vst2=false -Dbuild-vst3=false -Dbuild-legacy-only=true -Dplugins=vex

@falkTX falkTX reopened this Mar 19, 2021
@eli-schwartz
Copy link

when installing without any switches following the instructions.

This is too big of a test case for me and I'm personally not interested in helping to debug meson issues for builds of that size. If the minimal build which @falkTX has mentioned twice now, can reproduce your issue -- or if you can distill a small test case in a similar manner -- then that would help greatly.

It's not fun to try to reproduce a bug when the reproducible test case is gigabytes large and has well over 500 translation units.

I don't even use this software... I'm interested in this from the meson side of things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants