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

make uninstall is not uninstalling #1187

Closed
strk opened this issue Oct 30, 2024 · 2 comments
Closed

make uninstall is not uninstalling #1187

strk opened this issue Oct 30, 2024 · 2 comments

Comments

@strk
Copy link
Member

strk commented Oct 30, 2024

As puzzling as it may be, sudo make uninstall prints lines like:

...
-- Uninstalling /usr/local/include/geos_c.h
-- Uninstalling /usr/local/include/geos.h
-- Uninstalling /usr/local/bin/geos-config
-- Uninstalling /usr/local/lib/pkgconfig/geos.pc
-- Deleting /usr/local/include/geos directory
Built target uninstall

But none of those files is really removed:

ls -dl /usr/local/include/geos* /usr/local/bin/geos-config /usr/local/lib/pkgconfig/geos* /usr/local/include/geos
-r-xr-xr-x  1 root root   1290 Oct  1 10:24 /usr/local/bin/geos-config*
drwxr-xr-x 20 root root   4096 Oct  1 10:37 /usr/local/include/geos/
drwxr-xr-x 20 root root   4096 Oct  1 10:37 /usr/local/include/geos/
-rw-r--r--  1 root root 194202 Oct  1 10:24 /usr/local/include/geos_c.h
-rw-r--r--  1 root root   1125 Jan 29  2022 /usr/local/include/geos.h
-rw-r--r--  1 root root    271 Oct  1 10:24 /usr/local/lib/pkgconfig/geos.pc

What's the deal ?

@strk
Copy link
Member Author

strk commented Oct 30, 2024

This patch partially fixes the problem:

diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in
index 749221415..7eab12b3f 100644
--- a/cmake/cmake_uninstall.cmake.in
+++ b/cmake/cmake_uninstall.cmake.in
@@ -31,7 +31,7 @@ foreach(file ${files})
   endif()
 
   execute_process(
-    COMMAND "@CMAKE_COMMAND@" -E remove \"$ENV{DESTDIR}${file}\"
+    COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${file}"
     OUTPUT_VARIABLE rm_out
     RESULT_VARIABLE rm_retval)

Partially because /usr/local/include/geos/ is still there, but geos-config at least is gone.
This is with cmake 3.22.1

@strk
Copy link
Member Author

strk commented Oct 30, 2024

3.13 is also affected

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

Successfully merging a pull request may close this issue.

1 participant