Menu

#2624 perl make uninstall doesn't work; need an alternative

perl
open
None
5
2018-03-24
2015-04-27
teo8976
No

I installed net-snmp by following the installation instructions at
http://www.net-snmp.org/docs/INSTALL.html

Now I want to uninstall it.

The same docs say:

7. You can remove the application by typing `make uninstall'.

That's not true.
make uninstall produces output like this:

Uninstall is unsafe and deprecated, the uninstallation was not performed.
We will show what would have been done.
....
.... (huge list of commands, mostly unlink) 
....

several times (once for every directory recursively I guess)
And finally:
Uninstall is unsafe and deprecated, the uninstallation was not performed.
Please check the list above carefully, there may be errors.
Remove the appropriate files manually.

Manually?? YOU MUST BE KIDDING ME.

So (1) the documentation needs to be fixed, as point 7 is not true.
and most importantly (2) a working script for uninstalling must be provided.

Discussion

  • teo8976

    teo8976 - 2015-04-27

    SourceForge's shitty markdown changed my quoting of the docs, where it read "7", not "1". (besides screwing up my formatting)

     
  • teo8976

    teo8976 - 2015-04-27

    OMG
    https://sourceforge.net/p/net-snmp/mailman/message/16948818/

    We probably need to investigate this further.

    two-thousands-f***ing-six

     
  • Bill Fenner

    Bill Fenner - 2015-04-28

    net-snmp uses perl's MakeMaker infrastructure. MakeMaker appears to have deprecated "uninstall" in 1997, and does not seem to have replaced it.

    "make uninstall" works for the non-perl portions. I know that's unsatisfying.

     
  • Bill Fenner

    Bill Fenner - 2015-04-28

    I was slightly misdirected by the presence of a Makefile.am and assumed that the rules were generated by automake. Turns out that the perluninstall target is simply in net-snmp's Makefile.in, and can be replaced by one similar to the pythonuninstall target:

    pythonuninstall:
            echo "WARNING: python doesn't support uninstall"
    

    s/python/perl/ and it'll be equally true. I'll also modify the INSTALL documentation:

    --- a/docs/readmefiles/INSTALL
    +++ b/docs/readmefiles/INSTALL
    @@ -113,7 +113,8 @@ The simplest way to compile this package is:
          files that `configure' created (so you can compile the package for
          a different kind of computer), type `make distclean'.
    
    -  7. You can remove the application by typing `make uninstall'.
    +  7. You can remove the application (but not the perl or python modules)
    +     by typing `make uninstall'.
    
     There may be additional installation issues discussed in the 
     README's for various platforms such as README.solaris.
    
     
  • Bill Fenner

    Bill Fenner - 2015-04-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,7 +4,9 @@
     Now I want to uninstall it.
    
     The same docs say:
    -> 7. You can remove the application by typing `make uninstall'.
    +~~~~
    +7. You can remove the application by typing `make uninstall'.
    +~~~~
    
     That's not true.
     make uninstall produces output like this:
    
    • assigned_to: Bill Fenner
     
  • teo8976

    teo8976 - 2015-04-28

    Errr... Updating the docs to reflect reality and the scripts to avoid a flood of unnecessary output is definitely an improvement for the short term, but i hope you're not saying that you're not going to address the issue of uninstalling at all!

     
    • Bill Fenner

      Bill Fenner - 2015-04-28

      As I mentioned, perl seems to have deprecated the "uninstall" functionality of ExtUtils::MakeMaker in 1997, and not yet replaced it. I do not think that the net-snmp project has the manpower to fix a perl infrastructure problem that the perl project hasn't managed to fix in 18 years.

      While there are newcomers like Module::Install and Module::Build, they reduce portability because they need to be installed separately or need a newer version of perl - and it's not clear that they solve the uninstall problem. E.g., Module::Build has extensive documentation as to what you can do with it, and it doesn't mention uninstall.

      When searching for solutions to this, I did come across several recommendations to use cpanminus:

      1. Install App::cpanminus using CPAN (use: cpan App::cpanminus)

      2. Type cpanm --uninstall Module::Name

      Of course, that means coming up with a list of module names (and finding out whether cpanm takes a list, or requires one invocation per module). I honestly have no idea how to come up with such a list; there are probably

      SNMP NetSNMP::ASN NetSNMP::OID NetSNMP::TrapReceiver NetSNMP::agent NetSNMP::default_store

      (I don't know which count as modules - can you just say you want to remove SNMP and NetSNMP?)

       
    • Bill Fenner

      Bill Fenner - 2015-07-07

      Would you consider helping to build the list of modules that you need to supply to cpanm?

       
  • Robert Story

    Robert Story - 2015-07-08
    • summary: make uninstall doesn't work; need an alternative --> perl make uninstall doesn't work; need an alternative
    • Group: 64-bit --> perl
     
  • Bill Fenner

    Bill Fenner - 2018-03-24
     
  • Bill Fenner

    Bill Fenner - 2018-03-24

    Note that I no longer have cycles to work on perl-related bugs; sadly the sourceforge bug system does not let me move this bug back to "unassigned".

     
  • Keith Mendoza

    Keith Mendoza - 2018-03-24

    Bill,
    I can take care of the perl-related stuff if you wish.

    Thanks,
    Keith

     

Log in to post a comment.