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

No make uninstall #1446

Closed
etresoft opened this issue Apr 16, 2019 · 8 comments
Closed

No make uninstall #1446

etresoft opened this issue Apr 16, 2019 · 8 comments

Comments

@etresoft
Copy link

Expected behavior and actual behavior.

The makefile does not have an uninstall target. I am doing some unusual platform builds and I see that something has been installed into the wrong location. But I can’t uninstall it. I have to wipe out my entire stack and rebuild.

Steps to reproduce the problem.

Run “make uninstall"

Operating system

macOS 10.14, but this is a custom stack much plain, old-school Unix.

GDAL version and provenance

2.4.1 from GitHub and checked out to the v2.4.1 tag

@mloskot
Copy link
Member

mloskot commented Apr 16, 2019

https://lists.osgeo.org/pipermail/gdal-dev/2005-July/005991.html

If you need to be able to remove it, you could install it into
a GDAL specific tree with a configuration something like:

 ./configure --prefix=/usr/local/gdal

or ./configure --prefix=/opt/gdal

The uninstall target has been considered, https://trac.osgeo.org/gdal/ticket/133, but it's not easy to implement. It may never happen as the --prefix quite does the job.

@mloskot mloskot changed the title No uninstaller No make uninstall Apr 16, 2019
@etresoft
Copy link
Author

Yes. I know. I’m already doing that because I have a custom stack. But almost everything else can be installed and removed. Now I realize that GDAL is like Python and needs it own mini-stack. But Python is a build tool, not a distributable so I need to rework my build scripts to move GDAL off to its own directory.

I don’t consider --prefix a true solution. The only people who would use --prefix are people doing funky stuff like me. For most users, there is no uninstallation method and this forces even more dependence on various package managers.

If it isn’t worth the trouble, that’s fair enough. I’ll make changes to my build scripts.

@mloskot
Copy link
Member

mloskot commented Apr 16, 2019

But I can’t uninstall it. I have to wipe out my entire stack and rebuild.

If you run ./configure --prefix=/opt/gdal and make && make install, and you rm -rf /opt/gdal, then you do not have to rebuild GDAL to re-install. You run make and it should deploy pretty much what you built previously.

@mloskot
Copy link
Member

mloskot commented Apr 16, 2019

I don’t consider --prefix a true solution.

My take on that is GDAL does not offer canonical GNU Autotools build configuration. There is configure but rest is pretty much custom makefiles and scripts.

@jgrocha
Copy link
Contributor

jgrocha commented Nov 10, 2019

It would be nice to have an uninstall option.

I had gdal installed from sources on the default /usr/local folder. To remove it, I had to do a hack (on a single user environment):

sudo make install
find /usr/local/ -mmin -30 -type f -exec ls {} + | sudo xargs rm

I reinstalled it and them remove all modified files. Works. But it is a hack.

@mloskot
Copy link
Member

mloskot commented Nov 10, 2019

Hacks are not uncommon, e.g. CMake offers no uninstall either and one has to employ a hack

https://github.com/mloskot/wsl-config/blob/334f317b9cac860cdf607d82eede243e4602f1bc/scripts/install-cmake-latest.sh#L29-L38

@strk
Copy link
Member

strk commented Feb 7, 2020

I'm also missing an uninstall rule, especially for the python bindings.
Right now having a problem with them and trying to clean things up

@rouault
Copy link
Member

rouault commented Mar 21, 2022

The GDAL CMake build system in master has a "uninstall" target

rouault added a commit that referenced this issue Mar 22, 2022
CMake: improve 'uninstall' target to uninstall bash completion scripts and python bindings; test in CI (fixes #1446)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants