Yesterday evening I tested the program I'm working on, built with Perl/Tk on a SuSE 6.4 laptop. Up till the last time I tested a version on that machine, everything worked fine. Now it crashed. And not even with a neat little perl errormessage, but with a plain 'segmentation fault'. First thing I thought was checking the version of Perl on all of my machines (which was 5.005_03), and checking the version of Tk. This was a probable source of the problem. My development machine had 800.022, the SuSE 6.4 machine had 800.014. "Bingo!" I thought. I started  perl -MCPAN -e'shell', did a re-install of Tk, and left the machine alone for a while (downloading and compiling all Tk stuff takes a while).

When I got back, I quickly looked at the screen, saw something that looked like 'successfully', so I presumed everything was OK. I exited the CPAN shell, tried to run the program again, but still the same error.
I went to my Windows desktop machine with Activestate Perl, and also Tk 800.022 installed, ran the program and it worked fine there too (wonderful! write once run anywhere...err...wasn't that a slogun of another language....?? ). Anyway. The error had to be on the SuSE 6.4 testmachine.

After debugging a whole lot, which didn't lead to any results, I decided to check the Tk version once more. I didn't know why I did, but I got frustrated, and then you try everything you've tried before. 800.014 it said. What? But I just installed 800.022! Back to the builddirectory of Tk, I typed make install. At the end it indeed said something like 'successfully' ,but it also said that 'if I wanted to remove "those" files I had to run make install UNINST=1'.Hmm...something told me that the make install didn't update my files, but just added the non-existing ones. I ran make install UNINST=1 and indeed, after that my program worked fine.

I rethought everyting I went through, and left myself with only one question. When I want to upgrade any package, will it always have to be installed like this, or is it possible to really upgrade the files from the CPAN shell? I used CPAN.pm 1.58 (I know, 1.59 is available).

Jouke Visser, Perl 'Adept'

Replies are listed 'Best First'.
Re: upgrading Tk && CPAN.pm
by repson (Chaplain) on Mar 12, 2001 at 13:11 UTC
    The option UNINST=1 is mentioned (but not defaulted) during initial cpan configuration. This option removes any other copies of the modules that exist in any of the multiple valid directories modules can be installed in. The option is probably safe to turn on permenantly in most situations.

    To update it just type on the cpan prompt:
    cpan> o conf make_install_arg UNINST=1
    This will pass it to make from that point onwards.

      Ah. So it is possible to configure the CPAN shell to automagically update it. But shouldn't this just be 'normal behaviour'? When I have a package installed and I want to reinstall or update the package, doesn't it seem logical to replace updated files? To me it sounds more logical than keeping old files and adding new ones. In that case you have a mixed environment of old and new files, and something tells me that is not what most people would want.

      Jouke Visser, Perl 'Adept'
        Just my to cents comment :

        But shouldn't this just be 'normal behaviour'? When I have a package installed and I want to reinstall or update the package, doesn't it seem logical to replace updated files?

        I think that a 'normal behaviour' may change with another person opinion.

        Some people may want to install a new module and keep a previous version (for testing pupose).
        Some people even find it normal to have a Perl 5.6 WITH a previous perl version.


        "Trying to be a SMART lamer" (thanx to Merlyn ;-)
Re: upgrading Tk && CPAN.pm
by arhuman (Vicar) on Mar 12, 2001 at 12:49 UTC
    I've upgraded several packages via cpan.pm and never had to uninstall them before.

    I didn't have any problem (but I 've stood in front of the screen to answer the question that were asked ;-)


    "Trying to be a SMART lamer" (thanx to Merlyn ;-)